terminal icon indicating copy to clipboard operation
terminal copied to clipboard

The SignalTextChanged crash isn't actually fixed

Open DHowett opened this issue 3 years ago • 0 comments

FYI I just got a crash in RaiseAutomationEventImpl passing through SignalTextChanged, which seems similar to the one shown in https://github.com/microsoft/terminal/issues/13357#issuecomment-1163015484. This occurred while shutting down the terminal, so I'm assuming I wouldn't have noticed usually, but I happened to be in the debugger at the time.

I'm branched off of 3e6abd37df192d969088188ce836edbf645b13b4, which includes PR #13876, so that doesn't appear to have helped. I do have some local changes, so it's possible that may be a factor, but I don't think that's likely.

The exception was:

Unhandled exception at 0x00007FFE52AADA82 (Windows.UI.Xaml.dll) in WindowsTerminal.exe: 0xC0000005: Access violation reading location 0x0000000000000010.

And this was the stack trace:

>	Windows.UI.Xaml.dll!DirectUI::AutomationPeer::RaiseAutomationEventImpl(Windows::UI::Xaml::Automation::Peers::AutomationEvents eventId) Line 813	C++
 	Windows.UI.Xaml.dll!DirectUI::AutomationPeerGenerated::RaiseAutomationEvent(Windows::UI::Xaml::Automation::Peers::AutomationEvents eventId) Line 1980	C++
 	Microsoft.Terminal.Control.dll!winrt::Microsoft::Terminal::Control::implementation::TermControlAutomationPeer::SignalTextChanged::__l2::<lambda_1>::operator()() Line 166	C++
 	Microsoft.Terminal.Control.dll!winrt::impl::delegate<winrt::Windows::UI::Core::DispatchedHandler,`winrt::Microsoft::Terminal::Control::implementation::TermControlAutomationPeer::SignalTextChanged'::`2'::<lambda_1>>::Invoke() Line 1136	C++
 	[External Code]	
 	[Inline Frame] WindowsTerminal.exe!winrt::impl::consume_Windows_Foundation_IClosable<winrt::TerminalApp::App>::Close() Line 121	C++
 	WindowsTerminal.exe!AppHost::~AppHost() Line 149	C++
 	WindowsTerminal.exe!wWinMain(HINSTANCE__ * __formal, HINSTANCE__ * __formal, wchar_t * __formal, int __formal) Line 193	C++
 	[External Code]	

I poked about in the local variables for a bit to see if I could spot anything obviously wrong, but I'm afraid I don't understand the code well enough to make a meaningful assessment. A lot of fields said "Object uninitialized or information unavailable", but I suspect that may just be a release build thing.

Originally posted by @j4james in https://github.com/microsoft/terminal/issues/13357#issuecomment-1242812664

DHowett avatar Sep 13 '22 17:09 DHowett