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

NavigationView leads to internal crash when close pane by hamburger menu #9254

Closed
SeRgI1982 opened this issue Jan 17, 2024 · 3 comments
Closed
Labels
area-NavigationView NavView control bug Something isn't working team-Controls Issue for the Controls team

Comments

@SeRgI1982
Copy link

SeRgI1982 commented Jan 17, 2024

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

  1. Open & Close NavigationView Pane by hamburger menu

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

image

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

@SeRgI1982 SeRgI1982 added the bug Something isn't working label Jan 17, 2024
Copy link

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:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Jan 17, 2024
@bpulliam bpulliam added area-NavigationView NavView control team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Jan 18, 2024
@TPopiel
Copy link

TPopiel commented Jan 22, 2024

Seems that issue is easily to reproduce with WinUI3 Gallery app.

Here are the steps:

  1. Go to "Navigation\NavigationView"
  2. Select "Menu Item3"
  3. Go to "Motivation\Connected Animation"
  4. Go to "Navigation\NavigationView"

Observed behavior: crash of the app (if not repeat steps 2 -4)

@JJBrychell
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-NavigationView NavView control bug Something isn't working team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

4 participants