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

Reentrancy crash destroying a TextBox due to its ShutdownTextServices() call #9070

Closed
e0ff opened this issue Nov 10, 2023 · 8 comments
Closed
Labels
area-TextBox TextBox, RichEditBox bug Something isn't working closed-Fixed Described behavior has been fixed. team-Controls Issue for the Controls team
Milestone

Comments

@e0ff
Copy link

e0ff commented Nov 10, 2023

Describe the bug

Stowed exception thrown after navigating back resulting in the app crashing.

This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(36ac.163c): Unknown exception - code c000027b (first/second chance not available)
For analysis of this file, run !analyze -v
KERNELBASE!RaiseFailFastException+0x152:
00007ffe`9b3cc242 0f1f440000      nop     dword ptr [rax+rax]
0:000> !pde.dse
=========================================================================================
 PDE v11.3 - Copyright 2017 Andrew Richards
=========================================================================================
Stowed Exception Array @ 0x00000238506eb950

Stowed Exception #1 @ 0x00000238527092b8
	0x8000FFFF (FACILITY_NULL - Default): E_UNEXPECTED - Unexpected failure

	Stack	 : 0x238527082a0
		7ffe5e0193a3 Microsoft_ui_xaml!CXcpDispatcher::OnReentrancyProtectedWindowMessage+0x93
		7ffe5e0188f2 Microsoft_ui_xaml!CXcpDispatcher::WindowProc+0xa2
		7ffe5e07ae59 Microsoft_ui_xaml!CDeferredInvoke::DispatchQueuedMessage+0x39
		7ffe5e07adad Microsoft_ui_xaml!CXcpDispatcher::MessageTimerCallback+0x5d
		7ffe5e162cbd Microsoft_ui_xaml!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'::`68'::<lambda_1> &,1,ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *,IInspectable *>::Invoke+0xd
		7ffe73c43588 CoreMessagingXP!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl Windows::Foundation::ITypedEventHandler_impl<Windows::Foundation::Internal::AggregateType<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64>,IInspectable * __ptr64>::*)(Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64,IInspectable * __ptr64) __ptr64>::DelegateInvokeHelper<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<2>,Windows::Foundation::ITypedEventHandler<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,IInspectable * __ptr64>,Microsoft::WRL::FtmBase>,<lambda_82cf8073f4f042d1a68771c460cb9f49>,-1,Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64,IInspectable * __ptr64>::Invoke+0xa8
		7ffe73c4378e CoreMessagingXP!Microsoft::WRL::InvokeTraits<-2>::InvokeDelegates<<lambda_1e854da9c9ccd42f6138c3b007a32877>,Windows::Foundation::ITypedEventHandler<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,IInspectable * __ptr64> >+0x8e
		7ffe73c4335b CoreMessagingXP!Microsoft::UI::Dispatching::DispatcherQueueTimer::TimerCallback+0xdb
		7ffe73c1e748 CoreMessagingXP!CFlat::SehSafe::Execute<<lambda_654db17c35df07198786f0867aa10de6> >+0x2c
		7ffe73c1e61b CoreMessagingXP!Microsoft::CoreUI::Dispatch::TimeoutHandler::ImportAdapter$+0x5b
		7ffe73bde0a7 CoreMessagingXP!Microsoft::CoreUI::Dispatch::TimeoutManager::Callback_OnDispatch+0x1a7
		7ffe73bc90d4 CoreMessagingXP!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchNextItem+0x1e4
		7ffe73bc8963 CoreMessagingXP!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchLoop+0x1b3
		7ffe73bbed73 CoreMessagingXP!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop+0x16b
		7ffe73bc15ea CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DrainCoreMessagingQueue+0x15a
		7ffe73bc1aeb CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch+0x97
		7ffe73bc19f4 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatchRaw+0x80
		7ffe73bfe56d CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DoWork+0x59
		7ffe73bfe4f2 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::HandleDispatchNotifyMessage+0x13e
		7ffe73bfe3a3 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::WindowProc+0x73
		7ffe9c988241 user32!UserCallWinProcCheckWow+0x2d1
		7ffe9c987efc user32!DispatchClientMessage+0x9c
		7ffe9c99302d user32!_fnDWORD+0x3d
		7ffe9dc33434 ntdll!KiUserCallbackDispatcherContinue+0x0
		7ffe9b1214d4 win32u!NtUserPeekMessage+0x14
		7ffe9c991b4f user32!_PeekMessage+0x3f
		7ffe9c991a1c user32!PeekMessageW+0x9c
		7ffe9bac3dcf combase!CCliModalLoop::MyPeekMessage+0x53
		7ffe9bac3d39 combase!CCliModalLoop::PeekRPCAndDDEMessage+0x49
		7ffe9bac357c combase!CCliModalLoop::BlockFn+0x1ec
		7ffe9bac3351 combase!ModalLoop+0xd1
		7ffe9bac2cef combase!ClassicSTAThreadDispatchCrossApartmentCall+0x5f
		7ffe9badb365 combase!CSyncClientCall::SendReceive2+0x825
		7ffe9bac3811 combase!SyncClientCallRetryContext::SendReceiveWithRetry+0x51
		7ffe9bac3778 combase!CSyncClientCall::SendReceiveInRetryContext+0x44
		7ffe9bac2fcd combase!ClassicSTAThreadSendReceive+0x5d
		7ffe9bb3db7c combase!CSyncClientCall::SendReceive+0x1bc
		7ffe9bafef58 combase!CClientChannel::SendReceive+0x98
		7ffe9bb63448 combase!NdrExtpProxySendReceive+0x58
		7ffe9c92241e rpcrt4!NdrpClientCall3+0x3de
		7ffe9bb5ea8c combase!ObjectStublessClient+0x14c
		7ffe9bbdba52 combase!ObjectStubless+0x42
		7ffe9bafe966 combase!CStdMarshal::DisconnectCliIPIDs+0x816
		7ffe9bb48405 combase!CStdMarshal::DisconnectWorker_ReleasesLock+0x265
		7ffe9bb4a6c3 combase!CStdMarshal::Disconnect+0xe3
		7ffe9bb4d23b combase!CStdIdentity::CInternalUnk::Release+0x30b
		7ffe590c6111 WinUIEdit!CSpellerGlobalState::RemoveSpellCheckingResources+0xb1
		7ffe590c3733 WinUIEdit!CSpellerGlobalState::~CSpellerGlobalState+0x63
		7ffe590c6026 WinUIEdit!CSpellerGlobalState::Release+0x26
		7ffe590c1cdb WinUIEdit!CSpellCheckerEngine::Release+0x11b
		7ffe590b62d6 WinUIEdit!CSpellChecker::~CSpellChecker+0x46
		7ffe58ea97ba WinUIEdit!CTxtEdit::~CTxtEdit+0xc6
		7ffe58ea96d4 WinUIEdit!CTxtEdit::`vector deleting destructor'+0x14
		7ffe58e5d4f5 WinUIEdit!CCallMgrCenter::ExitContext+0x20d
		7ffe58eb1418 WinUIEdit!CTxtEdit::CUnknown::Release+0xb8
		7ffe58eaa438 WinUIEdit!CTxtEdit::Release+0x18
		7ffe58f2a77e WinUIEdit!ShutdownTextServices+0x8e
		7ffe5e36f91c Microsoft_ui_xaml!CTextBoxBase::Destroy+0x254
		7ffe5e847c5c Microsoft_ui_xaml!CTextBox::~CTextBox+0x18
		7ffe5e847ca4 Microsoft_ui_xaml!CTextBox::`scalar deleting destructor'+0x14
		7ffe5df0e91e Microsoft_ui_xaml!CDependencyObject::Release+0x9e
		7ffe5df9cdce Microsoft_ui_xaml!CDOCollection::Neat+0x22e
		7ffe5df998c8 Microsoft_ui_xaml!CCollection::Destroy+0x18
		7ffe5dfbdc0d Microsoft_ui_xaml!CCollection::Clear+0x1d
		7ffe5dfbda69 Microsoft_ui_xaml!CUIElementCollection::RemoveAllElements+0x65
		7ffe5df4208b Microsoft_ui_xaml!CUIElement::~CUIElement+0x2cb
		7ffe5df40bbe Microsoft_ui_xaml!CFrameworkElement::~CFrameworkElement+0xce
		7ffe5df3f064 Microsoft_ui_xaml!CGrid::`scalar deleting destructor'+0x14
		7ffe5df0e91e Microsoft_ui_xaml!CDependencyObject::Release+0x9e
		7ffe5df9cdce Microsoft_ui_xaml!CDOCollection::Neat+0x22e
		7ffe5df998c8 Microsoft_ui_xaml!CCollection::Destroy+0x18
		7ffe5dfbdc0d Microsoft_ui_xaml!CCollection::Clear+0x1d
		7ffe5dfbda69 Microsoft_ui_xaml!CUIElementCollection::RemoveAllElements+0x65
		7ffe5df4208b Microsoft_ui_xaml!CUIElement::~CUIElement+0x2cb
		7ffe5df40bbe Microsoft_ui_xaml!CFrameworkElement::~CFrameworkElement+0xce
		7ffe5e1476b4 Microsoft_ui_xaml!CAppBarSeparator::`scalar deleting destructor'+0x14
		7ffe5df0e91e Microsoft_ui_xaml!CDependencyObject::Release+0x9e
		7ffe5df9cdce Microsoft_ui_xaml!CDOCollection::Neat+0x22e
		7ffe5df998c8 Microsoft_ui_xaml!CCollection::Destroy+0x18
		7ffe5dfbdc0d Microsoft_ui_xaml!CCollection::Clear+0x1d
		7ffe5dfbda69 Microsoft_ui_xaml!CUIElementCollection::RemoveAllElements+0x65
		7ffe5df4208b Microsoft_ui_xaml!CUIElement::~CUIElement+0x2cb
		7ffe5df40bbe Microsoft_ui_xaml!CFrameworkElement::~CFrameworkElement+0xce
		7ffe5df3fe14 Microsoft_ui_xaml!CStackPanel::`scalar deleting destructor'+0x14
		7ffe5df0e91e Microsoft_ui_xaml!CDependencyObject::Release+0x9e
		7ffe5df9cdce Microsoft_ui_xaml!CDOCollection::Neat+0x22e
		7ffe5df998c8 Microsoft_ui_xaml!CCollection::Destroy+0x18
		7ffe5dfbdc0d Microsoft_ui_xaml!CCollection::Clear+0x1d
		7ffe5dfbda69 Microsoft_ui_xaml!CUIElementCollection::RemoveAllElements+0x65
		7ffe5df4208b Microsoft_ui_xaml!CUIElement::~CUIElement+0x2cb
		7ffe5df40bbe Microsoft_ui_xaml!CFrameworkElement::~CFrameworkElement+0xce
		7ffe5e0af634 Microsoft_ui_xaml!CScrollContentPresenter::`scalar deleting destructor'+0x14
		7ffe5df0e91e Microsoft_ui_xaml!CDependencyObject::Release+0x9e
		7ffe5df9cdce Microsoft_ui_xaml!CDOCollection::Neat+0x22e
		7ffe5df998c8 Microsoft_ui_xaml!CCollection::Destroy+0x18
		7ffe5dfbdc0d Microsoft_ui_xaml!CCollection::Clear+0x1d
		7ffe5dfbda69 Microsoft_ui_xaml!CUIElementCollection::RemoveAllElements+0x65
		7ffe5df4208b Microsoft_ui_xaml!CUIElement::~CUIElement+0x2cb
		7ffe5df40bbe Microsoft_ui_xaml!CFrameworkElement::~CFrameworkElement+0xce
		7ffe5df3f064 Microsoft_ui_xaml!CGrid::`scalar deleting destructor'+0x14
		7ffe5df0e91e Microsoft_ui_xaml!CDependencyObject::Release+0x9e
		7ffe5df7a83d Microsoft_ui_xaml!DirectUI::DependencyObject::DisconnectFrameworkPeerCore+0x9d
		7ffe5def8ebd Microsoft_ui_xaml!DirectUI::DependencyObject::OnFinalRelease+0x1fd
		7ffe5e049db2 Microsoft_ui_xaml!ctl::ComBase::ReleaseImpl+0x72
		7ffe5e029cac Microsoft_ui_xaml!DirectUI::UIAffinityReleaseQueue::DoCleanup+0xfc
		7ffe5e029b8e Microsoft_ui_xaml!DirectUI::UIAffinityReleaseQueue::BuildTree+0x1e
		7ffe5def39dc Microsoft_ui_xaml!DirectUI::BuildTreeService::BuildTrees+0x16c
		7ffe5def3797 Microsoft_ui_xaml!AgCoreCallbacks::FrameworkCallbacks_PhasedWorkDistributor_PerformWork+0x67
		7ffe5dfa224f Microsoft_ui_xaml!CCoreServices::NWDrawTree+0x52f
		7ffe5dfa3c1a Microsoft_ui_xaml!CCoreServices::NWDrawMainTree+0x14a
		7ffe5dfa3a8d Microsoft_ui_xaml!CWindowRenderTarget::Draw+0x6d
		7ffe5dfa39c9 Microsoft_ui_xaml!CXcpBrowserHost::OnTick+0x59
		7ffe5e01961a Microsoft_ui_xaml!CXcpDispatcher::Tick+0x8a
		7ffe5e01953c Microsoft_ui_xaml!CXcpDispatcher::OnReentrancyProtectedWindowMessage+0x22c
		7ffe5e0188f2 Microsoft_ui_xaml!CXcpDispatcher::WindowProc+0xa2
		7ffe5e07ae59 Microsoft_ui_xaml!CDeferredInvoke::DispatchQueuedMessage+0x39
		7ffe5e07adad Microsoft_ui_xaml!CXcpDispatcher::MessageTimerCallback+0x5d
		7ffe5e162cbd Microsoft_ui_xaml!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'::`68'::<lambda_1> &,1,ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *,IInspectable *>::Invoke+0xd
		7ffe73c43588 CoreMessagingXP!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl Windows::Foundation::ITypedEventHandler_impl<Windows::Foundation::Internal::AggregateType<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64>,IInspectable * __ptr64>::*)(Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64,IInspectable * __ptr64) __ptr64>::DelegateInvokeHelper<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<2>,Windows::Foundation::ITypedEventHandler<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,IInspectable * __ptr64>,Microsoft::WRL::FtmBase>,<lambda_82cf8073f4f042d1a68771c460cb9f49>,-1,Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64,IInspectable * __ptr64>::Invoke+0xa8
		7ffe73c4378e CoreMessagingXP!Microsoft::WRL::InvokeTraits<-2>::InvokeDelegates<<lambda_1e854da9c9ccd42f6138c3b007a32877>,Windows::Foundation::ITypedEventHandler<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,IInspectable * __ptr64> >+0x8e
		7ffe73c4335b CoreMessagingXP!Microsoft::UI::Dispatching::DispatcherQueueTimer::TimerCallback+0xdb
		7ffe73c1e748 CoreMessagingXP!CFlat::SehSafe::Execute<<lambda_654db17c35df07198786f0867aa10de6> >+0x2c
		7ffe73c1e61b CoreMessagingXP!Microsoft::CoreUI::Dispatch::TimeoutHandler::ImportAdapter$+0x5b
		7ffe73bde0a7 CoreMessagingXP!Microsoft::CoreUI::Dispatch::TimeoutManager::Callback_OnDispatch+0x1a7
		7ffe73bc90d4 CoreMessagingXP!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchNextItem+0x1e4
		7ffe73bc8963 CoreMessagingXP!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchLoop+0x1b3
		7ffe73bbed73 CoreMessagingXP!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop+0x16b
		7ffe73bc15ea CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DrainCoreMessagingQueue+0x15a
		7ffe73bc1aeb CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch+0x97
		7ffe73bc19f4 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatchRaw+0x80
		7ffe73bfe56d CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DoWork+0x59
		7ffe73bfe4f2 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::HandleDispatchNotifyMessage+0x13e
		7ffe73bfe3a3 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::WindowProc+0x73
		7ffe9c988241 user32!UserCallWinProcCheckWow+0x2d1
		7ffe9c987efc user32!DispatchClientMessage+0x9c
		7ffe9c99302d user32!_fnDWORD+0x3d
		7ffe9dc33434 ntdll!KiUserCallbackDispatcherContinue+0x0
		7ffe9b121534 win32u!NtUserGetMessage+0x14
		7ffe9c99535a user32!GetMessageW+0x2a
		7ffe5e116178 Microsoft_ui_xaml!DirectUI::FrameworkApplication::RunDesktopWindowMessageLoop+0x3c
		7ffe5e0d08b6 Microsoft_ui_xaml!DirectUI::FrameworkApplication::StartDesktop+0x346
		7ffe5e02fc2e Microsoft_ui_xaml!DirectUI::FrameworkApplicationFactory::Start+0x6e
		7ffe00f1067d

Stowed Exception #2 @ 0x0000023851cba068
	0x80070490 (FACILITY_WIN32 - Win32 Undecorated Error Codes): Element not found.

	Stack	 : 0x23851cb9050
		7ffe5e3a207c Microsoft_ui_xaml!CUIAWindow::get_HostRawElementProvider+0xec
		7ffe7708ea4b uiautomationcore!UiaUtils::EntryPointFromImmediateProvider+0x7b
		7ffe7708f905 uiautomationcore!UiaUtils::GetFragmentRootWithHostProviderEntryPoint+0xe5
		7ffe770887b2 uiautomationcore!GetProviderEventInfo+0x82
		7ffe770965bc uiautomationcore!UiaRaiseAutomationPropertyChangedEvent+0x2cc
		7ffe5e3a1210 Microsoft_ui_xaml!CUIAWindow::UIARaiseAutomationPropertyChangedEvent+0x180
		7ffe5e299e5b Microsoft_ui_xaml!CCoreServices::UIARaiseAutomationPropertyChangedEvent+0x53
		7ffe5e5b604a Microsoft_ui_xaml!DirectUI::AutomationPeer::RaisePropertyChangedEvent+0x42
		7ffe5e5b630b Microsoft_ui_xaml!DirectUI::AutomationPeer::RaisePropertyChangedEventImpl+0x12f
		7ffe5e45fa7c Microsoft_ui_xaml!DirectUI::AutomationPeerGenerated::RaisePropertyChangedEvent+0xec
		7ffe020b731a

Steps to reproduce the bug

Have not been able to reproduce. Happened on a users computer.

Expected behavior

No crashes.

Screenshots

No response

NuGet package version

WinUI 3 - Windows App SDK 1.4.2: 1.4.231008000

Windows version

No response

Additional context

App is packaged and the user is running Windows 11 23H2.

@e0ff e0ff added the bug Something isn't working label Nov 10, 2023
@e0ff e0ff changed the title Bug title Stowed Exception - Element not found Nov 10, 2023
@codendone codendone changed the title Stowed Exception - Element not found Reentrancy crash destroying a TextBox due to its ShutdownTextServices() call Nov 11, 2023
@codendone
Copy link
Contributor

Thanks for providing the stowed exception stacks, @jhert0! This shows a reentrancy crash triggered by CTextBoxBase::Destroy calling ShutdownTextServices which makes some COM calls:

  7ffe58f2a77e WinUIEdit!ShutdownTextServices+0x8e
  7ffe5e36f91c Microsoft_ui_xaml!CTextBoxBase::Destroy+0x254

This is a mirror of an internal bug found a few days ago where the InitializeTextServices() call can also cause a reentrancy crash. We should make sure both are fixed together.

@codendone codendone added area-TextBox TextBox, RichEditBox team-Controls Issue for the Controls team labels Nov 11, 2023
@e0ff
Copy link
Author

e0ff commented Nov 15, 2023

@codendone Do you guys know when these fixes could be released? We have been encountering a lot of random crashes with our application, the vast majority are either impossible or extremely difficult to reproduce, and most of the crashes dumps are useless because they were before we turned on the full dump and they were generated from stowed exceptions.

@Wandtket
Copy link

Thanks for providing the stowed exception stacks, @jhert0! This shows a reentrancy crash triggered by CTextBoxBase::Destroy calling ShutdownTextServices which makes some COM calls:

  7ffe58f2a77e WinUIEdit!ShutdownTextServices+0x8e
  7ffe5e36f91c Microsoft_ui_xaml!CTextBoxBase::Destroy+0x254

This is a mirror of an internal bug found a few days ago where the InitializeTextServices() call can also cause a reentrancy crash. We should make sure both are fixed together.

Any updates on this issue?

@e0ff
Copy link
Author

e0ff commented Nov 21, 2023

Our user just encountered this again, there are other stowed exceptions that don't look like they are related so I don't know if you want me to open other issues for them but here is the stack trace:

Stowed Exception Array @ 0x000001f5df89f830

Stowed Exception #1 @ 0x000001f5db3de868
	0x8000FFFF (FACILITY_NULL - Default): E_UNEXPECTED - Unexpected failure

	Stack	 : 0x1f5db3dd850
		7ffdd52a1873 Microsoft_ui_xaml!CXcpDispatcher::OnReentrancyProtectedWindowMessage+0x93
		7ffdd52a0de2 Microsoft_ui_xaml!CXcpDispatcher::WindowProc+0xa2
		7ffdd5327229 Microsoft_ui_xaml!CDeferredInvoke::DispatchQueuedMessage+0x39
		7ffdd532717d Microsoft_ui_xaml!CXcpDispatcher::MessageTimerCallback+0x5d
		7ffdd5410fcd Microsoft_ui_xaml!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'::`68'::<lambda_1> &,1,ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *,IInspectable *>::Invoke+0xd
		7ffe40e03588 CoreMessagingXP!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl Windows::Foundation::ITypedEventHandler_impl<Windows::Foundation::Internal::AggregateType<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64>,IInspectable * __ptr64>::*)(Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64,IInspectable * __ptr64) __ptr64>::DelegateInvokeHelper<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<2>,Windows::Foundation::ITypedEventHandler<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,IInspectable * __ptr64>,Microsoft::WRL::FtmBase>,<lambda_82cf8073f4f042d1a68771c460cb9f49>,-1,Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64,IInspectable * __ptr64>::Invoke+0xa8
		7ffe40e0378e CoreMessagingXP!Microsoft::WRL::InvokeTraits<-2>::InvokeDelegates<<lambda_1e854da9c9ccd42f6138c3b007a32877>,Windows::Foundation::ITypedEventHandler<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,IInspectable * __ptr64> >+0x8e
		7ffe40e0335b CoreMessagingXP!Microsoft::UI::Dispatching::DispatcherQueueTimer::TimerCallback+0xdb
		7ffe40dde748 CoreMessagingXP!CFlat::SehSafe::Execute<<lambda_654db17c35df07198786f0867aa10de6> >+0x2c
		7ffe40dde61b CoreMessagingXP!Microsoft::CoreUI::Dispatch::TimeoutHandler::ImportAdapter$+0x5b
		7ffe40d9e0a7 CoreMessagingXP!Microsoft::CoreUI::Dispatch::TimeoutManager::Callback_OnDispatch+0x1a7
		7ffe40d890d4 CoreMessagingXP!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchNextItem+0x1e4
		7ffe40d88963 CoreMessagingXP!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchLoop+0x1b3
		7ffe40d7ed73 CoreMessagingXP!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop+0x16b
		7ffe40d815ea CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DrainCoreMessagingQueue+0x15a
		7ffe40d81aeb CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch+0x97
		7ffe40d819f4 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatchRaw+0x80
		7ffe40dbe56d CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DoWork+0x59
		7ffe40dbe4f2 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::HandleDispatchNotifyMessage+0x13e
		7ffe40dbe3a3 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::WindowProc+0x73
		7ffe9c988241 user32!UserCallWinProcCheckWow+0x2d1
		7ffe9c987efc user32!DispatchClientMessage+0x9c
		7ffe9c99302d user32!_fnDWORD+0x3d
		7ffe9dc33434 ntdll!KiUserCallbackDispatcherContinue+0x0
		7ffe9b1214d4 win32u!NtUserPeekMessage+0x14
		7ffe9c991b4f user32!_PeekMessage+0x3f
		7ffe9c991a1c user32!PeekMessageW+0x9c
		7ffe9bac3dcf combase!CCliModalLoop::MyPeekMessage+0x53
		7ffe9bac3d39 combase!CCliModalLoop::PeekRPCAndDDEMessage+0x49
		7ffe9bac357c combase!CCliModalLoop::BlockFn+0x1ec
		7ffe9bac3351 combase!ModalLoop+0xd1
		7ffe9bac2cef combase!ClassicSTAThreadDispatchCrossApartmentCall+0x5f
		7ffe9badb365 combase!CSyncClientCall::SendReceive2+0x825
		7ffe9bac3811 combase!SyncClientCallRetryContext::SendReceiveWithRetry+0x51
		7ffe9bac3778 combase!CSyncClientCall::SendReceiveInRetryContext+0x44
		7ffe9bac2fcd combase!ClassicSTAThreadSendReceive+0x5d
		7ffe9bb3db7c combase!CSyncClientCall::SendReceive+0x1bc
		7ffe9bafef58 combase!CClientChannel::SendReceive+0x98
		7ffe9bb63448 combase!NdrExtpProxySendReceive+0x58
		7ffe9c92241e rpcrt4!NdrpClientCall3+0x3de
		7ffe9bb5ea8c combase!ObjectStublessClient+0x14c
		7ffe9bbdba52 combase!ObjectStubless+0x42
		7ffe9bafe966 combase!CStdMarshal::DisconnectCliIPIDs+0x816
		7ffe9bb48405 combase!CStdMarshal::DisconnectWorker_ReleasesLock+0x265
		7ffe9bb4a6c3 combase!CStdMarshal::Disconnect+0xe3
		7ffe9bb4d23b combase!CStdIdentity::CInternalUnk::Release+0x30b
		7ffda6b86111 WinUIEdit!CSpellerGlobalState::RemoveSpellCheckingResources+0xb1
		7ffda6b83733 WinUIEdit!CSpellerGlobalState::~CSpellerGlobalState+0x63
		7ffda6b86026 WinUIEdit!CSpellerGlobalState::Release+0x26
		7ffda6b81cdb WinUIEdit!CSpellCheckerEngine::Release+0x11b
		7ffda6b762d6 WinUIEdit!CSpellChecker::~CSpellChecker+0x46
		7ffda69697ba WinUIEdit!CTxtEdit::~CTxtEdit+0xc6
		7ffda69696d4 WinUIEdit!CTxtEdit::`vector deleting destructor'+0x14
		7ffda691d4f5 WinUIEdit!CCallMgrCenter::ExitContext+0x20d
		7ffda6971418 WinUIEdit!CTxtEdit::CUnknown::Release+0xb8
		7ffda696a438 WinUIEdit!CTxtEdit::Release+0x18
		7ffda69ea77e WinUIEdit!ShutdownTextServices+0x8e
		7ffdd560cfe8 Microsoft_ui_xaml!CTextBoxBase::Destroy+0x254
		7ffdd5ae1c80 Microsoft_ui_xaml!CTextBox::~CTextBox+0x18
		7ffdd5ae1cc4 Microsoft_ui_xaml!CTextBox::`scalar deleting destructor'+0x14
		7ffdd51bb14a Microsoft_ui_xaml!CDependencyObject::Release+0x9a
		7ffdd5217962 Microsoft_ui_xaml!DirectUI::DependencyObject::DisconnectFrameworkPeerCore+0xa2
		7ffdd59e81a6 Microsoft_ui_xaml!DirectUI::TextBox::DisconnectFrameworkPeerCore+0x16
		7ffdd51fceaa Microsoft_ui_xaml!DirectUI::DependencyObject::OnFinalRelease+0x1fa
		7ffdd52dd9d2 Microsoft_ui_xaml!ctl::ComBase::ReleaseImpl+0x72
		7ffdd52a6f29 Microsoft_ui_xaml!DirectUI::TrackerTargetReference::Clear+0x1a9
		7ffdd5b169bf Microsoft_ui_xaml!DirectUI::AutoSuggestBox::~AutoSuggestBox+0x433
		7ffdd58aa218 Microsoft_ui_xaml!ctl::ComObject<DirectUI::AutoSuggestBox>::`scalar deleting destructor'+0x18
		7ffdd51fcecc Microsoft_ui_xaml!DirectUI::DependencyObject::OnFinalRelease+0x21c
		7ffdd52dd9d2 Microsoft_ui_xaml!ctl::ComBase::ReleaseImpl+0x72
		7ffdd520d332 Microsoft_ui_xaml!DirectUI::UIAffinityReleaseQueue::DoCleanup+0x22e
		7ffdd520d7ce Microsoft_ui_xaml!DirectUI::UIAffinityReleaseQueue::BuildTree+0x1e
		7ffdd518cef4 Microsoft_ui_xaml!DirectUI::BuildTreeService::BuildTrees+0x1b4
		7ffdd518cc67 Microsoft_ui_xaml!AgCoreCallbacks::FrameworkCallbacks_PhasedWorkDistributor_PerformWork+0x67
		7ffdd51c3f1c Microsoft_ui_xaml!CCoreServices::NWDrawTree+0x52c
		7ffdd51c2408 Microsoft_ui_xaml!CCoreServices::NWDrawMainTree+0x148
		7ffdd51c227d Microsoft_ui_xaml!CWindowRenderTarget::Draw+0x6d
		7ffdd51c21b9 Microsoft_ui_xaml!CXcpBrowserHost::OnTick+0x59
		7ffdd52a1aea Microsoft_ui_xaml!CXcpDispatcher::Tick+0x8a
		7ffdd52a1a0c Microsoft_ui_xaml!CXcpDispatcher::OnReentrancyProtectedWindowMessage+0x22c
		7ffdd52a0de2 Microsoft_ui_xaml!CXcpDispatcher::WindowProc+0xa2
		7ffdd5327229 Microsoft_ui_xaml!CDeferredInvoke::DispatchQueuedMessage+0x39
		7ffdd532717d Microsoft_ui_xaml!CXcpDispatcher::MessageTimerCallback+0x5d
		7ffdd5410fcd Microsoft_ui_xaml!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'::`68'::<lambda_1> &,1,ABI::Microsoft::UI::Dispatching::IDispatcherQueueTimer *,IInspectable *>::Invoke+0xd
		7ffe40e03588 CoreMessagingXP!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl Windows::Foundation::ITypedEventHandler_impl<Windows::Foundation::Internal::AggregateType<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64>,IInspectable * __ptr64>::*)(Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64,IInspectable * __ptr64) __ptr64>::DelegateInvokeHelper<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<2>,Windows::Foundation::ITypedEventHandler<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,IInspectable * __ptr64>,Microsoft::WRL::FtmBase>,<lambda_82cf8073f4f042d1a68771c460cb9f49>,-1,Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64,IInspectable * __ptr64>::Invoke+0xa8
		7ffe40e0378e CoreMessagingXP!Microsoft::WRL::InvokeTraits<-2>::InvokeDelegates<<lambda_1e854da9c9ccd42f6138c3b007a32877>,Windows::Foundation::ITypedEventHandler<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,IInspectable * __ptr64> >+0x8e
		7ffe40e0335b CoreMessagingXP!Microsoft::UI::Dispatching::DispatcherQueueTimer::TimerCallback+0xdb
		7ffe40dde748 CoreMessagingXP!CFlat::SehSafe::Execute<<lambda_654db17c35df07198786f0867aa10de6> >+0x2c
		7ffe40dde61b CoreMessagingXP!Microsoft::CoreUI::Dispatch::TimeoutHandler::ImportAdapter$+0x5b
		7ffe40d9e0a7 CoreMessagingXP!Microsoft::CoreUI::Dispatch::TimeoutManager::Callback_OnDispatch+0x1a7
		7ffe40d890d4 CoreMessagingXP!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchNextItem+0x1e4
		7ffe40d88963 CoreMessagingXP!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchLoop+0x1b3
		7ffe40d7ed73 CoreMessagingXP!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop+0x16b
		7ffe40d815ea CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DrainCoreMessagingQueue+0x15a
		7ffe40d81aeb CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch+0x97
		7ffe40d819f4 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatchRaw+0x80
		7ffe40dbe56d CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DoWork+0x59
		7ffe40dbe4f2 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::HandleDispatchNotifyMessage+0x13e
		7ffe40dbe3a3 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::WindowProc+0x73
		7ffe9c988241 user32!UserCallWinProcCheckWow+0x2d1
		7ffe9c987efc user32!DispatchClientMessage+0x9c
		7ffe9c99302d user32!_fnDWORD+0x3d
		7ffe9dc33434 ntdll!KiUserCallbackDispatcherContinue+0x0
		7ffe9b121534 win32u!NtUserGetMessage+0x14
		7ffe9c99535a user32!GetMessageW+0x2a
		7ffdd53c3e7c Microsoft_ui_xaml!DirectUI::FrameworkApplication::RunDesktopWindowMessageLoop+0x3c
		7ffdd537e486 Microsoft_ui_xaml!DirectUI::FrameworkApplication::StartDesktop+0x346
		7ffdd532ff8e Microsoft_ui_xaml!DirectUI::FrameworkApplicationFactory::Start+0x6e
		7ffd6fc506dd

Stowed Exception #2 @ 0x000001f5db3dac68
	0x80070490 (FACILITY_WIN32 - Win32 Undecorated Error Codes): Element not found.

	Stack	 : 0x1f5db3d9c50
		7ffdd563fa3c Microsoft_ui_xaml!CUIAWindow::get_HostRawElementProvider+0xec
		7ffe7708ea4b uiautomationcore!UiaUtils::EntryPointFromImmediateProvider+0x7b
		7ffe7708f905 uiautomationcore!UiaUtils::GetFragmentRootWithHostProviderEntryPoint+0xe5
		7ffe770887b2 uiautomationcore!GetProviderEventInfo+0x82
		7ffe770965bc uiautomationcore!UiaRaiseAutomationPropertyChangedEvent+0x2cc
		7ffdd563ebd0 Microsoft_ui_xaml!CUIAWindow::UIARaiseAutomationPropertyChangedEvent+0x180
		7ffdd55381fb Microsoft_ui_xaml!CCoreServices::UIARaiseAutomationPropertyChangedEvent+0x53
		7ffdd5851e5a Microsoft_ui_xaml!DirectUI::AutomationPeer::RaisePropertyChangedEvent+0x42
		7ffdd5852140 Microsoft_ui_xaml!DirectUI::AutomationPeer::RaisePropertyChangedEventImpl+0x154
		7ffdd56fbfcc Microsoft_ui_xaml!DirectUI::AutomationPeerGenerated::RaisePropertyChangedEvent+0xec
		7ffd70e0dd4a

Stowed Exception #3 @ 0x000001f5db3d8e68
	0x80004005 (FACILITY_NULL - Default): E_FAIL - Unspecified failure

	Stack	 : 0x1f5db3d7e50
		7ffdd592ab25 Microsoft_ui_xaml!DirectUI::DynamicValueConverter::ConvertBack+0xf5
		7ffdd591d2c4 Microsoft_ui_xaml!DirectUI::BindingExpression::UpdateSourceInternal+0x450
		7ffdd551934c Microsoft_ui_xaml!DirectUI::BindingExpression::TargetChanged+0x140e5c
		7ffdd53d84e2 Microsoft_ui_xaml!DirectUI::BindingExpressionDPChangedHandler::Invoke+0x32
		7ffdd52902dc Microsoft_ui_xaml!DirectUI::CEventSourceBase<DirectUI::IDPChangedEventSource,DirectUI::IDPChangedEventHandler,ABI::Microsoft::UI::Xaml::IDependencyObject,CDependencyProperty const >::Raise+0x12c
		7ffdd5290134 Microsoft_ui_xaml!DirectUI::FrameworkElement::OnPropertyChanged2+0xc4
		7ffdd528fd7a Microsoft_ui_xaml!DirectUI::Control::OnPropertyChanged2+0x1a
		7ffdd528fc42 Microsoft_ui_xaml!DirectUI::ContentControl::OnPropertyChanged2+0x32
		7ffdd528fb62 Microsoft_ui_xaml!DirectUI::ButtonBase::OnPropertyChanged2+0x32
		7ffdd599c315 Microsoft_ui_xaml!DirectUI::ToggleButton::OnPropertyChanged2+0x35
		7ffdd51ca2a2 Microsoft_ui_xaml!DirectUI::DependencyObject::NotifyPropertyChanged+0x72
		7ffdd51cc6a5 Microsoft_ui_xaml!CDependencyObject::SetEffectiveValue+0x5c5
		7ffdd51cd0f7 Microsoft_ui_xaml!CDependencyObject::UpdateEffectiveValue+0xe7
		7ffdd51ccee6 Microsoft_ui_xaml!CDependencyObject::SetValue+0xb6
		7ffdd522be48 Microsoft_ui_xaml!CUIElement::SetValue+0x198
		7ffdd522b557 Microsoft_ui_xaml!CFrameworkElement::SetValue+0xa7
		7ffdd522b391 Microsoft_ui_xaml!CControl::SetValue+0x41
		7ffdd522ad44 Microsoft_ui_xaml!CContentControl::SetValue+0x74
		7ffdd529250c Microsoft_ui_xaml!DirectUI::DependencyObject::SetValueCore+0x2fc
		7ffdd532e05e Microsoft_ui_xaml!DirectUI::DependencyObject::SetValueByKnownIndex+0x8e
		7ffdd532df24 Microsoft_ui_xaml!DirectUI::DependencyObject::SetAttachedValueByKnownIndex<ABI::Microsoft::UI::Xaml::Controls::IToolTip *>+0x34
		7ffd6fc54dd4

Stowed Exception #4 @ 0x000001f5c54eefd8
	0x80004003 (FACILITY_NULL - Default): E_POINTER - Pointer that is not valid

	Stack	 : 0x1f5c54edfc0
		7ffdd592b240 Microsoft_ui_xaml!DirectUI::StringToUriValueConverter::Convert+0xb0
		7ffdd529f499 Microsoft_ui_xaml!DirectUI::DynamicValueConverter::Convert+0x129
		7ffdd517abf8 Microsoft_ui_xaml!DirectUI::BindingExpression::ConvertToTarget+0x364
		7ffdd517a669 Microsoft_ui_xaml!DirectUI::BindingExpression::GetValue+0xa9
		7ffdd535f6d7 Microsoft_ui_xaml!DirectUI::DependencyObject::EvaluateBaseValue+0xc3
		7ffdd535f5f3 Microsoft_ui_xaml!DirectUI::DependencyObject::EvaluateEffectiveValue+0x3f
		7ffdd518df83 Microsoft_ui_xaml!DirectUI::DependencyObject::UpdateEffectiveValue+0xe7
		7ffdd517cd84 Microsoft_ui_xaml!DirectUI::DependencyObject::RefreshExpression_Helper+0x54
		7ffdd517cd25 Microsoft_ui_xaml!DirectUI::DependencyObject::RefreshExpression+0x39
		7ffdd517cca5 Microsoft_ui_xaml!DirectUI::BindingExpression::UpdateTarget+0x61
		7ffdd517cc23 Microsoft_ui_xaml!DirectUI::BindingExpression::RefreshBindingValue+0x23
		7ffdd517cb4b Microsoft_ui_xaml!DirectUI::BindingExpression::InheritanceContextChanged+0x117
		7ffdd517d0d7 Microsoft_ui_xaml!DirectUI::BindingExpressionInheritanceContextChangedHandler::Invoke+0x87
		7ffdd536e585 Microsoft_ui_xaml!DirectUI::CEventSourceBase<DirectUI::IInheritanceContextChangedEventSource,DirectUI::IInheritanceContextChangedEventHandler,DirectUI::DependencyObject,IInspectable>::Raise+0x81
		7ffdd536e4f7 Microsoft_ui_xaml!DirectUI::DependencyObject::OnInheritanceContextChanged+0x27
		7ffdd52b74b9 Microsoft_ui_xaml!DirectUI::DXamlCore::RaiseEvent+0xb9
		7ffdd52b7327 Microsoft_ui_xaml!CDependencyObject::NotifyInheritanceContextChanged+0x97
		7ffdd523f7ba Microsoft_ui_xaml!CDependencyObject::EnterImpl+0x28a
		7ffdd53ce33b Microsoft_ui_xaml!CTextElement::EnterImpl+0x3b
		7ffdd55b9322 Microsoft_ui_xaml!CHyperlink::EnterImpl+0x32
		7ffdd519560c Microsoft_ui_xaml!CDependencyObject::Enter+0x12c
		7ffdd5247645 Microsoft_ui_xaml!CDOCollection::ChildEnter+0xd5
		7ffdd53095ce Microsoft_ui_xaml!CDOCollection::EnterImpl+0xce
		7ffdd519560c Microsoft_ui_xaml!CDependencyObject::Enter+0x12c
		7ffdd523f013 Microsoft_ui_xaml!CDependencyObject::EnterObjectProperty+0x63
		7ffdd523f6e4 Microsoft_ui_xaml!CDependencyObject::EnterImpl+0x1b4
		7ffdd5187e6c Microsoft_ui_xaml!CUIElement::EnterImpl+0x28c
		7ffdd5187a2d Microsoft_ui_xaml!CFrameworkElement::EnterImpl+0x8d
		7ffdd51870e2 Microsoft_ui_xaml!CTextBlock::EnterImpl+0x32
		7ffdd519560c Microsoft_ui_xaml!CDependencyObject::Enter+0x12c
		7ffdd5247645 Microsoft_ui_xaml!CDOCollection::ChildEnter+0xd5
		7ffdd53095ce Microsoft_ui_xaml!CDOCollection::EnterImpl+0xce
		7ffdd519560c Microsoft_ui_xaml!CDependencyObject::Enter+0x12c
		7ffdd5187f18 Microsoft_ui_xaml!CUIElement::EnterImpl+0x338
		7ffdd5187a2d Microsoft_ui_xaml!CFrameworkElement::EnterImpl+0x8d
		7ffdd519560c Microsoft_ui_xaml!CDependencyObject::Enter+0x12c
		7ffdd5247645 Microsoft_ui_xaml!CDOCollection::ChildEnter+0xd5
		7ffdd51c87b9 Microsoft_ui_xaml!CDOCollection::Append+0x1f9
		7ffdd51c7cf6 Microsoft_ui_xaml!CUIElementCollection::Append+0x56
		7ffdd5262a5f Microsoft_ui_xaml!CUIElement::AddChild+0x7f
		7ffdd51853ff Microsoft_ui_xaml!CContentPresenter::ApplyTemplate+0x33f
		7ffdd51b048c Microsoft_ui_xaml!CFrameworkElement::InvokeApplyTemplate+0x5c
		7ffdd51b6ed9 Microsoft_ui_xaml!CFrameworkElement::MeasureCore+0xf9
		7ffdd52da3e4 Microsoft_ui_xaml!CUIElement::MeasureInternal+0x2b4
		7ffdd51b4252 Microsoft_ui_xaml!CUIElement::Measure+0x452
		7ffdd5199f46 Microsoft_ui_xaml!CGrid::MeasureCell+0x76
		7ffdd51b0d8d Microsoft_ui_xaml!CGrid::MeasureCellsGroup+0x10d
		7ffdd51aedb2 Microsoft_ui_xaml!CGrid::MeasureOverride+0x3c2
		7ffdd51b6ff5 Microsoft_ui_xaml!CFrameworkElement::MeasureCore+0x215
		7ffdd52da3e4 Microsoft_ui_xaml!CUIElement::MeasureInternal+0x2b4
		7ffdd51b4252 Microsoft_ui_xaml!CUIElement::Measure+0x452
		7ffdd51b2d9f Microsoft_ui_xaml!DirectUI::UIElementGenerated::Measure+0xcf
		7ffdd51e0843 Microsoft_ui_xaml!DirectUI::ScrollContentPresenter::MeasureOverride+0x463
		7ffdd51a594f Microsoft_ui_xaml!DirectUI::FrameworkElement::MeasureOverrideFromCore+0x16f
		7ffdd51b7247 Microsoft_ui_xaml!CFrameworkElement::MeasureCore+0x467
		7ffdd52da3e4 Microsoft_ui_xaml!CUIElement::MeasureInternal+0x2b4
		7ffdd51b4252 Microsoft_ui_xaml!CUIElement::Measure+0x452
		7ffdd5199f46 Microsoft_ui_xaml!CGrid::MeasureCell+0x76
		7ffdd51b0d8d Microsoft_ui_xaml!CGrid::MeasureCellsGroup+0x10d
		7ffdd51aedb2 Microsoft_ui_xaml!CGrid::MeasureOverride+0x3c2
		7ffdd51b6ff5 Microsoft_ui_xaml!CFrameworkElement::MeasureCore+0x215
		7ffdd52da3e4 Microsoft_ui_xaml!CUIElement::MeasureInternal+0x2b4
		7ffdd51b4252 Microsoft_ui_xaml!CUIElement::Measure+0x452
		7ffdd5351213 Microsoft_ui_xaml!CBorder::MeasureOverride+0xc3
		7ffdd51b6ff5 Microsoft_ui_xaml!CFrameworkElement::MeasureCore+0x215
		7ffdd52da3e4 Microsoft_ui_xaml!CUIElement::MeasureInternal+0x2b4
		7ffdd51b4252 Microsoft_ui_xaml!CUIElement::Measure+0x452
		7ffdd51b2d9f Microsoft_ui_xaml!DirectUI::UIElementGenerated::Measure+0xcf
		7ffdd538e846 Microsoft_ui_xaml!DirectUI::ScrollViewer::MeasureOverride+0x1f6
		7ffdd51a594f Microsoft_ui_xaml!DirectUI::FrameworkElement::MeasureOverrideFromCore+0x16f
		7ffdd51b7247 Microsoft_ui_xaml!CFrameworkElement::MeasureCore+0x467
		7ffdd52da3e4 Microsoft_ui_xaml!CUIElement::MeasureInternal+0x2b4
		7ffdd51b4252 Microsoft_ui_xaml!CUIElement::Measure+0x452
		7ffdd5199f46 Microsoft_ui_xaml!CGrid::MeasureCell+0x76
		7ffdd51b0d8d Microsoft_ui_xaml!CGrid::MeasureCellsGroup+0x10d
		7ffdd51aedb2 Microsoft_ui_xaml!CGrid::MeasureOverride+0x3c2
		7ffdd51b6ff5 Microsoft_ui_xaml!CFrameworkElement::MeasureCore+0x215
		7ffdd52da3e4 Microsoft_ui_xaml!CUIElement::MeasureInternal+0x2b4
		7ffdd51b4252 Microsoft_ui_xaml!CUIElement::Measure+0x452
		7ffdd5351213 Microsoft_ui_xaml!CBorder::MeasureOverride+0xc3
		7ffdd51b6ff5 Microsoft_ui_xaml!CFrameworkElement::MeasureCore+0x215
		7ffdd52da3e4 Microsoft_ui_xaml!CUIElement::MeasureInternal+0x2b4
		7ffdd51b4252 Microsoft_ui_xaml!CUIElement::Measure+0x452
		7ffdd51aeb12 Microsoft_ui_xaml!CGrid::MeasureOverride+0x122
		7ffdd51b6ff5 Microsoft_ui_xaml!CFrameworkElement::MeasureCore+0x215
		7ffdd52da3e4 Microsoft_ui_xaml!CUIElement::MeasureInternal+0x2b4
		7ffdd51b4252 Microsoft_ui_xaml!CUIElement::Measure+0x452
		7ffdd5351213 Microsoft_ui_xaml!CBorder::MeasureOverride+0xc3
		7ffdd51b6ff5 Microsoft_ui_xaml!CFrameworkElement::MeasureCore+0x215
		7ffdd52da3e4 Microsoft_ui_xaml!CUIElement::MeasureInternal+0x2b4
		7ffdd51b4252 Microsoft_ui_xaml!CUIElement::Measure+0x452
		7ffdd5173369 Microsoft_ui_xaml!CControl::MeasureOverride+0x49
		7ffdd51a6f16 Microsoft_ui_xaml!DirectUI::FrameworkElementGenerated::MeasureOverride+0xd6
		7ffdd51a6dea Microsoft_ui_xaml!DirectUI::ContentControl::MeasureOverride+0x14a
		7ffd7083c2ef

Stowed Exception #5 @ 0x000001f5bbdafd68
	0x80070490 (FACILITY_WIN32 - Win32 Undecorated Error Codes): Element not found.

	Stack	 : 0x1f5bbdaed50
		7ffdd563fa3c Microsoft_ui_xaml!CUIAWindow::get_HostRawElementProvider+0xec
		7ffe7708ea4b uiautomationcore!UiaUtils::EntryPointFromImmediateProvider+0x7b
		7ffe7708f905 uiautomationcore!UiaUtils::GetFragmentRootWithHostProviderEntryPoint+0xe5
		7ffe770887b2 uiautomationcore!GetProviderEventInfo+0x82
		7ffe770965bc uiautomationcore!UiaRaiseAutomationPropertyChangedEvent+0x2cc
		7ffdd563ebd0 Microsoft_ui_xaml!CUIAWindow::UIARaiseAutomationPropertyChangedEvent+0x180
		7ffdd55381fb Microsoft_ui_xaml!CCoreServices::UIARaiseAutomationPropertyChangedEvent+0x53
		7ffdd5851e5a Microsoft_ui_xaml!DirectUI::AutomationPeer::RaisePropertyChangedEvent+0x42
		7ffdd5852140 Microsoft_ui_xaml!DirectUI::AutomationPeer::RaisePropertyChangedEventImpl+0x154
		7ffdd56fbfcc Microsoft_ui_xaml!DirectUI::AutomationPeerGenerated::RaisePropertyChangedEvent+0xec
		7ffd70e0dd4a

@codendone
Copy link
Contributor

@jhert0 The other stowed exceptions there have different HRESULTs and appear unrelated, so it these must have been handled and can be ignored. XAML stows many error codes it sees just in case they are needed to help debug a fatal issue. In this case, the first stack from this more recent dump shows the same ShutdownTextServices() issue, which is all that matters.

For timeline, there isn't any info yet to share. The bug has been assigned and once there is a fix we can evaluate if it is safe to service to 1.4.

@Wandtket
Copy link

Wandtket commented Dec 14, 2023

For timeline, there isn't any info yet to share. The bug has been assigned and once there is a fix we can evaluate if it is safe to service to 1.4.

@codendone I can confirm that the issue appears to still be happening in the first experimental build of 1.5.

`Stowed Exception Array @ 0x000002088130ecb0

Stowed Exception #1 @ 0x00000208f3ab31d0
	0x8000FFFF (FACILITY_NULL - Default): E_UNEXPECTED - Unexpected failure

	Stack	 : 0x208f3ab21b0
		7ffd708da5e5 Microsoft_ui_xaml!CXcpDispatcher::OnReentrancyProtectedWindowMessage+0x1f3115
		7ffd706e6a13 Microsoft_ui_xaml!CDeferredInvoke::DispatchQueuedMessage+0xd3
		7ffd706e68e9 Microsoft_ui_xaml!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+0x79
		7ffdaf755d08 CoreMessagingXP!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl Windows::Foundation::ITypedEventHandler_impl<Windows::Foundation::Internal::AggregateType<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64>,IInspectable * __ptr64>::*)(Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64,IInspectable * __ptr64) __ptr64>::DelegateInvokeHelper<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<2>,Windows::Foundation::ITypedEventHandler<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,IInspectable * __ptr64>,Microsoft::WRL::FtmBase>,<lambda_82cf8073f4f042d1a68771c460cb9f49>,-1,Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64,IInspectable * __ptr64>::Invoke+0xa8
		7ffdaf755f0e CoreMessagingXP!Microsoft::WRL::InvokeTraits<-2>::InvokeDelegates<<lambda_1e854da9c9ccd42f6138c3b007a32877>,Windows::Foundation::ITypedEventHandler<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,IInspectable * __ptr64> >+0x8e
		7ffdaf755adb CoreMessagingXP!Microsoft::UI::Dispatching::DispatcherQueueTimer::TimerCallback+0xdb
		7ffdaf730bb8 CoreMessagingXP!CFlat::SehSafe::Execute<<lambda_654db17c35df07198786f0867aa10de6> >+0x2c
		7ffdaf730a8b CoreMessagingXP!Microsoft::CoreUI::Dispatch::TimeoutHandler::ImportAdapter$+0x5b
		7ffdaf6ed547 CoreMessagingXP!Microsoft::CoreUI::Dispatch::TimeoutManager::Callback_OnDispatch+0x1a7
		7ffdaf6d9074 CoreMessagingXP!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchNextItem+0x1e4
		7ffdaf6d8903 CoreMessagingXP!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchLoop+0x1b3
		7ffdaf6cbd66 CoreMessagingXP!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop+0x16e
		7ffdaf6ceb96 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DrainCoreMessagingQueue+0x15a
		7ffdaf6cf097 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch+0x97
		7ffdaf6cefa0 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatchRaw+0x80
		7ffdaf71081d CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DoWork+0x59
		7ffdaf7107a2 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::HandleDispatchNotifyMessage+0x13e
		7ffdaf710653 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::WindowProc+0x73
		7ffdec638241 user32!UserCallWinProcCheckWow+0x2d1
		7ffdec637efc user32!DispatchClientMessage+0x9c
		7ffdec64302d user32!_fnDWORD+0x3d
		7ffded073434 ntdll!KiUserCallbackDispatcherContinue+0x0
		7ffdea9c14d4 win32u!NtUserPeekMessage+0x14
		7ffdec641b4f user32!_PeekMessage+0x3f
		7ffdec641a1c user32!PeekMessageW+0x9c
		7ffdec8c3dcf combase!CCliModalLoop::MyPeekMessage+0x53
		7ffdec8c3d39 combase!CCliModalLoop::PeekRPCAndDDEMessage+0x49
		7ffdec8c357c combase!CCliModalLoop::BlockFn+0x1ec
		7ffdec8c3351 combase!ModalLoop+0xd1
		7ffdec8c2cef combase!ClassicSTAThreadDispatchCrossApartmentCall+0x5f
		7ffdec8db365 combase!CSyncClientCall::SendReceive2+0x825
		7ffdec8c3811 combase!SyncClientCallRetryContext::SendReceiveWithRetry+0x51
		7ffdec8c3778 combase!CSyncClientCall::SendReceiveInRetryContext+0x44
		7ffdec8c2fcd combase!ClassicSTAThreadSendReceive+0x5d
		7ffdec93db7c combase!CSyncClientCall::SendReceive+0x1bc
		7ffdec8fef58 combase!CClientChannel::SendReceive+0x98
		7ffdec963448 combase!NdrExtpProxySendReceive+0x58
		7ffdeb4c241e rpcrt4!NdrpClientCall3+0x3de
		7ffdec95ea8c combase!ObjectStublessClient+0x14c
		7ffdec9dba52 combase!ObjectStubless+0x42
		7ffdec8fe966 combase!CStdMarshal::DisconnectCliIPIDs+0x816
		7ffdec948405 combase!CStdMarshal::DisconnectWorker_ReleasesLock+0x265
		7ffdec94a6c3 combase!CStdMarshal::Disconnect+0xe3
		7ffdec94d23b combase!CStdIdentity::CInternalUnk::Release+0x30b
		7ffd6febcd21 WinUIEdit!CSpellerGlobalState::RemoveSpellCheckingResources+0xb1
		7ffd6feba3f3 WinUIEdit!CSpellerGlobalState::~CSpellerGlobalState+0x63
		7ffd6febcc36 WinUIEdit!CSpellerGlobalState::Release+0x26
		7ffd6feb89ab WinUIEdit!CSpellCheckerEngine::Release+0x11b
		7ffd6fead336 WinUIEdit!CSpellChecker::~CSpellChecker+0x46
		7ffd6fca5b2f WinUIEdit!CTxtEdit::~CTxtEdit+0xcb
		7ffd6fca5a44 WinUIEdit!CTxtEdit::`vector deleting destructor'+0x14
		7ffd6fc5bb7a WinUIEdit!CCallMgrCenter::ExitContext+0x22e
		7ffd6fcad808 WinUIEdit!CTxtEdit::CUnknown::Release+0xb8
		7ffd6fca6858 WinUIEdit!CTxtEdit::Release+0x18
		7ffd6fd2292e WinUIEdit!ShutdownTextServices+0x8e
		7ffd70a46790 Microsoft_ui_xaml!CTextBoxBase::Destroy+0x254
		7ffd70f3ef9c Microsoft_ui_xaml!CTextBox::~CTextBox+0x18
		7ffd70f3efe4 Microsoft_ui_xaml!CTextBox::`scalar deleting destructor'+0x14
		7ffd705d578a Microsoft_ui_xaml!CDependencyObject::Release+0x8a
		7ffd70623242 Microsoft_ui_xaml!DirectUI::DependencyObject::DisconnectFrameworkPeerCore+0xa2
		7ffd70e3ad36 Microsoft_ui_xaml!DirectUI::TextBox::DisconnectFrameworkPeerCore+0x16
		7ffd705daa0a Microsoft_ui_xaml!DirectUI::DependencyObject::OnFinalRelease+0x1fa
		7ffd70731fb2 Microsoft_ui_xaml!ctl::ComBase::ReleaseImpl+0x72
		7ffd706da29c Microsoft_ui_xaml!DirectUI::UIAffinityReleaseQueue::DoCleanup+0xfc
		7ffd706da17e Microsoft_ui_xaml!DirectUI::UIAffinityReleaseQueue::BuildTree+0x1e
		7ffd705f44b8 Microsoft_ui_xaml!DirectUI::BuildTreeService::BuildTrees+0x168
		7ffd705f42e2 Microsoft_ui_xaml!AgCoreCallbacks::FrameworkCallbacks_PhasedWorkDistributor_PerformWork+0x62
		7ffd706af8b3 Microsoft_ui_xaml!CCoreServices::NWDrawTree+0x2c3
		7ffd706a98c3 Microsoft_ui_xaml!CCoreServices::NWDrawMainTree+0x133
		7ffd706a974d Microsoft_ui_xaml!CWindowRenderTarget::Draw+0x6d
		7ffd706a9689 Microsoft_ui_xaml!CXcpBrowserHost::OnTick+0x59
		7ffd706e76da Microsoft_ui_xaml!CXcpDispatcher::Tick+0x8a
		7ffd706e757a Microsoft_ui_xaml!CXcpDispatcher::OnReentrancyProtectedWindowMessage+0xaa
		7ffd706e6a13 Microsoft_ui_xaml!CDeferredInvoke::DispatchQueuedMessage+0xd3
		7ffd706e68e9 Microsoft_ui_xaml!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+0x79
		7ffdaf755d08 CoreMessagingXP!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl Windows::Foundation::ITypedEventHandler_impl<Windows::Foundation::Internal::AggregateType<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64>,IInspectable * __ptr64>::*)(Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64,IInspectable * __ptr64) __ptr64>::DelegateInvokeHelper<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<2>,Windows::Foundation::ITypedEventHandler<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,IInspectable * __ptr64>,Microsoft::WRL::FtmBase>,<lambda_82cf8073f4f042d1a68771c460cb9f49>,-1,Microsoft::UI::Dispatching::IDispatcherQueueTimer * __ptr64,IInspectable * __ptr64>::Invoke+0xa8
		7ffdaf755f0e CoreMessagingXP!Microsoft::WRL::InvokeTraits<-2>::InvokeDelegates<<lambda_1e854da9c9ccd42f6138c3b007a32877>,Windows::Foundation::ITypedEventHandler<Microsoft::UI::Dispatching::DispatcherQueueTimer * __ptr64,IInspectable * __ptr64> >+0x8e
		7ffdaf755adb CoreMessagingXP!Microsoft::UI::Dispatching::DispatcherQueueTimer::TimerCallback+0xdb
		7ffdaf730bb8 CoreMessagingXP!CFlat::SehSafe::Execute<<lambda_654db17c35df07198786f0867aa10de6> >+0x2c
		7ffdaf730a8b CoreMessagingXP!Microsoft::CoreUI::Dispatch::TimeoutHandler::ImportAdapter$+0x5b
		7ffdaf6ed547 CoreMessagingXP!Microsoft::CoreUI::Dispatch::TimeoutManager::Callback_OnDispatch+0x1a7
		7ffdaf6d9074 CoreMessagingXP!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchNextItem+0x1e4
		7ffdaf6d8903 CoreMessagingXP!Microsoft::CoreUI::Dispatch::Dispatcher::Callback_DispatchLoop+0x1b3
		7ffdaf6cbd66 CoreMessagingXP!Microsoft::CoreUI::Dispatch::EventLoop::Callback_RunCoreLoop+0x16e
		7ffdaf6ceb96 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DrainCoreMessagingQueue+0x15a
		7ffdaf6cf097 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatch+0x97
		7ffdaf6cefa0 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::OnUserDispatchRaw+0x80
		7ffdaf71081d CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::DoWork+0x59
		7ffdaf7107a2 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::HandleDispatchNotifyMessage+0x13e
		7ffdaf710653 CoreMessagingXP!Microsoft::CoreUI::Dispatch::UserAdapter::WindowProc+0x73
		7ffdec638241 user32!UserCallWinProcCheckWow+0x2d1
		7ffdec637efc user32!DispatchClientMessage+0x9c
		7ffdec64302d user32!_fnDWORD+0x3d
		7ffded073434 ntdll!KiUserCallbackDispatcherContinue+0x0
		7ffdea9c1534 win32u!NtUserGetMessage+0x14
		7ffdec64535a user32!GetMessageW+0x2a
		7ffd7078a3c4 Microsoft_ui_xaml!DirectUI::FrameworkApplication::RunDesktopWindowMessageLoop+0x3c
		7ffd7078997e Microsoft_ui_xaml!DirectUI::FrameworkApplication::StartDesktop+0x1e6
		7ffd70703390 Microsoft_ui_xaml!DirectUI::FrameworkApplicationFactory::Start+0x70
		7ffd1bac057d

Stowed Exception #2 @ 0x00000208e819d300
	0x80070490 (FACILITY_WIN32 - Win32 Undecorated Error Codes): Element not found.

	Stack	 : 0x208e819c2e0
		7ffd70a796a6 Microsoft_ui_xaml!CUIAWindow::get_HostRawElementProvider+0xe6
		7ffdc325ea4b uiautomationcore!UiaUtils::EntryPointFromImmediateProvider+0x7b
		7ffdc325f905 uiautomationcore!UiaUtils::GetFragmentRootWithHostProviderEntryPoint+0xe5
		7ffdc32587b2 uiautomationcore!GetProviderEventInfo+0x82
		7ffdc32665bc uiautomationcore!UiaRaiseAutomationPropertyChangedEvent+0x2cc
		7ffd70a78840 Microsoft_ui_xaml!CUIAWindow::UIARaiseAutomationPropertyChangedEvent+0x180
		7ffd7096793f Microsoft_ui_xaml!CCoreServices::UIARaiseAutomationPropertyChangedEvent+0x53
		7ffd70c9d49a Microsoft_ui_xaml!DirectUI::AutomationPeer::RaisePropertyChangedEvent+0x42
		7ffd70c9d780 Microsoft_ui_xaml!DirectUI::AutomationPeer::RaisePropertyChangedEventImpl+0x154
		7ffd70b3fcf7 Microsoft_ui_xaml!DirectUI::AutomationPeerGenerated::RaisePropertyChangedEvent+0x107
		7ffd1cce42fa
`


@e0ff
Copy link
Author

e0ff commented Mar 4, 2024

I was wondering if this was fixed in 1.5 or if there is an update on when this will be fixed?

@AMArostegui
Copy link

AMArostegui commented Oct 1, 2024

We're on WindowsAppSdk 1.5.5, self-contained, unpackaged app, and experiencing a similar issue.

Our customers are suffering random crashes on our application from time to time. The application just dissapears without ceremony, leaving behind only a Windows Event entry.

Once I was able to reproduce the problem having WinDbg attached to the process, so I have the stacktrace and WinDbg output.

The stacktrace looks very similar to the parent post, but who knows with those stowed exceptions:

StackTrace.log

WinDbg command output by the time the app crashed.

WinDbg command.log

That 'ImageDecodeActivity' before crashing would point to any other problem, I don't know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-TextBox TextBox, RichEditBox bug Something isn't working closed-Fixed Described behavior has been fixed. team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

5 participants