terminal: Windows Terminal crashing on exit when settings.json is corrupted
Windows Terminal version
1.14.2281.0
Windows build number
10.0.19044.1949
Other Software
No response
Steps to reproduce
If there is an error in settings.json
Windows Terminal will report it on startup:
Dismissing the error dialog by clicking the OK button, and then closing the application by any means (clicking [X]
in the top right corner or pressing Alt-F4
) leads to Just-In-Time debugger being launched (or a crash if you don’t have Visual Studio or another debugger installed).
Exception details:
Unhandled exception at 0x00007FFBE890EE0E (Windows.UI.Xaml.dll) in WindowsTerminal.exe: 0xC0000005: Access violation reading location 0x0000000000000130.
Call stack:
[Inline Frame] Windows.UI.Xaml.dll!DirectUI::DXamlCore::GetWindow() Line 278 C++
Windows.UI.Xaml.dll!DirectUI::ContentDialog::DetachEventHandlersForOpenDialog() Line 2507 C++
Windows.UI.Xaml.dll!DirectUI::ContentDialog::~ContentDialog() Line 74 C++
Windows.UI.Xaml.dll!ctl::ComObject<DirectUI::ContentDialog>::`scalar deleting destructor'(unsigned int) C++
Windows.UI.Xaml.dll!ctl::ComBase::ReleaseImpl() Line 307 C++
[Inline Frame] TerminalApp.dll!winrt::Windows::Foundation::IUnknown::release_ref() Line 2140 C++
[Inline Frame] TerminalApp.dll!winrt::Windows::Foundation::IUnknown::{dtor}() Line 2045 C++
> TerminalApp.dll!winrt::TerminalApp::implementation::AppLogic::~AppLogic() Line 57 C++
TerminalApp.dll!winrt::TerminalApp::implementation::AppLogic::`scalar deleting destructor'(unsigned int) C++
TerminalApp.dll!winrt::implements<winrt::TerminalApp::implementation::AppLogic,winrt::TerminalApp::AppLogic,winrt::TerminalApp::IDirectKeyListener,winrt::TerminalApp::IDialogPresenter,IInitializeWithWindow>::Release() Line 7859 C++
ucrtbase.dll!<lambda>(void)() Unknown
ucrtbase.dll!__crt_seh_guarded_call<int>::operator()<<lambda_7777bce6b2f8c936911f934f8298dc43>,<lambda>(void) &,<lambda_3883c3dff614d5e0c5f61bb1ac94921c>>() Unknown
ucrtbase.dll!_execute_onexit_table() Unknown
TerminalApp.dll!dllmain_crt_process_detach(const bool is_terminating) Line 182 C++
TerminalApp.dll!dllmain_dispatch(HINSTANCE__ * const instance, const unsigned long reason, void * const reserved) Line 293 C++
ntdll.dll!LdrpCallInitRoutine() Unknown
ntdll.dll!LdrShutdownProcess() Unknown
ntdll.dll!RtlExitUserProcess() Unknown
kernel32.dll!ExitProcessImplementation() Unknown
ucrtbase.dll!exit_or_terminate_process() Unknown
ucrtbase.dll!common_exit() Unknown
WindowsTerminal.exe!__scrt_common_main_seh() Line 295 C++
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() Unknown
Offending settings.json
is attached.
I also have a minidump taken with:
procdump.exe -ma -e -x C:\winterm Microsoft.WindowsTerminal_1.14.2281.0_x64__8wekyb3d8bbwe
If there is any way to share it without being publicly visible please let me know, I have it ready for upload.
Expected Behavior
Application should not crash on exit when settings.json
is corrupted.
Actual Behavior
Application crashes on exit when settings.json
is corrupted.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (9 by maintainers)
I’ve got a line out with the WinUI folks. We’ll see, but historically this kind of bug has not met the bar for servicing, especially because it only repros when the application is already closing.
That being said, it’s probably 1% of our crashes. So I’d love to tidy that up.
Curiously, I haven’t seen any hits of this on 1.15 stable, so maybe it just… went away?