Crash on startup, related to defterm #13983

Open
opened 2026-01-31 03:57:40 +00:00 by claunia · 0 comments
Owner

Originally created by @zadjii-msft on GitHub (May 27, 2021).

Originally assigned to: @miniksa on GitHub.

Microsoft.WindowsTerminalPreview_1.9.1445.0, internal OS build

We're hitting the CATCH_FAIL_FAST:

void TerminalPage::_StartInboundListener()
    {
        if (_shouldStartInboundListener)
        {
            _shouldStartInboundListener = false;

            try
            {
                winrt::Microsoft::Terminal::TerminalConnection::ConptyConnection::StartInboundListener();
            }
            // If we failed to start the listener, it will throw.
            // We should fail fast here or the Terminal will be in a very strange state.
            // We only start the listener if the Terminal was started with the COM server
            // `-Embedding` flag and we make no tabs as a result.
            // Therefore, if the listener cannot start itself up to make that tab with
            // the inbound connection that caused the COM activation in the first place...
            // we would be left with an empty terminal frame with no tabs.
            // Instead, crash out so COM sees the server die and things unwind
            // without a weird empty frame window.
            CATCH_FAIL_FAST()
        }
    }

Dump is in c:\users\migrie\dev\startup-crash.dmp. Repo's been hot yesterday so this might have already been filed - I'll dedupe later.

stack
0:000> k
 # Child-SP          RetAddr               Call Site
00 00000066`5b8f9820 00007ff8`82bee109     KERNELBASE!RaiseFailFastException+0x152 [minkernel\kernelbase\xcpt.c @ 1198] 
01 00000066`5b8f9e00 00007ff8`82beb428     TerminalApp!wil::details::WilDynamicLoadRaiseFailFastException+0x49 [E:\BA\97\s\dep\wil\include\wil\result_macros.h @ 1773] 
02 00000066`5b8f9e30 00007ff8`82beb40c     TerminalApp!wil::details::WilRaiseFailFastException+0x18 [E:\BA\97\s\dep\wil\include\wil\result_macros.h @ 1713] 
03 00000066`5b8f9e60 00007ff8`82beb9c3     TerminalApp!wil::details::WilFailFast+0xa8 [E:\BA\97\s\dep\wil\include\wil\result_macros.h @ 3420] 
04 00000066`5b8f9f30 00007ff8`82beb512     TerminalApp!wil::details::ReportFailure_NoReturn<3>+0x21b [E:\BA\97\s\dep\wil\include\wil\result_macros.h @ 3463] 
05 00000066`5b8fb420 00007ff8`82c2cffc     TerminalApp!wil::details::ReportFailure_Base<3,0>+0x2e [E:\BA\97\s\dep\wil\include\wil\result_macros.h @ 3488] 
06 00000066`5b8fb480 00007ff8`82c2cf7a     TerminalApp!wil::details::ReportFailure_CaughtExceptionCommonNoReturnBase<3>+0x80 [E:\BA\97\s\dep\wil\include\wil\result_macros.h @ 3590] 
07 (Inline Function) --------`--------     TerminalApp!wil::details::ReportFailure_CaughtExceptionCommon+0x14 [E:\BA\97\s\dep\wil\include\wil\result_macros.h @ 3599] 
08 00000066`5b8fb510 00007ff8`82c31723     TerminalApp!wil::details::ReportFailure_CaughtException<3>+0x32 [E:\BA\97\s\dep\wil\include\wil\result_macros.h @ 3807] 
09 00000066`5b8fc570 00007ff8`82bbc8e1     TerminalApp!wil::details::in1diag3::FailFast_CaughtException+0x13 [E:\BA\97\s\dep\wil\include\wil\result_macros.h @ 4719] 
0a 00000066`5b8fc5c0 00007ff8`bcf81080     TerminalApp!`winrt::TerminalApp::implementation::TerminalPage::_StartInboundListener'::`1'::catch$0+0x22 [E:\BA\97\s\src\cascadia\TerminalApp\TerminalPage.cpp @ 359] 
0b 00000066`5b8fc5f0 00007ff8`bcf826a5     VCRUNTIME140_1!_CallSettingFrame_LookupContinuationIndex+0x20 [D:\a01\_work\26\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm @ 98] 
0c 00000066`5b8fc620 00007ff8`c7ce74c6     VCRUNTIME140_1!__FrameHandler4::CxxCallCatchBlock+0x115 [D:\a01\_work\26\s\src\vctools\crt\vcruntime\src\eh\frame.cpp @ 1393] 
0d 00000066`5b8fc700 00007ff8`82bbc8b9     ntdll!RcFrameConsolidation+0x6 [minkernel\ntos\rtl\amd64\capture.asm @ 1124] 
0e 00000066`5b8fe9c0 00007ff8`82bab2cb     TerminalApp!winrt::TerminalApp::implementation::TerminalPage::_StartInboundListener+0x19 [E:\BA\97\s\src\cascadia\TerminalApp\TerminalPage.cpp @ 348] 
0f 00000066`5b8fe9f0 00007ff8`82baacdb     TerminalApp!winrt::TerminalApp::implementation::TerminalPage::_OnFirstLayout+0xbb [E:\BA\97\s\src\cascadia\TerminalApp\TerminalPage.cpp @ 330] 
10 (Inline Function) --------`--------     TerminalApp!winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::UI::Xaml::FrameworkElement,winrt::Windows::Foundation::IInspectable>::<lambda_c45f47b7e8e0f80bc2a45684739b042d>::operator()+0x1a [E:\BA\97\s\src\cascadia\TerminalApp\Generated Files\winrt\Windows.Foundation.h @ 2511] 
11 00000066`5b8fea40 00007ff8`81857cd3     TerminalApp!winrt::impl::delegate<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::UI::Xaml::FrameworkElement,winrt::Windows::Foundation::IInspectable>,<lambda_c45f47b7e8e0f80bc2a45684739b042d> >::Invoke+0x3b [E:\BA\97\s\src\cascadia\TerminalApp\Generated Files\winrt\Windows.Foundation.h @ 894] 
12 00000066`5b8fea90 00007ff8`81857b9a     Windows_UI_Xaml!GetErrorContextIndex+0x117c03
13 00000066`5b8feaf0 00007ff8`8185c2e8     Windows_UI_Xaml!GetErrorContextIndex+0x117aca
14 00000066`5b8feb30 00007ff8`81994285     Windows_UI_Xaml!GetErrorContextIndex+0x11c218
15 00000066`5b8feb80 00007ff8`8185cc09     Windows_UI_Xaml!DllCanUnloadNow+0x34925
16 00000066`5b8febf0 00007ff8`8182404d     Windows_UI_Xaml!GetErrorContextIndex+0x11cb39
17 00000066`5b8fec90 00007ff8`818231af     Windows_UI_Xaml!GetErrorContextIndex+0xe3f7d
18 00000066`5b8fed20 00007ff8`819f51f4     Windows_UI_Xaml!GetErrorContextIndex+0xe30df
19 00000066`5b8fee30 00007ff8`819f5001     Windows_UI_Xaml!DllCanUnloadNow+0x95894
1a 00000066`5b8fee90 00007ff8`819f4f20     Windows_UI_Xaml!DllCanUnloadNow+0x956a1
1b 00000066`5b8feed0 00007ff8`818ba7c1     Windows_UI_Xaml!DllCanUnloadNow+0x955c0
1c 00000066`5b8fef30 00007ff8`818ba6a3     Windows_UI_Xaml!DllGetActivationFactory+0x49e71
1d 00000066`5b8fef70 00007ff8`817fcfb0     Windows_UI_Xaml!DllGetActivationFactory+0x49d53
1e 00000066`5b8fefa0 00007ff8`817fce40     Windows_UI_Xaml!GetErrorContextIndex+0xbcee0
1f 00000066`5b8fefe0 00007ff8`817e6e55     Windows_UI_Xaml!GetErrorContextIndex+0xbcd70
Originally created by @zadjii-msft on GitHub (May 27, 2021). Originally assigned to: @miniksa on GitHub. `Microsoft.WindowsTerminalPreview_1.9.1445.0`, internal OS build We're hitting the `CATCH_FAIL_FAST`: ```c++ void TerminalPage::_StartInboundListener() { if (_shouldStartInboundListener) { _shouldStartInboundListener = false; try { winrt::Microsoft::Terminal::TerminalConnection::ConptyConnection::StartInboundListener(); } // If we failed to start the listener, it will throw. // We should fail fast here or the Terminal will be in a very strange state. // We only start the listener if the Terminal was started with the COM server // `-Embedding` flag and we make no tabs as a result. // Therefore, if the listener cannot start itself up to make that tab with // the inbound connection that caused the COM activation in the first place... // we would be left with an empty terminal frame with no tabs. // Instead, crash out so COM sees the server die and things unwind // without a weird empty frame window. CATCH_FAIL_FAST() } } ``` Dump is in `c:\users\migrie\dev\startup-crash.dmp`. Repo's been hot yesterday so this might have already been filed - I'll dedupe later. <details> <summary>stack</summary> ``` 0:000> k # Child-SP RetAddr Call Site 00 00000066`5b8f9820 00007ff8`82bee109 KERNELBASE!RaiseFailFastException+0x152 [minkernel\kernelbase\xcpt.c @ 1198] 01 00000066`5b8f9e00 00007ff8`82beb428 TerminalApp!wil::details::WilDynamicLoadRaiseFailFastException+0x49 [E:\BA\97\s\dep\wil\include\wil\result_macros.h @ 1773] 02 00000066`5b8f9e30 00007ff8`82beb40c TerminalApp!wil::details::WilRaiseFailFastException+0x18 [E:\BA\97\s\dep\wil\include\wil\result_macros.h @ 1713] 03 00000066`5b8f9e60 00007ff8`82beb9c3 TerminalApp!wil::details::WilFailFast+0xa8 [E:\BA\97\s\dep\wil\include\wil\result_macros.h @ 3420] 04 00000066`5b8f9f30 00007ff8`82beb512 TerminalApp!wil::details::ReportFailure_NoReturn<3>+0x21b [E:\BA\97\s\dep\wil\include\wil\result_macros.h @ 3463] 05 00000066`5b8fb420 00007ff8`82c2cffc TerminalApp!wil::details::ReportFailure_Base<3,0>+0x2e [E:\BA\97\s\dep\wil\include\wil\result_macros.h @ 3488] 06 00000066`5b8fb480 00007ff8`82c2cf7a TerminalApp!wil::details::ReportFailure_CaughtExceptionCommonNoReturnBase<3>+0x80 [E:\BA\97\s\dep\wil\include\wil\result_macros.h @ 3590] 07 (Inline Function) --------`-------- TerminalApp!wil::details::ReportFailure_CaughtExceptionCommon+0x14 [E:\BA\97\s\dep\wil\include\wil\result_macros.h @ 3599] 08 00000066`5b8fb510 00007ff8`82c31723 TerminalApp!wil::details::ReportFailure_CaughtException<3>+0x32 [E:\BA\97\s\dep\wil\include\wil\result_macros.h @ 3807] 09 00000066`5b8fc570 00007ff8`82bbc8e1 TerminalApp!wil::details::in1diag3::FailFast_CaughtException+0x13 [E:\BA\97\s\dep\wil\include\wil\result_macros.h @ 4719] 0a 00000066`5b8fc5c0 00007ff8`bcf81080 TerminalApp!`winrt::TerminalApp::implementation::TerminalPage::_StartInboundListener'::`1'::catch$0+0x22 [E:\BA\97\s\src\cascadia\TerminalApp\TerminalPage.cpp @ 359] 0b 00000066`5b8fc5f0 00007ff8`bcf826a5 VCRUNTIME140_1!_CallSettingFrame_LookupContinuationIndex+0x20 [D:\a01\_work\26\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm @ 98] 0c 00000066`5b8fc620 00007ff8`c7ce74c6 VCRUNTIME140_1!__FrameHandler4::CxxCallCatchBlock+0x115 [D:\a01\_work\26\s\src\vctools\crt\vcruntime\src\eh\frame.cpp @ 1393] 0d 00000066`5b8fc700 00007ff8`82bbc8b9 ntdll!RcFrameConsolidation+0x6 [minkernel\ntos\rtl\amd64\capture.asm @ 1124] 0e 00000066`5b8fe9c0 00007ff8`82bab2cb TerminalApp!winrt::TerminalApp::implementation::TerminalPage::_StartInboundListener+0x19 [E:\BA\97\s\src\cascadia\TerminalApp\TerminalPage.cpp @ 348] 0f 00000066`5b8fe9f0 00007ff8`82baacdb TerminalApp!winrt::TerminalApp::implementation::TerminalPage::_OnFirstLayout+0xbb [E:\BA\97\s\src\cascadia\TerminalApp\TerminalPage.cpp @ 330] 10 (Inline Function) --------`-------- TerminalApp!winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::UI::Xaml::FrameworkElement,winrt::Windows::Foundation::IInspectable>::<lambda_c45f47b7e8e0f80bc2a45684739b042d>::operator()+0x1a [E:\BA\97\s\src\cascadia\TerminalApp\Generated Files\winrt\Windows.Foundation.h @ 2511] 11 00000066`5b8fea40 00007ff8`81857cd3 TerminalApp!winrt::impl::delegate<winrt::Windows::Foundation::TypedEventHandler<winrt::Windows::UI::Xaml::FrameworkElement,winrt::Windows::Foundation::IInspectable>,<lambda_c45f47b7e8e0f80bc2a45684739b042d> >::Invoke+0x3b [E:\BA\97\s\src\cascadia\TerminalApp\Generated Files\winrt\Windows.Foundation.h @ 894] 12 00000066`5b8fea90 00007ff8`81857b9a Windows_UI_Xaml!GetErrorContextIndex+0x117c03 13 00000066`5b8feaf0 00007ff8`8185c2e8 Windows_UI_Xaml!GetErrorContextIndex+0x117aca 14 00000066`5b8feb30 00007ff8`81994285 Windows_UI_Xaml!GetErrorContextIndex+0x11c218 15 00000066`5b8feb80 00007ff8`8185cc09 Windows_UI_Xaml!DllCanUnloadNow+0x34925 16 00000066`5b8febf0 00007ff8`8182404d Windows_UI_Xaml!GetErrorContextIndex+0x11cb39 17 00000066`5b8fec90 00007ff8`818231af Windows_UI_Xaml!GetErrorContextIndex+0xe3f7d 18 00000066`5b8fed20 00007ff8`819f51f4 Windows_UI_Xaml!GetErrorContextIndex+0xe30df 19 00000066`5b8fee30 00007ff8`819f5001 Windows_UI_Xaml!DllCanUnloadNow+0x95894 1a 00000066`5b8fee90 00007ff8`819f4f20 Windows_UI_Xaml!DllCanUnloadNow+0x956a1 1b 00000066`5b8feed0 00007ff8`818ba7c1 Windows_UI_Xaml!DllCanUnloadNow+0x955c0 1c 00000066`5b8fef30 00007ff8`818ba6a3 Windows_UI_Xaml!DllGetActivationFactory+0x49e71 1d 00000066`5b8fef70 00007ff8`817fcfb0 Windows_UI_Xaml!DllGetActivationFactory+0x49d53 1e 00000066`5b8fefa0 00007ff8`817fce40 Windows_UI_Xaml!GetErrorContextIndex+0xbcee0 1f 00000066`5b8fefe0 00007ff8`817e6e55 Windows_UI_Xaml!GetErrorContextIndex+0xbcd70 ``` </details>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13983