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

Crash at startup when running as admin (combase.dll) #15745

Closed
retr0cube opened this issue Jul 22, 2023 · 18 comments
Closed

Crash at startup when running as admin (combase.dll) #15745

retr0cube opened this issue Jul 22, 2023 · 18 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news.

Comments

@retr0cube
Copy link

retr0cube commented Jul 22, 2023

Windows Terminal version

1.17.11461.0_x64

Windows build number

10.0.19041.172

Other Software

No response

Steps to reproduce

  • Search for Terminal
  • Click "run as administrator"

Expected Behavior

App run in admin mode.

Actual Behavior

Crashes at startup, logs from Event viewer and Report.wer:

Event Name: MoAppCrash
Response: Not available
Cab Id: 0

Problem signature:
P1: Microsoft.WindowsTerminal_1.17.11461.0_x64__8wekyb3d8bbwe
P2: praid:App
P3: 1.17.2305.26001
P4: 647122fe
P5: combase.dll
P6: 10.0.19041.84
P7: 6114ea0b
P8: 802b000a
P9: 000000000008d166
P10: 

Attached files:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER70E0.tmp.dmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER718D.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER71BC.tmp.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER71CE.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER720E.tmp.txt

These files may be available here:
\\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_Microsoft.Window_c95cab772bb266401621f6d5d042da64d12193_4fbd145a_b65fc54e-f2d5-4e11-8a7f-4f736a4bd562

Analysis symbol: 
Rechecking for solution: 0
Report Id: 2a4927a6-dfb0-4778-bc62-85dc78de4825
Report Status: 268435456
Hashed bucket: 49ccb7a5f6313978c1a6890b1d1bdfe0
Cab Guid: 0
EventType=MoAppCrash
EventTime=133345134060649211
ReportType=2
Consent=1
UploadTime=133345134065961715
ReportStatus=268435456
ReportIdentifier=13e4ca62-0155-4e12-adfc-03a2b1974e98
IntegratorReportIdentifier=54d00818-3b9a-4908-9634-324801e07257
Wow64Host=34404
NsAppName=praid:App
AppSessionGuid=00001c3c-0001-002e-e2bd-ee63b1bcd901
TargetAppId=U:Microsoft.WindowsTerminal_1.17.11461.0_x64__8wekyb3d8bbwe!App
TargetAppVer=1.17.11461.0_x64_!2023//05//26:21:22:06!96950!WindowsTerminal.exe
BootId=4294967295
ServiceSplit=3223519416
TargetAsId=3156
IsFatal=1
EtwNonCollectReason=1
Response.BucketId=49ccb7a5f6313978c1a6890b1d1bdfe0
Response.BucketTable=5
Response.LegacyBucketId=1271854625604755424
Response.type=4
Sig[0].Name=Package Full Name
Sig[0].Value=Microsoft.WindowsTerminal_1.17.11461.0_x64__8wekyb3d8bbwe
Sig[1].Name=Application Name
Sig[1].Value=praid:App
Sig[2].Name=Application Version
Sig[2].Value=1.17.2305.26001
Sig[3].Name=Application Timestamp
Sig[3].Value=647122fe
Sig[4].Name=Fault Module Name
Sig[4].Value=combase.dll
Sig[5].Name=Fault Module Version
Sig[5].Value=10.0.19041.84
Sig[6].Name=Fault Module Timestamp
Sig[6].Value=6114ea0b
Sig[7].Name=Exception Code
Sig[7].Value=802b000a
Sig[8].Name=Exception Offset
Sig[8].Value=000000000008d166
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=10.0.19041.2.0.0.256.48
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=14348
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=2d9d
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=2d9dab2327e7bf8b5241fec3eaa7f134
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=628a
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=628acd35f3719b25b543b801b1b49b58
UI[2]=C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.17.11461.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
LoadedModule[0]=C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.17.11461.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
LoadedModule[1]=C:\Windows\SYSTEM32\ntdll.dll
LoadedModule[2]=C:\Windows\System32\KERNEL32.DLL
LoadedModule[3]=C:\Windows\System32\KERNELBASE.dll
LoadedModule[4]=C:\Windows\System32\shcore.dll
LoadedModule[5]=C:\Windows\System32\msvcrt.dll
LoadedModule[6]=C:\Windows\System32\combase.dll
LoadedModule[7]=C:\Windows\System32\ucrtbase.dll
LoadedModule[8]=C:\Windows\System32\RPCRT4.dll
LoadedModule[9]=C:\Windows\System32\user32.dll
LoadedModule[10]=C:\Windows\System32\win32u.dll
LoadedModule[11]=C:\Windows\System32\GDI32.dll
LoadedModule[12]=C:\Windows\System32\gdi32full.dll
LoadedModule[13]=C:\Windows\System32\msvcp_win.dll
LoadedModule[14]=C:\Windows\System32\SHELL32.dll
LoadedModule[15]=C:\Windows\System32\OLEAUT32.dll
LoadedModule[16]=C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.17.11461.0_x64__8wekyb3d8bbwe\TerminalThemeHelpers.dll
LoadedModule[17]=C:\Windows\SYSTEM32\dwmapi.dll
LoadedModule[18]=C:\Windows\SYSTEM32\UxTheme.dll
LoadedModule[19]=C:\Windows\System32\IMM32.DLL
LoadedModule[20]=C:\Windows\SYSTEM32\kernel.appcore.dll
LoadedModule[21]=C:\Windows\System32\bcryptPrimitives.dll
LoadedModule[22]=C:\Windows\System32\clbcatq.dll
LoadedModule[23]=C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.17.11461.0_x64__8wekyb3d8bbwe\TerminalApp.dll
LoadedModule[24]=C:\Windows\System32\sechost.dll
LoadedModule[25]=C:\Windows\SYSTEM32\WINMM.dll
LoadedModule[26]=C:\Windows\System32\Windows.UI.Xaml.dll
LoadedModule[27]=C:\Windows\System32\CoreMessaging.dll
LoadedModule[28]=C:\Windows\System32\WS2_32.dll
LoadedModule[29]=C:\Windows\System32\Bcp47Langs.dll
LoadedModule[30]=C:\Windows\System32\iertutil.dll
LoadedModule[31]=C:\Windows\System32\dcomp.dll
LoadedModule[32]=C:\Windows\System32\advapi32.dll
LoadedModule[33]=C:\Windows\System32\twinapi.appcore.dll
LoadedModule[34]=C:\Windows\System32\WinTypes.dll
LoadedModule[35]=C:\Windows\System32\OneCoreUAPCommonProxyStub.dll
LoadedModule[36]=C:\Windows\System32\Windows.UI.dll
LoadedModule[37]=C:\Windows\System32\TextInputFramework.dll
LoadedModule[38]=C:\Windows\System32\WindowManagementAPI.dll
LoadedModule[39]=C:\Windows\System32\InputHost.dll
LoadedModule[40]=C:\Windows\System32\CoreUIComponents.dll
LoadedModule[41]=C:\Windows\System32\PROPSYS.dll
LoadedModule[42]=C:\Windows\SYSTEM32\ntmarta.dll
LoadedModule[43]=C:\Windows\System32\MSCTF.dll
LoadedModule[44]=C:\Windows\System32\UiaManager.dll
LoadedModule[45]=C:\Windows\SYSTEM32\urlmon.dll
LoadedModule[46]=C:\Windows\SYSTEM32\dxgi.dll
LoadedModule[47]=C:\Windows\System32\MrmCoreR.dll
LoadedModule[48]=C:\Windows\SYSTEM32\windows.staterepositoryclient.dll
LoadedModule[49]=C:\Windows\SYSTEM32\windows.staterepositorycore.dll
LoadedModule[50]=C:\Windows\SYSTEM32\d3d11.dll
LoadedModule[51]=C:\Windows\SYSTEM32\igd10umd64.dll
LoadedModule[52]=C:\Windows\SYSTEM32\dxcore.dll
LoadedModule[53]=C:\Windows\System32\cfgmgr32.dll
LoadedModule[54]=C:\Windows\System32\profapi.dll
LoadedModule[55]=C:\Windows\System32\bcp47mrm.dll
LoadedModule[56]=C:\Windows\SYSTEM32\d2d1.dll
LoadedModule[57]=C:\Windows\SYSTEM32\dwrite.dll
LoadedModule[58]=C:\Windows\SYSTEM32\TextShaping.dll
LoadedModule[59]=C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.7_7.2208.15002.0_x64__8wekyb3d8bbwe\Microsoft.UI.Xaml.dll
LoadedModule[60]=C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.17.11461.0_x64__8wekyb3d8bbwe\MSVCP140_APP.dll
LoadedModule[61]=C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.17.11461.0_x64__8wekyb3d8bbwe\VCRUNTIME140_1_APP.dll
LoadedModule[62]=C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.17.11461.0_x64__8wekyb3d8bbwe\VCRUNTIME140_APP.dll
LoadedModule[63]=C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.UWPDesktop_14.0.32530.0_x64__8wekyb3d8bbwe\VCRUNTIME140.dll
LoadedModule[64]=C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.UWPDesktop_14.0.32530.0_x64__8wekyb3d8bbwe\msvcp140.DLL
LoadedModule[65]=C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.UWPDesktop_14.0.32530.0_x64__8wekyb3d8bbwe\VCRUNTIME140_1.dll
LoadedModule[66]=C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.17.11461.0_x64__8wekyb3d8bbwe\Microsoft.Terminal.Control.dll
LoadedModule[67]=C:\Windows\SYSTEM32\uiautomationcore.dll
LoadedModule[68]=C:\Windows\SYSTEM32\D3DCOMPILER_47.dll
LoadedModule[69]=C:\Windows\SYSTEM32\CRYPTSP.dll
LoadedModule[70]=C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.17.11461.0_x64__8wekyb3d8bbwe\Microsoft.Terminal.Settings.Editor.dll
LoadedModule[71]=C:\Windows\System32\bcrypt.dll
State[0].Key=Transport.DoneStage1
State[0].Value=1
OsInfo[0].Key=vermaj
OsInfo[0].Value=10
OsInfo[1].Key=vermin
OsInfo[1].Value=0
OsInfo[2].Key=verbld
OsInfo[2].Value=19041
OsInfo[3].Key=ubr
OsInfo[3].Value=172
OsInfo[4].Key=versp
OsInfo[4].Value=0
OsInfo[5].Key=arch
OsInfo[5].Value=9
OsInfo[6].Key=lcid
OsInfo[6].Value=1036
OsInfo[7].Key=geoid
OsInfo[7].Value=159
OsInfo[8].Key=sku
OsInfo[8].Value=48
OsInfo[9].Key=domain
OsInfo[9].Value=0
OsInfo[10].Key=prodsuite
OsInfo[10].Value=256
OsInfo[11].Key=ntprodtype
OsInfo[11].Value=1
OsInfo[12].Key=platid
OsInfo[12].Value=10
OsInfo[13].Key=sr
OsInfo[13].Value=0
OsInfo[14].Key=tmsi
OsInfo[14].Value=222239078
OsInfo[15].Key=osinsty
OsInfo[15].Value=2
OsInfo[16].Key=iever
OsInfo[16].Value=11.153.19041.0-11.0.180
OsInfo[17].Key=portos
OsInfo[17].Value=0
OsInfo[18].Key=ram
OsInfo[18].Value=3996
OsInfo[19].Key=svolsz
OsInfo[19].Value=85
OsInfo[20].Key=wimbt
OsInfo[20].Value=0
OsInfo[21].Key=blddt
OsInfo[21].Value=191206
OsInfo[22].Key=bldtm
OsInfo[22].Value=1406
OsInfo[23].Key=bldbrch
OsInfo[23].Value=vb_release
OsInfo[24].Key=bldchk
OsInfo[24].Value=0
OsInfo[25].Key=wpvermaj
OsInfo[25].Value=0
OsInfo[26].Key=wpvermin
OsInfo[26].Value=0
OsInfo[27].Key=wpbuildmaj
OsInfo[27].Value=0
OsInfo[28].Key=wpbuildmin
OsInfo[28].Value=0
OsInfo[29].Key=osver
OsInfo[29].Value=10.0.19041.172.amd64fre.vb_release.191206-1406
OsInfo[30].Key=buildflightid
OsInfo[31].Key=edition
OsInfo[31].Value=Professional
OsInfo[32].Key=ring
OsInfo[32].Value=Retail
OsInfo[33].Key=expid
OsInfo[34].Key=fconid
OsInfo[35].Key=containerid
OsInfo[36].Key=containertype
OsInfo[37].Key=edu
OsInfo[37].Value=0
FriendlyEventName=Stopped working
ConsentKey=MoAppCrash
AppName=WindowsTerminal.exe
AppPath=C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.17.11461.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
NsPartner=windows
NsGroup=windows8
ApplicationIdentity=311F4DB7B37CBB1BC60A45F31E7D0E10
MetadataHash=-1308790757```
@retr0cube retr0cube added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jul 22, 2023
@retr0cube
Copy link
Author

retr0cube commented Jul 22, 2023

NOTE: Looking at the event viewer i also see tons of errors/warnings related to DistributedCOM

@lhecker
Copy link
Member

lhecker commented Jul 24, 2023

Note to team: There's a number of crashes on watson and I've requested more data.

@retr0cube
Copy link
Author

Note to team: There's a number of crashes on watson and I've requested more data.

What's watson?

@lhecker
Copy link
Member

lhecker commented Jul 25, 2023

It's another name for Windows Error Reporting.

@carlos-zamora carlos-zamora added the Product-Terminal The new Windows Terminal. label Jul 26, 2023
@carlos-zamora carlos-zamora added this to the Terminal v1.19 milestone Jul 26, 2023
@carlos-zamora carlos-zamora added the Severity-Crash Crashes are real bad news. label Jul 26, 2023
@carlos-zamora
Copy link
Member

Hey @retr0cube. Can you confirm your OS version number please? Is it still 10.0.19041.172?

@zadjii-msft
Copy link
Member

Hmmmmmmm blame looks like it's pointing towards:

std::filesystem::path GetBaseSettingsPath()
{
static auto baseSettingsPath = []() {
if (!IsPackaged() && IsPortableMode())
{
std::filesystem::path modulePath{ wil::GetModuleFileNameW<std::wstring>(wil::GetModuleInstanceHandle()) };
modulePath.replace_filename(PortableModeSettingsFolder);
std::filesystem::create_directories(modulePath);
return modulePath;
}
wil::unique_cotaskmem_string localAppDataFolder;
// KF_FLAG_FORCE_APP_DATA_REDIRECTION, when engaged, causes SHGet... to return
// the new AppModel paths (Packages/xxx/RoamingState, etc.) for standard path requests.
// Using this flag allows us to avoid Windows.Storage.ApplicationData completely.
THROW_IF_FAILED(SHGetKnownFolderPath(FOLDERID_LocalAppData, KF_FLAG_FORCE_APP_DATA_REDIRECTION, nullptr, &localAppDataFolder));
std::filesystem::path parentDirectoryForSettingsFile{ localAppDataFolder.get() };
if (!IsPackaged())
{
parentDirectoryForSettingsFile /= UnpackagedSettingsFolderName;
}
// Create the directory if it doesn't exist
std::filesystem::create_directories(parentDirectoryForSettingsFile);
return parentDirectoryForSettingsFile;
}();
return baseSettingsPath;
}

Like, IsPackaged is throwing an exception STOWED_EXCEPTION_802b000a_TerminalApp.dll!winrt::impl::consume_Windows_ApplicationModel_IPackageStatics_winrt::Windows::ApplicationModel::IPackageStatics_::Current BUT

_TIL_INLINEPREFIX bool IsPackaged()
{
static const auto isPackaged = []() -> bool {
try
{
const auto package = winrt::Windows::ApplicationModel::Package::Current();
return true;
}
catch (...)
{
return false;
}
}();
return isPackaged;
}

@retr0cube
Copy link
Author

Hey @retr0cube. Can you confirm your OS version number please? Is it still 10.0.19041.172?

@carlos-zamora yep, it's still the same

@DHowett
Copy link
Member

DHowett commented Jul 26, 2023

If you're wondering why we asked...

That's an alarmingly low build and revision number! Terminal depends on some things that have been fixed in Windows Update, but that version number predates the first publicly available Windows 10 20H1 update.

Is this machine an insider program "drop-out"? It sounds like that version was not released to the public.

@DHowett DHowett added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jul 26, 2023
@retr0cube
Copy link
Author

retr0cube commented Jul 26, 2023

If you're wondering why we asked...

That's an alarmingly low build and revision number! Terminal depends on some things that have been fixed in Windows Update, but that version number predates the first publicly available Windows 10 20H1 update.

Is this machine an insider program "drop-out"? It sounds like that version was not released to the public.

No, this is 2004 an I'm not in an insider program. I plan to update it to 22h2 Soon™

Side story: Well I had 22h2 but I had a boot sector corruption and was unable to boot and because I didn't have a USB I gave my laptop for someone else to reinstall Windows for me but they installed 2004

Edit: I'm not sure if that's the NT version or the Windows version. I copied it from Powershell (the part where it says "Microsoft Windows 10 (10.0.....)")

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jul 26, 2023
@DHowett
Copy link
Member

DHowett commented Jul 26, 2023

Hmm. Do you get the same version number if you run winver?

@retr0cube
Copy link
Author

I don't have access to my laptop right now because I'm going to sleep, will inform you tomorrow!

@zadjii-msft zadjii-msft added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Jul 27, 2023
@zadjii-msft
Copy link
Member

Hmm, in these stacks, we're all

  • TerminalApp.dll!winrt::TerminalApp::implementation::App::Initialize
    • instantiating the Xaml host
      • SharedInstance'::2'::lambda_1::lambda_invoker_cdecl`
        • ApplicationModel::IPackageStatics_::Current
          • WindowsXamlManagerFactory::InitializeForCurrentThread
            • (eventually getting to ) Windows.UI.Xaml.dll!DirectUI::FrameworkApplicationGenerated::StartOnCurrentThread
              • (couple more frames to) Windows.UI.Xaml.dll!DirectUI::FrameworkApplication::LoadComponent
                • (eventually crashing north of here)

That's mildly curious, that the ApplicationState::SharedInstance is called in that frame at all... But maybe that's just a red herring

@retr0cube
Copy link
Author

retr0cube commented Jul 27, 2023

Hmm. Do you get the same version number if you run winver?

Here's what winver and cmd report:
image

The link that you provided seems to talk about the same Build but the copyright year is different?

Update: I think this is an Insider build
image

Update 2: Windows updated to 19041.1415 and no longer part of the insider program

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jul 27, 2023
@retr0cube
Copy link
Author

retr0cube commented Aug 7, 2023

@zadjii-msft After updating Windows 10 to 22H2, The problem no longer occurs. The event viewer (watson) no longer complains about DCOM and combase.dll

It looks like Terminal relies on some functionality that is broken in older versions of Windows 10, that's because I noticed that the UAC prompt in 2004 referred to Terminal as "Unknown Program", but that changed to "Terminal" in 22H2.

@zadjii-msft
Copy link
Member

because I noticed that the UAC prompt in 2004 referred to Terminal as "Unknown Program", but that changed to "Terminal" in 22H2

Ah, that's actually a well known bug (at least on our team) in the way the app platform, elevation, and centennial apps interact. They did fix that for Windows 11, but alas, couldn't backport that to certain older Win10 versions.


It honestly could have been any number of things. Maybe things that were fixed in the OS that we never knew about! Glad it's at least fixed, and thanks for following up!

@zadjii-msft
Copy link
Member

Leaving notes to self:

@lonelam
Copy link

lonelam commented Sep 12, 2023

Hi, I have the almost same issue on 21H2(19044.1288) and I could not upgrade the system because the system update is restricted by my company's policy.
Is there any work around to prevent this crash?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Product-Terminal The new Windows Terminal. Severity-Crash Crashes are real bad news.
Projects
None yet
Development

No branches or pull requests

6 participants