Skip to content

NavigationView's navigation will throw an unhandled exception in some situations, causing the UI thread to throw a fast fail and freeze #11047

Description

@hoshiizumiya

Describe the bug

The output will like these below:

Microsoft.UI.Xaml.dll!00007FFFBFD4FCCD: 80070057 - E_INVALIDARG
Exception thrown at 0x00007FF84D63B5AC (KernelBase.dll) in OpenNet.exe: WinRT originate error - 0x80070057 : 'The parameter error'.
UnhandledException: The parameter error.

Unhandled exception at 0x00007FFFC00B6D95 (Microsoft.ui.xaml.dll) in OpenNet.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x000000EB384DA160, 0x0000000000000001).

Unhandled exception at 0x00007FF84DFB2678 (combase.dll) in OpenNet.exe: 0xC0000602:  A fail fast exception occurred. Exception handlers will not be invoked and the process will be terminated immediately.

Microsoft.UI.Xaml.dll!00007FFFBFD4FCCD: 80070057 - E_INVALIDARG

The call stack:

>	OpenNet.exe!winrt::OpenNet::implementation::App::{ctor}::__l2::<lambda_1>::operator()(const winrt::Windows::Foundation::IInspectable & __formal, const winrt::Microsoft::UI::Xaml::UnhandledExceptionEventArgs & e) Line 224	C++
 	OpenNet.exe!winrt::impl::delegate<winrt::Microsoft::UI::Xaml::UnhandledExceptionEventHandler,`winrt::OpenNet::implementation::App::App'::`2'::<lambda_1>>::Invoke(void * sender, void * e) Line 15296	C++
 	Microsoft.ui.xaml.dll!DirectUI::CFTMEventSource<ABI::Microsoft::UI::Xaml::IUnhandledExceptionEventHandler,ABI::Microsoft::UI::Xaml::IApplication,ABI::Microsoft::UI::Xaml::IUnhandledExceptionEventArgs>::Raise(ABI::Microsoft::UI::Xaml::IApplication * pSource, ABI::Microsoft::UI::Xaml::IUnhandledExceptionEventArgs * pArgs) Line 320	C++
 	Microsoft.ui.xaml.dll!DirectUI::FrameworkApplication::RaiseUnhandledExceptionEvent(HRESULT hrToReport, HSTRING__ * hstrMessage, bool * pfHandled) Line 907	C++
 	Microsoft.ui.xaml.dll!DirectUI::ErrorHelper::RaiseUnhandledExceptionEvent(HRESULT hrToReport, const xstring_ptr & strMessage, bool * pfHandled) Line 289	C++
 	Microsoft.ui.xaml.dll!DirectUI::ErrorHelper::ProcessUnhandledError(DirectUI::ErrorInfo & errorInfo, bool fSkipFailFastIfNoErrorContext, bool * pfHandled) Line 552	C++
 	Microsoft.ui.xaml.dll!DirectUI::FinalUnhandledErrorDetectedRegistration::OnFinalUnhandledErrorDetected(IInspectable * pSender, ABI::Windows::ApplicationModel::Core::IUnhandledErrorDetectedEventArgs * pArgs) Line 913	C++
 	twinapi.appcore.dll!Windows::Internal::Details::GitInvokeHelper<struct Windows::Foundation::IEventHandler<class Windows::ApplicationModel::Core::UnhandledErrorDetectedEventArgs *>,class Windows::Internal::GitPtr,2>::Invoke(struct IInspectable *,struct Windows::ApplicationModel::Core::IUnhandledErrorDetectedEventArgs *)	Unknown
 	twinapi.appcore.dll!Windows::ApplicationModel::Core::UnhandledErrorInvokeHelper::Invoke(struct IInspectable *,struct Windows::ApplicationModel::Core::IUnhandledErrorDetectedEventArgs *)	Unknown
 	twinapi.appcore.dll!Microsoft::WRL::InvokeTraits<2>::InvokeDelegates<class <lambda_27d7d14823826031efde997a0b43464f>,struct Windows::Foundation::ITypedEventHandler<class Windows::Foundation::Private::ComponentSite *,struct IInspectable *>,struct Microsoft::WRL::InvokeModeOptions<2> >(class <lambda_27d7d14823826031efde997a0b43464f>,class Microsoft::WRL::Details::EventTargetArray *,class Microsoft::WRL::EventSource<struct Windows::Foundation::ITypedEventHandler<class Windows::Foundation::Private::ComponentSite *,struct IInspectable *>,struct Microsoft::WRL::InvokeModeOptions<2> > *)	Unknown
 	twinapi.appcore.dll!Microsoft::WRL::EventSource<struct Windows::Foundation::IEventHandler<class Windows::ApplicationModel::Core::UnhandledErrorDetectedEventArgs *>,struct Microsoft::WRL::InvokeModeOptions<2> >::DoInvoke<class <lambda_e478ebca019219710ec18bdfd8216607> >(class <lambda_e478ebca019219710ec18bdfd8216607>)	Unknown
 	twinapi.appcore.dll!Microsoft::WRL::EventSource<struct Windows::Foundation::IEventHandler<class Windows::ApplicationModel::Core::UnhandledErrorDetectedEventArgs *>,struct Microsoft::WRL::InvokeModeOptions<2> >::InvokeAll<std::nullptr_t,class Windows::ApplicationModel::Core::UnhandledErrorDetectedEventArgs *>(std::nullptr_t,class Windows::ApplicationModel::Core::UnhandledErrorDetectedEventArgs *)	Unknown
 	twinapi.appcore.dll!Windows::ApplicationModel::Core::CoreApplication::ForwardLocalError(struct IRestrictedErrorInfo *)	Unknown
 	twinapi.appcore.dll!Windows::ApplicationModel::Core::CoreApplicationFactory::ForwardLocalError(struct IRestrictedErrorInfo *)	Unknown
 	combase.dll!CallErrorForwarder(void * hProcess, int fLocal, IRestrictedErrorInfo * pRestrictedErrorInfo) Line 1614	C++
 	Microsoft.ui.xaml.dll!DirectUI::ErrorHelper::ReportUnhandledError(HRESULT hrError) Line 475	C++
 	Microsoft.ui.xaml.dll!CXcpDispatcher::Tick() Line 1152	C++
 	Microsoft.ui.xaml.dll!CXcpDispatcher::OnReentrancyProtectedWindowMessage(unsigned int msg, unsigned __int64 lParam, __int64) Line 759	C++
 	[Inline Frame] Microsoft.ui.xaml.dll!CDeferredInvoke::DispatchQueuedMessage(bool *) Line 141	C++
 	Microsoft.ui.xaml.dll!CXcpDispatcher::MessageTimerCallback() Line 1254	C++
 	[Inline Frame] Microsoft.ui.xaml.dll!CXcpDispatcher::MessageTimerCallbackStatic(void *) Line 1223	C++
 	[Inline Frame] Microsoft.ui.xaml.dll!CXcpDispatcher::Init::__l46::<lambda_1>::operator()(ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *) Line 324	C++
 	Microsoft.ui.xaml.dll!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl ABI::Windows::Foundation::ITypedEventHandler_impl<ABI::Windows::Foundation::Internal::AggregateType<ABI::Microsoft::UI::Dispatching::DispatcherQueueTimer *,ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *>,IInspectable *>::*)(ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *,IInspectable *)>::DelegateInvokeHelper<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<2>,ABI::Windows::Foundation::ITypedEventHandler<ABI::Microsoft::UI::Dispatching::DispatcherQueueTimer *,IInspectable *>,Microsoft::WRL::FtmBase>,`CXcpDispatcher::Init'::`46'::<lambda_1> &,1,ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *,IInspectable *>::Invoke(ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer * <args_0>, IInspectable * <args_1>) Line 354	C++
 	CoreMessagingXP.dll!Microsoft::WRL::Details::DelegateArgTraits<long ( Windows::Foundation::ITypedEventHandler_impl<struct Windows::Foundation::Internal::AggregateType<class Microsoft::UI::Dispatching::DispatcherQueueTimer *,struct Microsoft::UI::Dispatching::IDispatcherQueueTimer *>,struct IInspectable *>::*)(struct Microsoft::UI::Dispatching::IDispatcherQueueTimer *,struct IInspectable *)>::DelegateInvokeHelper<struct Microsoft::WRL::Implements<struct Microsoft::WRL::RuntimeClassFlags<2>,struct Windows::Foundation::ITypedEventHandler<class Microsoft::UI::Dispatching::DispatcherQueueTimer *,struct IInspectable *>,class Microsoft::WRL::FtmBase>,class <lambda_82cf8073f4f042d1a68771c460cb9f49>,-1,struct Microsoft::UI::Dispatching::IDispatcherQueueTimer *,struct IInspectable *>::Invoke(struct Microsoft::UI::Dispatching::IDispatcherQueueTimer *,struct IInspectable *)	Unknown
 	CoreMessagingXP.dll!Microsoft::WRL::EventSource<struct Windows::Foundation::ITypedEventHandler<class Microsoft::UI::Dispatching::DispatcherQueueTimer *,struct IInspectable *>,struct Microsoft::WRL::InvokeModeOptions<1> >::InvokeAll<class Microsoft::UI::Dispatching::DispatcherQueueTimer *,std::nullptr_t>(class Microsoft::UI::Dispatching::DispatcherQueueTimer *,std::nullptr_t)	Unknown
 	CoreMessagingXP.dll!Microsoft::UI::Dispatching::DispatcherQueueTimer::TimerCallback(void *)	Unknown
 	CoreMessagingXP.dll!CFlat::SehSafe::Execute<<lambda_a81ff790741c2a62f2197c2561f5fe49>>()	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::ActionCallback::ImportAdapter$(class CFlat::Box$1<struct CFlat::FunctionPointerAndUserData$1<long (*)(void *)> > *)	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::TimeoutManager::Callback_OnDispatch(void)	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchNextItem(class Microsoft::CoreUI::Dispatch::DispatchItem *)	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchLoop(enum Microsoft::CoreUI::Dispatch::RunnablePriorityMask)	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop(enum Microsoft::CoreUI::Dispatch::RunMode)	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::UserAdapter::DrainCoreMessagingQueue(enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,void * *)	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch(bool,enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,void * *)	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::UserAdapter::DoWork(struct HWND__ *,enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,bool)	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::UserAdapter::HandleDispatchNotifyMessage(struct HWND__ *,unsigned __int64,__int64)	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::UserAdapter::WindowProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)	Unknown
 	user32.dll!UserCallWinProcCheckWow(struct _ACTIVATION_CONTEXT *,__int64 (*)(struct tagWND *,unsigned int,unsigned __int64,__int64),struct HWND__ *,enum _WM_VALUE,unsigned __int64,__int64,void *,int)	Unknown
 	user32.dll!DispatchClientMessage()	Unknown
 	user32.dll!__fnDWORD()	Unknown
 	ntdll.dll!KiUserCallbackDispatcherContinue()	Unknown
 	win32u.dll!00007ff84c6a1334()	Unknown
 	user32.dll!GetMessageW()	Unknown
 	Microsoft.ui.xaml.dll!DirectUI::FrameworkApplication::RunDesktopWindowMessageLoop() Line 1319	C++
 	Microsoft.ui.xaml.dll!DirectUI::FrameworkApplication::StartDesktop() Line 240	C++
 	[Inline Frame] Microsoft.ui.xaml.dll!DirectUI::FrameworkApplicationFactory::StartImpl(ABI::Microsoft::UI::Xaml::IApplicationInitializationCallback *) Line 183	C++
 	Microsoft.ui.xaml.dll!DirectUI::FrameworkApplicationFactory::Start(ABI::Microsoft::UI::Xaml::IApplicationInitializationCallback * pCallback) Line 843	C++
 	OpenNet.exe!winrt::impl::consume_Microsoft_UI_Xaml_IApplicationStatics<winrt::Microsoft::UI::Xaml::IApplicationStatics>::Start(const winrt::Microsoft::UI::Xaml::ApplicationInitializationCallback & callback) Line 507	C++
 	OpenNet.exe!winrt::Microsoft::UI::Xaml::Application::Start::__l2::<lambda_1>::operator()(const winrt::Microsoft::UI::Xaml::IApplicationStatics & f) Line 22894	C++
 	OpenNet.exe!winrt::impl::factory_cache_entry<winrt::Microsoft::UI::Xaml::Application,winrt::Microsoft::UI::Xaml::IApplicationStatics>::call<`winrt::Microsoft::UI::Xaml::Application::Start'::`2'::<lambda_1> &>(winrt::Microsoft::UI::Xaml::Application::Start::__l2::<lambda_1> & callback) Line 6442	C++
 	OpenNet.exe!winrt::impl::call_factory<winrt::Microsoft::UI::Xaml::Application,winrt::Microsoft::UI::Xaml::IApplicationStatics,`winrt::Microsoft::UI::Xaml::Application::Start'::`2'::<lambda_1>>(winrt::Microsoft::UI::Xaml::Application::Start::__l2::<lambda_1> && callback) Line 6464	C++
 	OpenNet.exe!winrt::Microsoft::UI::Xaml::Application::Start(const winrt::Microsoft::UI::Xaml::ApplicationInitializationCallback & callback) Line 22894	C++
 	OpenNet.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 176	C++
 	OpenNet.exe!invoke_main() Line 123	C++
 	OpenNet.exe!__scrt_common_main_seh() Line 288	C++
 	OpenNet.exe!__scrt_common_main() Line 331	C++
 	OpenNet.exe!wWinMainCRTStartup(void * __formal) Line 17	C++
 	kernel32.dll!BaseThreadInitThunk()	Unknown
 	ntdll.dll!RtlUserThreadStart()	Unknown

You'll find it's in a delegate if you continue:

 	KernelBase.dll!RaiseFailFastException()	Unknown
 	combase.dll!RoFailFastWithErrorContextInternal2(HRESULT hrError, unsigned long cStowedExceptions, _STOWED_EXCEPTION_INFORMATION_V2 * * aStowedExceptionPointers) Line 1468	C++
 	Microsoft.ui.xaml.dll!FailFastWithStowedExceptions(HRESULT hrError, unsigned long cStowedExceptions, _STOWED_EXCEPTION_INFORMATION_V2 * * aStowedExceptionPointers) Line 1508	C++
 	Microsoft.ui.xaml.dll!DirectUI::ErrorHelper::ProcessUnhandledError(DirectUI::ErrorInfo & errorInfo, bool fSkipFailFastIfNoErrorContext, bool * pfHandled) Line 582	C++
 	Microsoft.ui.xaml.dll!DirectUI::FinalUnhandledErrorDetectedRegistration::OnFinalUnhandledErrorDetected(IInspectable * pSender, ABI::Windows::ApplicationModel::Core::IUnhandledErrorDetectedEventArgs * pArgs) Line 913	C++
 	twinapi.appcore.dll!Windows::Internal::Details::GitInvokeHelper<struct Windows::Foundation::IEventHandler<class Windows::ApplicationModel::Core::UnhandledErrorDetectedEventArgs *>,class Windows::Internal::GitPtr,2>::Invoke(struct IInspectable *,struct Windows::ApplicationModel::Core::IUnhandledErrorDetectedEventArgs *)	Unknown
 	twinapi.appcore.dll!Windows::ApplicationModel::Core::UnhandledErrorInvokeHelper::Invoke(struct IInspectable *,struct Windows::ApplicationModel::Core::IUnhandledErrorDetectedEventArgs *)	Unknown
 	twinapi.appcore.dll!Microsoft::WRL::InvokeTraits<2>::InvokeDelegates<class <lambda_27d7d14823826031efde997a0b43464f>,struct Windows::Foundation::ITypedEventHandler<class Windows::Foundation::Private::ComponentSite *,struct IInspectable *>,struct Microsoft::WRL::InvokeModeOptions<2> >(class <lambda_27d7d14823826031efde997a0b43464f>,class Microsoft::WRL::Details::EventTargetArray *,class Microsoft::WRL::EventSource<struct Windows::Foundation::ITypedEventHandler<class Windows::Foundation::Private::ComponentSite *,struct IInspectable *>,struct Microsoft::WRL::InvokeModeOptions<2> > *)	Unknown
 	twinapi.appcore.dll!Microsoft::WRL::EventSource<struct Windows::Foundation::IEventHandler<class Windows::ApplicationModel::Core::UnhandledErrorDetectedEventArgs *>,struct Microsoft::WRL::InvokeModeOptions<2> >::DoInvoke<class <lambda_e478ebca019219710ec18bdfd8216607> >(class <lambda_e478ebca019219710ec18bdfd8216607>)	Unknown
 	twinapi.appcore.dll!Microsoft::WRL::EventSource<struct Windows::Foundation::IEventHandler<class Windows::ApplicationModel::Core::UnhandledErrorDetectedEventArgs *>,struct Microsoft::WRL::InvokeModeOptions<2> >::InvokeAll<std::nullptr_t,class Windows::ApplicationModel::Core::UnhandledErrorDetectedEventArgs *>(std::nullptr_t,class Windows::ApplicationModel::Core::UnhandledErrorDetectedEventArgs *)	Unknown
 	twinapi.appcore.dll!Windows::ApplicationModel::Core::CoreApplication::ForwardLocalError(struct IRestrictedErrorInfo *)	Unknown
 	twinapi.appcore.dll!Windows::ApplicationModel::Core::CoreApplicationFactory::ForwardLocalError(struct IRestrictedErrorInfo *)	Unknown
 	combase.dll!CallErrorForwarder(void * hProcess, int fLocal, IRestrictedErrorInfo * pRestrictedErrorInfo) Line 1614	C++
 	Microsoft.ui.xaml.dll!DirectUI::ErrorHelper::ReportUnhandledError(HRESULT hrError) Line 475	C++
 	Microsoft.ui.xaml.dll!CXcpDispatcher::Tick() Line 1152	C++
 	Microsoft.ui.xaml.dll!CXcpDispatcher::OnReentrancyProtectedWindowMessage(unsigned int msg, unsigned __int64 lParam, __int64) Line 759	C++
 	[Inline Frame] Microsoft.ui.xaml.dll!CDeferredInvoke::DispatchQueuedMessage(bool *) Line 141	C++
 	Microsoft.ui.xaml.dll!CXcpDispatcher::MessageTimerCallback() Line 1254	C++
 	[Inline Frame] Microsoft.ui.xaml.dll!CXcpDispatcher::MessageTimerCallbackStatic(void *) Line 1223	C++
 	[Inline Frame] Microsoft.ui.xaml.dll!CXcpDispatcher::Init::__l46::<lambda_1>::operator()(ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *) Line 324	C++
>	Microsoft.ui.xaml.dll!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl ABI::Windows::Foundation::ITypedEventHandler_impl<ABI::Windows::Foundation::Internal::AggregateType<ABI::Microsoft::UI::Dispatching::DispatcherQueueTimer *,ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *>,IInspectable *>::*)(ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *,IInspectable *)>::DelegateInvokeHelper<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<2>,ABI::Windows::Foundation::ITypedEventHandler<ABI::Microsoft::UI::Dispatching::DispatcherQueueTimer *,IInspectable *>,Microsoft::WRL::FtmBase>,`CXcpDispatcher::Init'::`46'::<lambda_1> &,1,ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *,IInspectable *>::Invoke(ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer * <args_0>, IInspectable * <args_1>) Line 354	C++
 	CoreMessagingXP.dll!Microsoft::WRL::Details::DelegateArgTraits<long ( Windows::Foundation::ITypedEventHandler_impl<struct Windows::Foundation::Internal::AggregateType<class Microsoft::UI::Dispatching::DispatcherQueueTimer *,struct Microsoft::UI::Dispatching::IDispatcherQueueTimer *>,struct IInspectable *>::*)(struct Microsoft::UI::Dispatching::IDispatcherQueueTimer *,struct IInspectable *)>::DelegateInvokeHelper<struct Microsoft::WRL::Implements<struct Microsoft::WRL::RuntimeClassFlags<2>,struct Windows::Foundation::ITypedEventHandler<class Microsoft::UI::Dispatching::DispatcherQueueTimer *,struct IInspectable *>,class Microsoft::WRL::FtmBase>,class <lambda_82cf8073f4f042d1a68771c460cb9f49>,-1,struct Microsoft::UI::Dispatching::IDispatcherQueueTimer *,struct IInspectable *>::Invoke(struct Microsoft::UI::Dispatching::IDispatcherQueueTimer *,struct IInspectable *)	Unknown
 	CoreMessagingXP.dll!Microsoft::WRL::EventSource<struct Windows::Foundation::ITypedEventHandler<class Microsoft::UI::Dispatching::DispatcherQueueTimer *,struct IInspectable *>,struct Microsoft::WRL::InvokeModeOptions<1> >::InvokeAll<class Microsoft::UI::Dispatching::DispatcherQueueTimer *,std::nullptr_t>(class Microsoft::UI::Dispatching::DispatcherQueueTimer *,std::nullptr_t)	Unknown
 	CoreMessagingXP.dll!Microsoft::UI::Dispatching::DispatcherQueueTimer::TimerCallback(void *)	Unknown
 	CoreMessagingXP.dll!CFlat::SehSafe::Execute<<lambda_a81ff790741c2a62f2197c2561f5fe49>>()	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::ActionCallback::ImportAdapter$(class CFlat::Box$1<struct CFlat::FunctionPointerAndUserData$1<long (*)(void *)> > *)	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::TimeoutManager::Callback_OnDispatch(void)	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchNextItem(class Microsoft::CoreUI::Dispatch::DispatchItem *)	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchLoop(enum Microsoft::CoreUI::Dispatch::RunnablePriorityMask)	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop(enum Microsoft::CoreUI::Dispatch::RunMode)	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::UserAdapter::DrainCoreMessagingQueue(enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,void * *)	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch(bool,enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,void * *)	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::UserAdapter::DoWork(struct HWND__ *,enum Microsoft::CoreUI::Dispatch::UserAdapter$UserPriority,bool)	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::UserAdapter::HandleDispatchNotifyMessage(struct HWND__ *,unsigned __int64,__int64)	Unknown
 	CoreMessagingXP.dll!Microsoft::CoreUI::Dispatch::UserAdapter::WindowProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)	Unknown
 	user32.dll!UserCallWinProcCheckWow(struct _ACTIVATION_CONTEXT *,__int64 (*)(struct tagWND *,unsigned int,unsigned __int64,__int64),struct HWND__ *,enum _WM_VALUE,unsigned __int64,__int64,void *,int)	Unknown
 	user32.dll!DispatchClientMessage()	Unknown
 	user32.dll!__fnDWORD()	Unknown
 	ntdll.dll!KiUserCallbackDispatcherContinue()	Unknown
 	win32u.dll!00007ff84c6a1334()	Unknown
 	user32.dll!GetMessageW()	Unknown
 	Microsoft.ui.xaml.dll!DirectUI::FrameworkApplication::RunDesktopWindowMessageLoop() Line 1319	C++
 	Microsoft.ui.xaml.dll!DirectUI::FrameworkApplication::StartDesktop() Line 240	C++
 	[Inline Frame] Microsoft.ui.xaml.dll!DirectUI::FrameworkApplicationFactory::StartImpl(ABI::Microsoft::UI::Xaml::IApplicationInitializationCallback *) Line 183	C++
 	Microsoft.ui.xaml.dll!DirectUI::FrameworkApplicationFactory::Start(ABI::Microsoft::UI::Xaml::IApplicationInitializationCallback * pCallback) Line 843	C++
 	OpenNet.exe!winrt::impl::consume_Microsoft_UI_Xaml_IApplicationStatics<winrt::Microsoft::UI::Xaml::IApplicationStatics>::Start(const winrt::Microsoft::UI::Xaml::ApplicationInitializationCallback & callback) Line 507	C++
 	OpenNet.exe!winrt::Microsoft::UI::Xaml::Application::Start::__l2::<lambda_1>::operator()(const winrt::Microsoft::UI::Xaml::IApplicationStatics & f) Line 22894	C++
 	OpenNet.exe!winrt::impl::factory_cache_entry<winrt::Microsoft::UI::Xaml::Application,winrt::Microsoft::UI::Xaml::IApplicationStatics>::call<`winrt::Microsoft::UI::Xaml::Application::Start'::`2'::<lambda_1> &>(winrt::Microsoft::UI::Xaml::Application::Start::__l2::<lambda_1> & callback) Line 6442	C++
 	OpenNet.exe!winrt::impl::call_factory<winrt::Microsoft::UI::Xaml::Application,winrt::Microsoft::UI::Xaml::IApplicationStatics,`winrt::Microsoft::UI::Xaml::Application::Start'::`2'::<lambda_1>>(winrt::Microsoft::UI::Xaml::Application::Start::__l2::<lambda_1> && callback) Line 6464	C++
 	OpenNet.exe!winrt::Microsoft::UI::Xaml::Application::Start(const winrt::Microsoft::UI::Xaml::ApplicationInitializationCallback & callback) Line 22894	C++
 	OpenNet.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 176	C++
 	OpenNet.exe!invoke_main() Line 123	C++
 	OpenNet.exe!__scrt_common_main_seh() Line 288	C++
 	OpenNet.exe!__scrt_common_main() Line 331	C++
 	OpenNet.exe!wWinMainCRTStartup(void * __formal) Line 17	C++
 	kernel32.dll!BaseThreadInitThunk()	Unknown
 	ntdll.dll!RtlUserThreadStart()	Unknown

And the call stack is waitting for ui but the UI was froze if you call break all

 	[Application execution paused, double-click to view all thread stacks]	
>	ntdll.dll!NtWaitForSingleObject()	Unknown
 	KernelBase.dll!WaitForSingleObjectEx()	Unknown
 	nvwgf2umx.dll!00007fffaec8b64f()	Unknown
 	nvwgf2umx.dll!00007fffaf207126()	Unknown
 	kernel32.dll!BaseThreadInitThunk()	Unknown
 	ntdll.dll!RtlUserThreadStart()	Unknown

I'm not sure which part caused this issue, but I had already carefully checked my code by making the settings page a blank NavigationView frame page, and it can still be encountered.
You'll meet this each time when you navigate to settings page if you enable VS's Debugging>xaml hot reload function.
Image
But you'll hardly meet if you turn off it but still can encounter it if you are not in VS or is released mode.

Why is this important?

Navigation will fail and the app crashed.

Steps to reproduce the bug

I think the issue is hard to reproduce in a blank project. So you can directly use my app under development.

Actual behavior

No response

Expected behavior

No response

Screenshots

Check all break when throw it's like
Image
But it's hard to reprduce by start in windows' app list.
The window froze here:
Image

NuGet package version

2.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions