Closed dotMorten closed 1 week ago
Breaking on WinRT errors (RoOriginateError, doable via !winrterr break
in WinDbg) Shows the exception originating from the TitleBar code:
02 combase!RoOriginateErrorW
03 Microsoft_UI_Input!Microsoft::WRL2::ContextRuntimeClass::ReportDisposed
04 Microsoft_UI_Input!InputNonClientPointerSourceWinRT::Api::GetRegionRects
05 Microsoft_UI_Windowing_Core!CTitleBar::UpdateColors
06 Microsoft_UI_Windowing_Core!CTitleBar::Update
07 Microsoft_UI_Windowing_Core!CTitleBar::OnUISettingsColorValuesChanged
@codendone Thanks Mike. I had a feeling it was titlebar related since ExtendsContentIntoTitleBar triggers the issue. I was trying to compare 1.5.x branch with 1.6.x but looks like the source tree history got all messed up :(
Note: It appears the app will continue running if continuing past this exception (or if no debugger is attached). But that is scary in the context of an UnhandledException being raised.
I was trying to compare 1.5.x branch with 1.6.x but looks like the source tree history got all messed up :(
I reported it here https://github.com/microsoft/microsoft-ui-xaml/discussions/9911 and it appears it works now: https://github.com/microsoft/microsoft-ui-xaml/compare/winui3/release/1.5.6...winui3/release/1.6-preview2
Describe the bug
If I have a window set to
AppWindow.TitleBar.ExtendsContentIntoTitleBar = true
, and I close that window (but other WinUI windows are still live), then changing the system theme, the following crash is observed:Steps to reproduce the bug
Expected behavior
No app crash.
Screenshots
No response
NuGet package version
Any of these 3 versions reproduces the issue: WinUI 3 - Windows App SDK 1.6 Experimental 1: 1.6.240531000-experimental1 WinUI 3 - Windows App SDK 1.6 Experimental 2: 1.6.240701003-experimental2 WinUI 3 - Windows App SDK 1.6 Preview 1: 1.6.240807006-preview1
Windows version
Windows 11 (22H2): Build 22621
Additional context
This crash prevents users from creating things like splash screens or startup screens, or any type of temporary windows. Setting ExtendsContentIntoTitleBar to false in the StartupWindow class avoids the issue, but means you can't use the new titlebar. This is a regression from 1.5.240802000 where this is a non-issue.
Full callstack: