PGO Training runs fail, TerminalApp.dll fails to load #14028

Closed
opened 2026-01-31 03:58:52 +00:00 by claunia · 7 comments
Owner

Originally created by @miniksa on GitHub (May 28, 2021).

Originally assigned to: @miniksa on GitHub.

00 00000048`ce0fdb70 00007ffa`99c9d2df     ucrtbase!abort+0x4e [minkernel\crts\ucrt\src\appcrt\startup\abort.cpp @ 77] 
01 00000048`ce0fdba0 00007ffa`96441abf     ucrtbase!terminate+0x1f [minkernel\crts\ucrt\src\appcrt\misc\terminate.cpp @ 58] 
02 00000048`ce0fdbd0 00007ffa`9644232b     VCRUNTIME140_1!FindHandler<__FrameHandler4>+0x46f [d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp @ 682] 
03 00000048`ce0fdda0 00007ffa`964440e9     VCRUNTIME140_1!__InternalCxxFrameHandler<__FrameHandler4>+0x267 [d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp @ 352] 
04 00000048`ce0fde40 00007ff6`424b3918     VCRUNTIME140_1!__CxxFrameHandler4+0xa9 [d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\risctrnsctrl.cpp @ 290] 
05 00000048`ce0fdeb0 00007ffa`9cd411cf     WindowsTerminal!__GSHandlerCheck_EH4+0x64 [D:\agent\_work\10\s\src\vctools\crt\vcstartup\src\gs\amd64\gshandlereh4.cpp @ 86] 
06 00000048`ce0fdee0 00007ffa`9cd0a209     ntdll!RtlpExecuteHandlerForException+0xf [minkernel\ntos\rtl\amd64\xcptmisc.asm @ 132] 
07 00000048`ce0fdf10 00007ffa`9cd09fc3     ntdll!RtlDispatchException+0x219 [minkernel\ntos\rtl\amd64\exdsptch.c @ 693] 
08 00000048`ce0fe620 00007ffa`9a893b29     ntdll!RtlRaiseException+0x153 [minkernel\ntos\rtl\amd64\raise.c @ 182] 
09 00000048`ce0ff4d0 00007ffa`96426480     KERNELBASE!RaiseException+0x69 [minkernel\kernelbase\xcpt.c @ 937] 
0a 00000048`ce0ff5b0 00007ff6`4249799a     VCRUNTIME140!_CxxThrowException+0x90 [D:\agent\_work\10\s\src\vctools\crt\vcruntime\src\eh\throw.cpp @ 75] 
0b 00000048`ce0ff610 00007ff6`4248471b     WindowsTerminal!winrt::throw_hresult+0x3ba [C:\a\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\base.h @ 4892] 
0c 00000048`ce0ff670 00007ff6`42484986     WindowsTerminal!winrt::check_hresult+0x2b [C:\a\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\base.h @ 4962] 
0d 00000048`ce0ff6b0 00007ff6`4248d84c     WindowsTerminal!winrt::Windows::Foundation::IActivationFactory::ActivateInstance<winrt::TerminalApp::App>+0xc6 [C:\a\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\base.h @ 6398] 
0e 00000048`ce0ff710 00007ff6`42497f3b     WindowsTerminal!<lambda_74300ac9aae6189311da41a1000f9c41>::operator()+0x3c [C:\a\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\TerminalApp.h @ 4832] 
0f 00000048`ce0ff750 00007ff6`42499a1a     WindowsTerminal!<lambda_74300ac9aae6189311da41a1000f9c41>::<lambda_invoker_cdecl>+0x3b [C:\a\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\TerminalApp.h @ 4832] 
10 00000048`ce0ff780 00007ff6`4248ffab     WindowsTerminal!winrt::impl::factory_cache_entry<winrt::TerminalApp::App,winrt::Windows::Foundation::IActivationFactory>::call<winrt::TerminalApp::App (__cdecl*)(winrt::Windows::Foundation::IActivationFactory const &)>+0x1ea [C:\a\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\base.h @ 6231] 
11 00000048`ce0ff820 00007ff6`42490f69     WindowsTerminal!winrt::impl::call_factory_cast<winrt::TerminalApp::App (__cdecl*)(winrt::Windows::Foundation::IActivationFactory const &),winrt::TerminalApp::App,winrt::Windows::Foundation::IActivationFactory,<lambda_74300ac9aae6189311da41a1000f9c41> >+0xab [C:\a\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\base.h @ 6270] 
12 00000048`ce0ff860 00007ff6`4249d26a     WindowsTerminal!winrt::TerminalApp::App::App+0x39 [C:\a\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\TerminalApp.h @ 4832] 
13 00000048`ce0ff8a0 00007ff6`42497c2b     WindowsTerminal!AppHost::AppHost+0x6a [C:\a\1\s\src\cascadia\WindowsTerminal\AppHost.cpp @ 28] 
14 00000048`ce0ff990 00007ff6`42491b62     WindowsTerminal!wWinMain+0x19b [C:\a\1\s\src\cascadia\WindowsTerminal\main.cpp @ 126] 
15 (Inline Function) --------`--------     WindowsTerminal!invoke_main+0x21 [D:\agent\_work\10\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 118] 
16 00000048`ce0ffaa0 00007ffa`9b517bd4     WindowsTerminal!__scrt_common_main_seh+0x106 [D:\agent\_work\10\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288] 
17 00000048`ce0ffae0 00007ffa`9cd0ce51     kernel32!BaseThreadInitThunk+0x14 [base\win32\client\thread.c @ 64] 
18 00000048`ce0ffb10 00000000`00000000     ntdll!RtlUserThreadStart+0x21 [minkernel\ntdll\rtlstrt.c @ 1153] 

from dumps out of Helix from https://dev.azure.com/ms/terminal/_build/results?buildId=171754&view=results

Originally created by @miniksa on GitHub (May 28, 2021). Originally assigned to: @miniksa on GitHub. ``` 00 00000048`ce0fdb70 00007ffa`99c9d2df ucrtbase!abort+0x4e [minkernel\crts\ucrt\src\appcrt\startup\abort.cpp @ 77] 01 00000048`ce0fdba0 00007ffa`96441abf ucrtbase!terminate+0x1f [minkernel\crts\ucrt\src\appcrt\misc\terminate.cpp @ 58] 02 00000048`ce0fdbd0 00007ffa`9644232b VCRUNTIME140_1!FindHandler<__FrameHandler4>+0x46f [d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp @ 682] 03 00000048`ce0fdda0 00007ffa`964440e9 VCRUNTIME140_1!__InternalCxxFrameHandler<__FrameHandler4>+0x267 [d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp @ 352] 04 00000048`ce0fde40 00007ff6`424b3918 VCRUNTIME140_1!__CxxFrameHandler4+0xa9 [d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\risctrnsctrl.cpp @ 290] 05 00000048`ce0fdeb0 00007ffa`9cd411cf WindowsTerminal!__GSHandlerCheck_EH4+0x64 [D:\agent\_work\10\s\src\vctools\crt\vcstartup\src\gs\amd64\gshandlereh4.cpp @ 86] 06 00000048`ce0fdee0 00007ffa`9cd0a209 ntdll!RtlpExecuteHandlerForException+0xf [minkernel\ntos\rtl\amd64\xcptmisc.asm @ 132] 07 00000048`ce0fdf10 00007ffa`9cd09fc3 ntdll!RtlDispatchException+0x219 [minkernel\ntos\rtl\amd64\exdsptch.c @ 693] 08 00000048`ce0fe620 00007ffa`9a893b29 ntdll!RtlRaiseException+0x153 [minkernel\ntos\rtl\amd64\raise.c @ 182] 09 00000048`ce0ff4d0 00007ffa`96426480 KERNELBASE!RaiseException+0x69 [minkernel\kernelbase\xcpt.c @ 937] 0a 00000048`ce0ff5b0 00007ff6`4249799a VCRUNTIME140!_CxxThrowException+0x90 [D:\agent\_work\10\s\src\vctools\crt\vcruntime\src\eh\throw.cpp @ 75] 0b 00000048`ce0ff610 00007ff6`4248471b WindowsTerminal!winrt::throw_hresult+0x3ba [C:\a\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\base.h @ 4892] 0c 00000048`ce0ff670 00007ff6`42484986 WindowsTerminal!winrt::check_hresult+0x2b [C:\a\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\base.h @ 4962] 0d 00000048`ce0ff6b0 00007ff6`4248d84c WindowsTerminal!winrt::Windows::Foundation::IActivationFactory::ActivateInstance<winrt::TerminalApp::App>+0xc6 [C:\a\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\base.h @ 6398] 0e 00000048`ce0ff710 00007ff6`42497f3b WindowsTerminal!<lambda_74300ac9aae6189311da41a1000f9c41>::operator()+0x3c [C:\a\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\TerminalApp.h @ 4832] 0f 00000048`ce0ff750 00007ff6`42499a1a WindowsTerminal!<lambda_74300ac9aae6189311da41a1000f9c41>::<lambda_invoker_cdecl>+0x3b [C:\a\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\TerminalApp.h @ 4832] 10 00000048`ce0ff780 00007ff6`4248ffab WindowsTerminal!winrt::impl::factory_cache_entry<winrt::TerminalApp::App,winrt::Windows::Foundation::IActivationFactory>::call<winrt::TerminalApp::App (__cdecl*)(winrt::Windows::Foundation::IActivationFactory const &)>+0x1ea [C:\a\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\base.h @ 6231] 11 00000048`ce0ff820 00007ff6`42490f69 WindowsTerminal!winrt::impl::call_factory_cast<winrt::TerminalApp::App (__cdecl*)(winrt::Windows::Foundation::IActivationFactory const &),winrt::TerminalApp::App,winrt::Windows::Foundation::IActivationFactory,<lambda_74300ac9aae6189311da41a1000f9c41> >+0xab [C:\a\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\base.h @ 6270] 12 00000048`ce0ff860 00007ff6`4249d26a WindowsTerminal!winrt::TerminalApp::App::App+0x39 [C:\a\1\s\src\cascadia\WindowsTerminal\Generated Files\winrt\TerminalApp.h @ 4832] 13 00000048`ce0ff8a0 00007ff6`42497c2b WindowsTerminal!AppHost::AppHost+0x6a [C:\a\1\s\src\cascadia\WindowsTerminal\AppHost.cpp @ 28] 14 00000048`ce0ff990 00007ff6`42491b62 WindowsTerminal!wWinMain+0x19b [C:\a\1\s\src\cascadia\WindowsTerminal\main.cpp @ 126] 15 (Inline Function) --------`-------- WindowsTerminal!invoke_main+0x21 [D:\agent\_work\10\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 118] 16 00000048`ce0ffaa0 00007ffa`9b517bd4 WindowsTerminal!__scrt_common_main_seh+0x106 [D:\agent\_work\10\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288] 17 00000048`ce0ffae0 00007ffa`9cd0ce51 kernel32!BaseThreadInitThunk+0x14 [base\win32\client\thread.c @ 64] 18 00000048`ce0ffb10 00000000`00000000 ntdll!RtlUserThreadStart+0x21 [minkernel\ntdll\rtlstrt.c @ 1153] ``` from dumps out of Helix from https://dev.azure.com/ms/terminal/_build/results?buildId=171754&view=results
Author
Owner

@miniksa commented on GitHub (May 28, 2021):

Honestly I have no idea.

I suspect the SDK change or one of the other startup crashy things.

I'm basically bisecting the last 14ish days of commits by running assorted builds here (https://dev.azure.com/ms/terminal/_build?definitionId=492&_a=summary) while trying to get inspiration by staring at commits/PRs.

@miniksa commented on GitHub (May 28, 2021): Honestly I have no idea. I suspect the SDK change or one of the other startup crashy things. I'm basically bisecting the last 14ish days of commits by running assorted builds here (https://dev.azure.com/ms/terminal/_build?definitionId=492&_a=summary) while trying to get inspiration by staring at commits/PRs.
Author
Owner

@miniksa commented on GitHub (May 29, 2021):

FAIL: 89ca2ae05f - Don't throw in GetProposedDimensions (#10260)
FAIL: 31d78dceb5 - Ignore closeOnExit when a conn. moves from Connecting to Failed (#10263)
FAIL: 31e58809cc - Add cooked data read tracing (#10166)
FAIL: 89af44488f - Emit fixup debug info for internal tooling
FAIL: 504e610841 - openConsole.psm1: fix unapproved verb warning
FAIL: eaeab7a807 - Upgrade Widnows SDK to 19041
PASS: c3bf8a5d25 - doc: Added links to folders and headers mentioned (#10111)

Looks like it broke with the SDK change...

@miniksa commented on GitHub (May 29, 2021): FAIL: https://github.com/microsoft/Terminal/commit/89ca2ae05f7b47bebaec7f6a8ff8538770851af3 - Don't throw in GetProposedDimensions (#10260) FAIL: https://github.com/microsoft/Terminal/commit/31d78dceb5e0153a71bc55568226de151c818435 - Ignore closeOnExit when a conn. moves from Connecting to Failed (#10263) FAIL: https://github.com/microsoft/Terminal/commit/31e58809ccb9769d11c3085cf620f557264748c2 - Add cooked data read tracing (#10166) FAIL: https://github.com/microsoft/Terminal/commit/89af44488f6ac222024c51af35f2ee5a22b97c13 - Emit fixup debug info for internal tooling FAIL: https://github.com/microsoft/Terminal/commit/504e610841dc7f36a2c7c2176a24844eab5648ac - openConsole.psm1: fix unapproved verb warning FAIL: https://github.com/microsoft/terminal/commit/eaeab7a8075e176911064b81b4f35f2167011088 - Upgrade Widnows SDK to 19041 PASS: https://github.com/microsoft/Terminal/commit/c3bf8a5d25b52633a66ad8721bb6ac5363db95fc - doc: Added links to folders and headers mentioned (#10111) Looks like it broke with the SDK change...
Author
Owner

@miniksa commented on GitHub (Jun 8, 2021):

TerminalApp.dll!00007FFAFBFFCB67: ReturnHr(1) tid(f80) 8000FFFF Catastrophic failure
    Msg:[winrt::hresult_error: WindowsXamlManager and DesktopWindowXamlSource are supported for apps targeting Windows version 10.0.18226.0 and later.  Please check either the application manifest or package manifest and ensure the MaxTestedVersion property is updated.] 
(1904.f80): C++ EH exception - code e06d7363 (first chance)

Uhhh... it should be 10.0.19041.0 now which is greater...

@miniksa commented on GitHub (Jun 8, 2021): ``` TerminalApp.dll!00007FFAFBFFCB67: ReturnHr(1) tid(f80) 8000FFFF Catastrophic failure Msg:[winrt::hresult_error: WindowsXamlManager and DesktopWindowXamlSource are supported for apps targeting Windows version 10.0.18226.0 and later. Please check either the application manifest or package manifest and ensure the MaxTestedVersion property is updated.] (1904.f80): C++ EH exception - code e06d7363 (first chance) ``` Uhhh... it should be 10.0.19041.0 now which is greater...
Author
Owner

@miniksa commented on GitHub (Jun 8, 2021):

Patching it to 10.0.18362.0 in the MaxVersionTested field of the embedded manifest makes it work again.

@miniksa commented on GitHub (Jun 8, 2021): Patching it to 10.0.18362.0 in the MaxVersionTested field of the embedded manifest makes it work again.
Author
Owner

@roxk commented on GitHub (Sep 28, 2021):

Hi, we were discussing this issue in the uwp community discord, and just realized the doc for maxversiontested had been updated. Apparently, the proper fix is to include multiple maxversiontested, e.g.

<maxversiontested Id="10.0.18362.0"/>
<maxversiontested id="10.0.19041.0"/>

So instead of treating it like an integer with which comparison is possible (e.g. 19041 > 18362), maxversiontested is a multi-valued string entry.

Seems like this can be fixed with the document way :) Or should I file a separate issue instead?

@roxk commented on GitHub (Sep 28, 2021): Hi, we were discussing this issue in the uwp community discord, and just realized the doc for `maxversiontested` had been [updated](https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/host-standard-control-with-xaml-islands-cpp#create-a-desktop-application-project). Apparently, the proper fix is to include multiple `maxversiontested`, e.g. ``` <maxversiontested Id="10.0.18362.0"/> <maxversiontested id="10.0.19041.0"/> ``` So instead of treating it like an integer with which comparison is possible (e.g. 19041 > 18362), `maxversiontested` is a multi-valued string entry. Seems like this can be fixed with the document way :) Or should I file a separate issue instead?
Author
Owner

@miniksa commented on GitHub (Sep 29, 2021):

The problem is that a machine running 18362 will not recognize 19041 as a valid version that Windows can be and will exclude itself from allowing the package to run. I looked at this internally with the folks behind the code. They recommended that I just set it to 18362 for as long as we want to continue supporting 19H1 with the Terminal package.

@miniksa commented on GitHub (Sep 29, 2021): The problem is that a machine running 18362 will not recognize 19041 as a valid version that Windows can be and will exclude itself from allowing the package to run. I looked at this internally with the folks behind the code. They recommended that I just set it to 18362 for as long as we want to continue supporting 19H1 with the Terminal package.
Author
Owner

@miniksa commented on GitHub (Oct 2, 2021):

Sorry someone brought my attention to this. It looks like I misinterpreted you. I believe it is okay and probably more correct to have the multiple string values as you show, @roxk. But given that practically you only need the lowest one, we can't be bothered to keep track of inserting more of them and will only change it when we raise the minimum.

@miniksa commented on GitHub (Oct 2, 2021): Sorry someone brought my attention to this. It looks like I misinterpreted you. I believe it is okay and probably more correct to have the multiple string values as you show, @roxk. But given that practically you only need the lowest one, we can't be bothered to keep track of inserting more of them and will only change it when we raise the minimum.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14028