-
Notifications
You must be signed in to change notification settings - Fork 693
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
NavigationView leads to internal crash when close pane by hamburger menu #9254
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you! Open similar issues:
Closed similar issues:
|
Seems that issue is easily to reproduce with WinUI3 Gallery app. Here are the steps:
Observed behavior: crash of the app (if not repeat steps 2 -4) |
This issue has been addressed and is scheduled for the next preview release of 1.6. Problem arises from managed garbage collection interaction with the internal radio button tables. When a radio button is named it is entered into an internal table that is searched when determining which button(s) to uncheck when a new button is checked. The entry stays in this table until the radio button is destructed, but with garbage collection it can stick around for a while after it been removed from the tree. So when you show/hide the pane, you can get multiple sets of radio buttons for the pane in this internal table. This is handled correctly, except when the timing of garbage collection is just right. When garbage collection happens, it does so off the UI thread, so it only partially destructs the UI element and then schedules the rest of it to be done on the UI thread. If a check box checked changes comes in between when garbage collection has partially destructed the item, but the UI thread hasn't completed that destruction, the radio button code doesn't realize that even though it still exists, it is in a bad state that ultimately causes this crash. We have modified the process to no longer rely on any of the data that is partially destructed in garbage collection. |
Describe the bug
The bug happens randomly, so hard to tell what is the issue.
Callstack says that it happens when NavigationView goes to state, so I am guessing that the issue is with animation.
I have raised similar bug a couple of months ago:
#8240
Steps to reproduce the bug
Expected behavior
Open & Close NavigationView Pane works always and even if some internal exception happens (for ex. because of a buggy animation), the control will not crash but jumps to the final state of this animation.
Screenshots
NuGet package version
WinUI 3 - Windows App SDK 1.4.4: 1.4.231219000
Windows version
Windows 11 (22H2): Build 22621
Additional context
No response
The text was updated successfully, but these errors were encountered: