Skip to content

Crash on launching WSL from directory background #18851

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

Open
iBreakEverything opened this issue Apr 28, 2025 · 2 comments
Open

Crash on launching WSL from directory background #18851

iBreakEverything opened this issue Apr 28, 2025 · 2 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

Comments

@iBreakEverything
Copy link

iBreakEverything commented Apr 28, 2025

Windows Terminal version

1.22.11141.0

Windows build number

10.0.19045.5737

Other Software

WSL (Linux Tank 5.15.167.4-microsoft-standard-WSL2) with Ubuntu 24.04.2

Steps to reproduce

Right click on directory/desktop background and click open in WSL.

Mentions:

  • this was working fine before the update
  • running the command wt.exe -p "WSL" -d . in terminal spawn a new Terminal window with WSL as a tab
  • WSL is running normally
  • right-click menu option Open in terminal opens a PowerShell, as expected

The command is as follows:

[HKEY_CLASSES_ROOT\Directory\Background\shell\0_WSL_Terminal]
@="Open in WSL Terminal"
"Icon"="C:\\Windows\\System32\\wsl.ico"

[HKEY_CLASSES_ROOT\Directory\Background\shell\0_WSL_Terminal\command]
@="wt.exe -p \"WSL\""

And looks like this:
Image

Two logs are made (error and information) from Event Viewer -> Windows Logs -> System:

Log Name:      Application
Source:        Application Error
Date:          28 Apr 2025 3:34:23 PM
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      Tank
Description:
Faulting application name: WindowsTerminal.exe, version: 1.22.2504.24001, time stamp: 0x680a8a16
Faulting module name: ucrtbase.dll, version: 10.0.19041.3636, time stamp: 0x81cf5d89
Exception code: 0xc0000409
Fault offset: 0x000000000007286e
Faulting process id: 0x345c
Faulting application start time: 0x01dbb839df5be662
Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.22.11141.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Faulting module path: C:\Windows\System32\ucrtbase.dll
Report Id: f1763833-95ac-4920-aabc-2e71065d8f95
Faulting package full name: 
Faulting package-relative application ID: 
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Application Error" />
    <EventID Qualifiers="0">1000</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>100</Task>
    <Opcode>0</Opcode>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2025-04-28T12:34:23.8235848Z" />
    <EventRecordID>10218</EventRecordID>
    <Correlation />
    <Execution ProcessID="0" ThreadID="0" />
    <Channel>Application</Channel>
    <Computer>Tank</Computer>
    <Security />
  </System>
  <EventData>
    <Data>WindowsTerminal.exe</Data>
    <Data>1.22.2504.24001</Data>
    <Data>680a8a16</Data>
    <Data>ucrtbase.dll</Data>
    <Data>10.0.19041.3636</Data>
    <Data>81cf5d89</Data>
    <Data>c0000409</Data>
    <Data>000000000007286e</Data>
    <Data>345c</Data>
    <Data>01dbb839df5be662</Data>
    <Data>C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.22.11141.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe</Data>
    <Data>C:\Windows\System32\ucrtbase.dll</Data>
    <Data>f1763833-95ac-4920-aabc-2e71065d8f95</Data>
    <Data>
    </Data>
    <Data>
    </Data>
  </EventData>
</Event>

Associated Report.wer:

Version=1
EventType=BEX64
EventTime=133903172638489829
ReportType=2
Consent=1
UploadTime=133903172639643527
ReportStatus=268435456
ReportIdentifier=8380a9bf-a0f0-4f69-8f67-c00234df6d48
IntegratorReportIdentifier=f1763833-95ac-4920-aabc-2e71065d8f95
Wow64Host=34404
NsAppName=WindowsTerminal.exe
AppSessionGuid=0000345c-0001-006d-62e6-5bdf39b8db01
TargetAppId=W:000648625e9c21b3804709e667d8fb304a1600000000!00003fe7f5eebfa945b993760235ba4a1cd9dedd5319!WindowsTerminal.exe
TargetAppVer=2025//04//24:18:59:34!b169b!WindowsTerminal.exe
BootId=4294967295
TargetAsId=1835
IsFatal=1
EtwNonCollectReason=1
Response.BucketId=9eb818068b24733ef8ba431a96912277
Response.BucketTable=5
Response.LegacyBucketId=1781810384052757111
Response.type=4
Sig[0].Name=Application Name
Sig[0].Value=WindowsTerminal.exe
Sig[1].Name=Application Version
Sig[1].Value=1.22.2504.24001
Sig[2].Name=Application Timestamp
Sig[2].Value=680a8a16
Sig[3].Name=Fault Module Name
Sig[3].Value=ucrtbase.dll
Sig[4].Name=Fault Module Version
Sig[4].Value=10.0.19041.3636
Sig[5].Name=Fault Module Timestamp
Sig[5].Value=81cf5d89
Sig[6].Name=Exception Offset
Sig[6].Value=000000000007286e
Sig[7].Name=Exception Code
Sig[7].Value=c0000409
Sig[8].Name=Exception Data
Sig[8].Value=0000000000000007
DynamicSig[1].Name=OS Version
DynamicSig[1].Value=10.0.19045.2.0.0.256.48
DynamicSig[2].Name=Locale ID
DynamicSig[2].Value=1033
DynamicSig[22].Name=Additional Information 1
DynamicSig[22].Value=3fce
DynamicSig[23].Name=Additional Information 2
DynamicSig[23].Value=3fcec0d6d4c40021e6df86d25de98a47
DynamicSig[24].Name=Additional Information 3
DynamicSig[24].Value=953e
DynamicSig[25].Name=Additional Information 4
DynamicSig[25].Value=953e7729b153ed20f5829a45a5bff8a4
UI[2]=C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.22.11141.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
LoadedModule[0]=C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.22.11141.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\user32.dll
LoadedModule[5]=C:\Windows\System32\win32u.dll
LoadedModule[6]=C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.22.11141.0_x64__8wekyb3d8bbwe\TerminalThemeHelpers.dll
LoadedModule[7]=C:\Windows\System32\GDI32.dll
LoadedModule[8]=C:\Windows\System32\gdi32full.dll
LoadedModule[9]=C:\Windows\System32\msvcp_win.dll
LoadedModule[10]=C:\Windows\System32\ucrtbase.dll
LoadedModule[11]=C:\Windows\System32\combase.dll
LoadedModule[12]=C:\Windows\System32\shcore.dll
LoadedModule[13]=C:\Windows\System32\RPCRT4.dll
LoadedModule[14]=C:\Windows\System32\msvcrt.dll
LoadedModule[15]=C:\Windows\System32\SHELL32.dll
LoadedModule[16]=C:\Windows\System32\OLEAUT32.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.22.11141.0_x64__8wekyb3d8bbwe\TerminalApp.dll
LoadedModule[24]=C:\Windows\System32\sechost.dll
LoadedModule[25]=C:\Windows\System32\bcrypt.dll
LoadedModule[26]=C:\Windows\System32\ole32.dll
LoadedModule[27]=C:\Windows\SYSTEM32\WINMM.dll
LoadedModule[28]=C:\Windows\System32\Windows.UI.Xaml.dll
LoadedModule[29]=C:\Windows\System32\CoreMessaging.dll
LoadedModule[30]=C:\Windows\System32\iertutil.dll
LoadedModule[31]=C:\Windows\SYSTEM32\ntmarta.dll
LoadedModule[32]=C:\Windows\System32\Bcp47Langs.dll
LoadedModule[33]=C:\Windows\System32\WS2_32.dll
LoadedModule[34]=C:\Windows\System32\advapi32.dll
LoadedModule[35]=C:\Windows\System32\dcomp.dll
LoadedModule[36]=C:\Windows\System32\srvcli.dll
LoadedModule[37]=C:\Windows\System32\netutils.dll
LoadedModule[38]=C:\Windows\System32\twinapi.appcore.dll
LoadedModule[39]=C:\Windows\System32\WinTypes.dll
LoadedModule[40]=C:\Windows\System32\OneCoreUAPCommonProxyStub.dll
LoadedModule[41]=C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.22.11141.0_x64__8wekyb3d8bbwe\Microsoft.Terminal.Control.dll
LoadedModule[42]=C:\Windows\SYSTEM32\uiautomationcore.dll
LoadedModule[43]=C:\Windows\SYSTEM32\DWrite.dll
LoadedModule[44]=C:\Windows\SYSTEM32\d2d1.dll
LoadedModule[45]=C:\Windows\SYSTEM32\dxgi.dll
LoadedModule[46]=C:\Windows\SYSTEM32\d3d11.dll
LoadedModule[47]=C:\Windows\SYSTEM32\D3DCOMPILER_47.dll
LoadedModule[48]=C:\Windows\SYSTEM32\PROPSYS.dll
LoadedModule[49]=C:\Windows\SYSTEM32\CRYPTSP.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=19045
OsInfo[3].Key=ubr
OsInfo[3].Value=5737
OsInfo[4].Key=versp
OsInfo[4].Value=0
OsInfo[5].Key=arch
OsInfo[5].Value=9
OsInfo[6].Key=lcid
OsInfo[6].Value=1033
OsInfo[7].Key=geoid
OsInfo[7].Value=200
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=223169045
OsInfo[15].Key=osinsty
OsInfo[15].Value=2
OsInfo[16].Key=iever
OsInfo[16].Value=11.3636.19041.0-11.0.1000
OsInfo[17].Key=portos
OsInfo[17].Value=0
OsInfo[18].Key=ram
OsInfo[18].Value=31861
OsInfo[19].Key=svolsz
OsInfo[19].Value=349
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.5737.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[33].Value=MD:283BAEF,ME:3038C64,FX:1335985C,ME:3038CEC,FX:133BD387,ME:3039059,FX:13460078,MD:30390AF
OsInfo[34].Key=fconid
OsInfo[35].Key=containerid
OsInfo[36].Key=containertype
OsInfo[37].Key=edu
OsInfo[37].Value=0
FriendlyEventName=Stopped working
ConsentKey=BEX64
AppName=WindowsTerminal.exe
AppPath=C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.22.11141.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
NsPartner=windows
NsGroup=windows8
ApplicationIdentity=C46EDBAE3D8DB2EDB8858EF7B42F14BA
MetadataHash=-834820195

Expected Behavior

Open WSL in new terminal window.

Actual Behavior

Silent crash.

@iBreakEverything iBreakEverything 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 Apr 28, 2025
@DHowett
Copy link
Member

DHowett commented Apr 30, 2025

This puts me in mind of an old issue we used to have on Windows 10...

Can you try a couple things?

  1. Capture us a crash dump following these instructions
  2. Change your path to wt.exe to specifically use our app execution alias, %LOCALAPPDATA%\Microsoft\WindowsApps\wt.exe

For linking purposes: #9452

@DHowett DHowett added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Apr 30, 2025
@iBreakEverything
Copy link
Author

  1. Minidump (background shell) and Minidump (run.exe)
  2. By using the full path in registry C:\Users\Sh4dow\AppData\Local\Microsoft\WindowsApps\wt.exe, now I'm able to open WSL from background shell, thank you. Most likely it's bad permissions, as the crashes happen in explorer and run, but not in cmd, PowerShell, Terminal or even a .bat file.

@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 May 2, 2025
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
Projects
None yet
Development

No branches or pull requests

2 participants