WinUI-Gallery icon indicating copy to clipboard operation
WinUI-Gallery copied to clipboard

XamlParseException thrown when repeatedly opening a control page.

Open MarkBrainfire opened this issue 2 years ago • 4 comments

Which version of the app?

WinUI 3 Gallery

Description

  1. Run the current build of WinUI 3 Gallery.
  2. In the navigation menu click "All" to display the grid of all controls.
  3. Click the NavigationView tile to display the NavigationViewPage

Repeat steps 2 and 3 several times (2 to 10 times usually) until a XamlParseException: 'XAML Parsing Failed.' exception is thrown within the generated (NavigationViewPage.g.i.cs) partial class InitializeComponent() method on the last line of this method:

' global::Microsoft.UI.Xaml.Application.LoadComponent(this, resourceLocator, global::Microsoft.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);'

(see screenshot below)

This same XamlParseException has also been observed with the ViewboxPage following the same steps. This same XamlParseException has also been observed with the ViewboxPage following alternate steps clicking the Viewbox tile to open the ViewboxPage alternating with clicking almost anything else in the navigation menu. Again it happens after reopening the Viewbox page between 2 to 10 times.

Screenshots

XamlParseException

Windows version

Windows 11 22H2 (22621)

Additional context

Edition Windows 11 Home Version 22H2 Installed on ‎1/‎5/‎2023 OS build 22621.1265 Experience Windows Feature Experience Pack 1000.22638.1000.0

Visual Studio 2022 Preview 17.6 preview 1 WindowsAppSDK 1.2.23

MarkBrainfire avatar Mar 04 '23 18:03 MarkBrainfire

@chingucoding Thoughts?

niels9001 avatar Mar 07 '23 10:03 niels9001

Thanks for filing this bug @MarkBrainfire, I was also able to repro.

gregwoo-microsoft avatar Mar 08 '23 05:03 gregwoo-microsoft

No idea why this happens, given that this didn't occur in the WinUI 2/XCG back then, I'm inclined to say this is a WinUI 3 issue. I'm not sure though if this is only happening when a debugger is attached/when we are running in debug or if the store version also exhibits this behavior.

marcelwgn avatar Mar 08 '23 08:03 marcelwgn

No idea why this happens, given that this didn't occur in the WinUI 2/XCG back then, I'm inclined to say this is a WinUI 3 issue. I'm not sure though if this is only happening when a debugger is attached/when we are running in debug or if the store version also exhibits this behavior.

@chingucoding The store version also crashes image

The navigationview page easily reproduces.

HO-COOH avatar Nov 28 '23 09:11 HO-COOH