Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev Home can randomly crash when updating properties on Environments page #2947

Closed
bbonaby opened this issue May 16, 2024 · 0 comments · Fixed by #2950
Closed

Dev Home can randomly crash when updating properties on Environments page #2947

bbonaby opened this issue May 16, 2024 · 0 comments · Fixed by #2950
Labels
Area-Environments Issue-Bug Something isn't working or needs investigation Priority-1 Resolution-Fix-Available Available in a release Severity-Crash Bug that is causing a crash

Comments

@bbonaby
Copy link
Contributor

bbonaby commented May 16, 2024

Dev Home version

No response

Windows build number

No response

Other software

No response

Steps to reproduce the bug

When an operation is perform in the environments page. E.g Starting/Stopping an environment we update the properties. For an unknown reason at this time the ObservableCollection can throw an exception when performing the OnCollectionChanged method. When an operation completes we update the properties for that environment as they could have changed. So we remove all the original values from the list and then add the new ones.

I added a try/catch in this PR: #2892

for the removal case : but I realize we still attempt to add to the collection later on after the orginal throws. Also this seems to happen randomly it is better to cover both in a try/catch so we don't crash Dev Home.

example trace:

`
[2024/05/16 09:44:38.049 ERR] (ComputeSystemHelpers) Unable to remove items from the collection
System.Runtime.InteropServices.COMException (0x80004005): Unspecified error

Unspecified error

at WinRT.ExceptionHelpers.g__Throw|39_0(Int32 hr)
at ABI.System.Collections.Specialized.NotifyCollectionChangedEventHandler.NativeDelegateWrapper.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) at DevHome.Common.Environments.Helpers.ComputeSystemHelpers.RemoveAllItems[T](ObservableCollection1 collection)
[2024/05/16 09:44:38.164 ERR] (ComputeSystemHelpers) Unable to remove items from the collection
System.Runtime.InteropServices.COMException (0x80004005): Unspecified error

Unspecified error

at WinRT.ExceptionHelpers.g__Throw|39_0(Int32 hr)
at ABI.System.Collections.Specialized.NotifyCollectionChangedEventHandler.NativeDelegateWrapper.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) at DevHome.Common.Environments.Helpers.ComputeSystemHelpers.RemoveAllItems[T](ObservableCollection1 collection)
`

Expected result

no crashing after performing an operation

Actual result

a random crash could happen

Included System Information

No response

Included Extensions Information

No response

@bbonaby bbonaby added Issue-Bug Something isn't working or needs investigation Area-Environments labels May 16, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage New issue that the core contributors need to triage label May 16, 2024
@bbonaby bbonaby added the Severity-Crash Bug that is causing a crash label May 16, 2024
@kanismohammed kanismohammed added Priority-1 and removed Needs-Triage New issue that the core contributors need to triage labels May 17, 2024
@krschau krschau added the In-PR This issue has a related PR label May 17, 2024
@krschau krschau added this to the Dev Home v0.14 milestone May 22, 2024
@krschau krschau added Resolution-Fix-Available Available in a release and removed In-PR This issue has a related PR labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Environments Issue-Bug Something isn't working or needs investigation Priority-1 Resolution-Fix-Available Available in a release Severity-Crash Bug that is causing a crash
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants