microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

Question: Using an Expander in WASDK 1.0 always throws an exception, is this new behavior expected?

Open kmgallahan opened this issue 2 years ago • 5 comments

Just updated to WASDK 1.0 and noticed a new output message appearing during each debug session:

Exception thrown at 0x00007FFE07A44F69 (KernelBase.dll) in MyApp.exe: WinRT originate error - 0x80040111 : 'Microsoft.UI.Xaml.Controls.ExpanderTemplateSettings'.

As the message suggests, it only occurs when using the Expander control. This isn't the only WinUI control that throws errors whenever used, but this wasn't happening with Preview 3.

Is this error a vexing exception or exceptional exception?

Windows 10 v.19042.1348

kmgallahan avatar Nov 18 '21 12:11 kmgallahan

@kmgallahan looks possibly related to this - https://github.com/microsoft/microsoft-ui-xaml/issues/7164#issuecomment-1171618502

ranjeshj avatar Jul 27 '22 13:07 ranjeshj

@ranjeshj Nothing has changed when using 1.1.3.

This is the current list of errors output when launching a blank app with an empty window:

Profiler was prevented from loading notification profiler due to app settings.
  Process ID (decimal): 28996.  Message ID: [0x2509].
onecoreuap\windows\frameworkudk\dxprivatescommon.cpp(53)\Microsoft.Internal.FrameworkUdk.dll!00007FFCC5DA9BC5: (caller: 00007FFCC5DFED0D) ReturnHr(1) tid(5454) 80004002 No such interface supported
onecoreuap\windows\frameworkudk\dxprivatescommon.cpp(53)\Microsoft.Internal.FrameworkUdk.dll!00007FFCC5DA9BC5: (caller: 00007FFCC5DFED0D) ReturnHr(2) tid(5454) 80004002 No such interface supported
Microsoft.ui.xaml.dll!00007FFC3D2F4795: (caller: 00007FFC3BAC1CAF) ReturnHr(1) tid(5454) 80070057 The parameter is incorrect.
Microsoft.ui.xaml.dll!00007FFC3D2F4795: (caller: 00007FFC3BAC1CAF) ReturnHr(2) tid(5454) 80070057 The parameter is incorrect.
Microsoft.ui.xaml.dll!00007FFC3D2F4795: (caller: 00007FFC3BAC1CAF) ReturnHr(3) tid(5454) 80070057 The parameter is incorrect.
onecoreuap\windows\frameworkudk\dxprivatescommon.cpp(53)\Microsoft.Internal.FrameworkUdk.dll!00007FFCC5DA9BC5: (caller: 00007FFCC5DFED0D) ReturnHr(3) tid(6e34) 80004002 No such interface supported

and with an expander:

Profiler was prevented from loading notification profiler due to app settings.
  Process ID (decimal): 26648.  Message ID: [0x2509].
Microsoft.ui.xaml.dll!00007FFC3D2F4795: (caller: 00007FFC3BAC1CAF) ReturnHr(1) tid(6efc) 80070057 The parameter is incorrect.
Microsoft.ui.xaml.dll!00007FFC3D2F4795: (caller: 00007FFC3BAC1CAF) ReturnHr(2) tid(6efc) 80070057 The parameter is incorrect.
Microsoft.ui.xaml.dll!00007FFC3D2F4795: (caller: 00007FFC3BAC1CAF) ReturnHr(3) tid(6efc) 80070057 The parameter is incorrect.
onecoreuap\windows\frameworkudk\dxprivatescommon.cpp(53)\Microsoft.Internal.FrameworkUdk.dll!00007FFCC5DA9BC5: (caller: 00007FFCC5DFED0D) ReturnHr(1) tid(6efc) 80004002 No such interface supported
onecoreuap\windows\frameworkudk\dxprivatescommon.cpp(53)\Microsoft.Internal.FrameworkUdk.dll!00007FFCC5DA9BC5: (caller: 00007FFCC5DFED0D) ReturnHr(2) tid(6efc) 80004002 No such interface supported
onecore\com\combase\winrt\error\restrictederror.cpp(1016)\combase.dll!00007FFD2D2C7243: (caller: 00007FFD2D26CEAD) ReturnHr(1) tid(6efc) 8007007E The specified module could not be found.
onecore\com\combase\objact\dllcache.cxx(4815)\combase.dll!00007FFD2D37B045: (caller: 00007FFD2D2B7465) ReturnHr(2) tid(6efc) 80040111 ClassFactory cannot supply requested class
Exception thrown at 0x00007FFD2C724FD9 (KernelBase.dll) in MyApp.Lab.exe: WinRT originate error - 0x80040111 : 'Microsoft.UI.Xaml.Controls.ExpanderTemplateSettings'.
onecoreuap\windows\frameworkudk\dxprivatescommon.cpp(53)\Microsoft.Internal.FrameworkUdk.dll!00007FFCC5DA9BC5: (caller: 00007FFCC5DFED0D) ReturnHr(3) tid(7b18) 80004002 No such interface supported

kmgallahan avatar Jul 27 '22 21:07 kmgallahan

@kmgallahan is the issue that the Expander control does not work at all because of the exception? Or is the issue that there are unhelpful messages appearing in the debug output (even though the Control works correctly)?

At the time of the crash, can you check in the VS Modules window if Microsoft.Windows.SDK.NET.dll is loaded? Can you also check if the work-around posted in this comment allows you to avoid the issue?

kmahone avatar Jul 27 '22 22:07 kmahone

@kmahone The expander & app work & run fine.

When upgrading to WASDK 1.0 at the time of creating this issue I noticed new error messages in the debug output. They were not present before the package upgrade, so I was curious if this was expected behavior based on some internal changes or not.

In particular this message indicated there was a new internal bug related to loading the expander control:

Exception thrown at 0x00007FFD2C724FD9 (KernelBase.dll) in MyApp.Lab.exe: WinRT originate error - 0x80040111 : 'Microsoft.UI.Xaml.Controls.ExpanderTemplateSettings'.

If this is output is the result of new control flow logic then I suppose it is just another harmless (yet vexing) native error.

kmgallahan avatar Jul 28 '22 00:07 kmgallahan

Thanks for the info. It is not expected/intentional for the Expander to log these exception messages in the debugger. We will need to investigate further to determine the cause of the logged exception.

kmahone avatar Jul 28 '22 00:07 kmahone

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jul 28 '23 21:07 github-actions[bot]