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 the application #8240

Open
SeRgI1982 opened this issue Mar 2, 2023 · 4 comments
Open

NavigationView leads to internal crash when close the application #8240

SeRgI1982 opened this issue Mar 2, 2023 · 4 comments
Labels
area-NavigationView NavView control bug Something isn't working team-Controls Issue for the Controls team

Comments

@SeRgI1982
Copy link

Describe the bug

I have an app with TabView control.
Inside selected tab I have NavigationView with different configuration of other controls.
When I close app by X button, my app crash with such Exception

Exception thrown at 0x00007FFFEE0940AC in MyCRM.App.exe: Microsoft C++ exception: winrt::hresult_error at memory location 0x000000A68937D640.

Steps to reproduce the bug

  1. Create App with TabView control

  2. Inside TabViewItem put view like Master-Details where on the Master you have NavigationView

  3. Assign elements to NavigationView.MenuItemsSource and template selector to NavigationView.MenuItemTemplateSelector
    image

  4. Expand some Menu items

  5. Close the app by X button (right-top corner)
    Exception happens

image

Expected behavior

The app will be close without exception

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.2.4: 1.2.230217.4

Windows version

Windows 11 (21H2): Build 22000

Additional context

No response

@SeRgI1982 SeRgI1982 added the bug Something isn't working label Mar 2, 2023
@sotanakamura
Copy link

Can you share a minimal reproducible example shown in following link?
How to create a Minimal, Reproducible Example

@gabbybilka gabbybilka added the needs-triage Issue needs to be triaged by the area owners label Mar 13, 2023
@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 Jul 7, 2023
@StevoSM
Copy link

StevoSM commented Nov 24, 2023

I can confirm this crash still happens in the latest Win App SDK 1.4.231115000.

It seems to be most easily reproducible by not selecting either of the tabs. Just launch the application and click the window close button. It may not happen on every launch.

A minimal example is as simple as replacing the standard sample XAML content as follows:

	<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
		<Button x:Name="myButton" Click="myButton_Click">Click Me</Button>

		<NavigationView PaneDisplayMode="Top" SelectionFollowsFocus="Enabled" IsBackButtonVisible="Collapsed" IsSettingsVisible="False">
			<NavigationView.MenuItems>
				<NavigationViewItem Content="Tab 1" Tag="Tab1Page" />
				<NavigationViewItem Content="Tab 2" Tag="Tab2Page" />
			</NavigationView.MenuItems>
			<Frame x:Name="contentFrame"/>
		</NavigationView>
	</StackPanel>

@ojhad
Copy link
Contributor

ojhad commented Feb 8, 2024

@SeRgI1982 Would you be able to provide a min repro of this issue?

@StevoSM I tried your repro several times but am not seeing this exception. Are you seeing the same call stack with your repro?

@StevoSM
Copy link

StevoSM commented Feb 12, 2024

@ojhad It appears that the crash only happened when there was no content in the NavigationView. Once I added content, I didn't see the crash anymore.

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

6 participants