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

Windows Terminal will not open #17255

Open
hazeyez opened this issue May 13, 2024 · 8 comments
Open

Windows Terminal will not open #17255

hazeyez opened this issue May 13, 2024 · 8 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 Severity-Crash Crashes are real bad news.

Comments

@hazeyez
Copy link

hazeyez commented May 13, 2024

Windows Terminal version

1.19.11213.0 & 1.21.1272.0

Windows build number

Win10 22H2 build 19045.4355

Other Software

N/A

Steps to reproduce

Windows Terminal will not open now, as of a couple weeks ago.

It will not run by opening wt.exe, or WIndowsTerminal.exe. Regularly, or as administrator. In it's default folder, or by typing wt.exe in "run:"

I've tried rebooting, I've ensured the system is fully updated, I've tried Settings>Apps>Windows Terminal>Advanced Options> Terminate/Repair/Reset.

It started with v 1.19.11213.0 which I've had installed from Windows Store for a while now. It was working fine up until a couple weeks ago. I don't know what's changed other than maybe a system update? I've also tried uninstalling it then reinstalling it - same issue. Then, I uninstalled it and installed v 1.21.1272.0 - same exact issue. It runs at first launch after install, then won't open after.

It will only open from Windows Store > Windows Terminal > "Open" -- but without any of my settings.

I've looked online (and yes, I've looked in Github Open & Closed issues) and I've tried just about everything except the generic MS Agent response to:

1) del /f /s /q /a "%LocalAppData%\Packages\Microsoft.WindowsTerminal_*\LocalState\settings.json"

2) Download windows installer > Upgrade PC Now > Keep Files

I am not going to reinstall windows and have to backup 1tb of data or risk it being lost over this.

There needs to be a different way?

I'm at the point of deleting anything "WindowsTerminal" in Windows Registry but I have not done so unless you tell me to, or another option.

C:\WINDOWS\system32>DISM /Online /Cleanup-Image /CheckHealth

Deployment Image Servicing and Management tool
Version: 10.0.19041.3636

Image Version: 10.0.19045.4355

No component store corruption detected.
The operation completed successfully.
C:\WINDOWS\system32>sfc /scannow

Beginning system scan.  This process will take some time.

Beginning verification phase of system scan.
Verification 100% complete.

Windows Resource Protection did not find any integrity violations.

Edit:

Per the github-actions bot, before posting this I also did find #14133 which refers to #14104 - which recommends to simply install "Windows Media Feature Pack" -- however, that is for Windows N versions. So I did not do it.

They also reference #14110 & #14124 - which appears to be a different error, but it did prompt me to look at Event Viewer:

Regular opening attempt of wt.exe as non-administrator:

Faulting application name: WindowsTerminal.exe, version: 1.19.2404.30003, time stamp: 0x663158bd
Faulting module name: ucrtbase.dll, version: 10.0.19041.3636, time stamp: 0x81cf5d89
Exception code: 0xc0000409
Fault offset: 0x000000000007286e
Faulting process id: 0x1f90
Faulting application start time: 0x01daa5103b89c37d
Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.19.11213.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Faulting module path: C:\WINDOWS\System32\ucrtbase.dll
Report Id: cfe9c59a-12b4-4ea2-97d3-b83a0c38df62
Faulting package full name: 
Faulting package-relative application ID: 

Attempt at opening wt.exe with "Run ad Administrator:

Faulting application name: WindowsTerminal.exe, version: 1.19.2404.30003, time stamp: 0x663158bd
Faulting module name: ucrtbase.dll, version: 10.0.19041.3636, time stamp: 0x81cf5d89
Exception code: 0xc0000409
Fault offset: 0x000000000007286e
Faulting process id: 0x2ec0
Faulting application start time: 0x01daa51054d81854
Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.19.11213.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Faulting module path: C:\WINDOWS\System32\ucrtbase.dll
Report Id: 6ef3592e-3575-4d14-b563-713b917d42d4
Faulting package full name: 
Faulting package-relative application ID: 

Appears to be a different faulting DLL than those issues referenced.

Per the feedback in all of those issues - I will also send feedback via the Feedback Hub, however I really would appreciate some insight or a fix here asap because Windows Terminal is meta, and I need to use it!!!

Thanks!

Expected Behavior

The program to run regularly.

Actual Behavior

The program will not open other than via Windows Store > Open, with stock settings.

@hazeyez hazeyez 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 May 13, 2024
Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@lhecker
Copy link
Member

lhecker commented May 13, 2024

If you send a feedback via the Feedback Hub, can you please share a link here?
Additionally (or alternatively) can you go to %LOCALAPPDATA%\CrashDumps and check if there are any WindowsTerminal.exe.dmp files?


I am not going to reinstall windows and have to backup 1tb of data or risk it being lost over this.

It's definitely not my right to meddle, but if you're afraid of losing that data (= can't restore it some other way), and don't have a backup of that data right now, it's already as critical as it gets. As you're probably aware, even when your PC is completely switched off, any file on your SSD/HDD may randomly corrupt itself, even if the likelihood is small. The likelihood gets way larger if it's switched on. Please consider making backups of data you cannot restore some other way soon.

@hazeyez
Copy link
Author

hazeyez commented May 13, 2024

If you send a feedback via the Feedback Hub, can you please share a link here? Additionally (or alternatively) can you go to %LOCALAPPDATA%\CrashDumps and check if there are any WindowsTerminal.exe.dmp files?

I am not going to reinstall windows and have to backup 1tb of data or risk it being lost over this.

It's definitely not my right to meddle, but if you're afraid of losing that data (= can't restore it some other way), and don't have a backup of that data right now, it's already as critical as it gets. As you're probably aware, even when your PC is completely switched off, any file on your SSD/HDD may randomly corrupt itself, even if the likelihood is small. The likelihood gets way larger if it's switched on. Please consider making backups of data you cannot restore some other way soon.

Feedback Hub with recording && CrashDump files shared: https://aka.ms/AAqd98q

Self-hosted .dmp files from %LOCALAPPDATA%\CrashDumps : https://www.sign-off-the-internet-and-get-a.life/CrashDumps/

I can back up my data, it's just time consuming. It's also annoying to have to reinstall Windows over this issue, I just hoped that there would be an easier manual solution. Even if not all that easy...

I will start backing up my data, I suppose.

Please keep me posted on your findings and suggestions! Thanks for the reply, and let me know if you need anything else.

@lhecker
Copy link
Member

lhecker commented May 13, 2024

Regarding your system, I have bad news. All of your dumps show:

*** WARNING: Check Image - Checksum mismatch - Dump: 0x106d34, File: 0x1038b3 - C:\Symbols\sym\sym\ucrtbase.dll\81CF5D89100000\ucrtbase.dll

(That's probably C:\Windows\System32\ucrtbase.dll.)
This corruption will probably not break your system instantly, but if you have any backup plans, I suggest making them very soon. Maybe DISM detects corruptions in ucrtbase.dll and this is just a false alarm, but this warning is mildly concerning, because one usually doesn't see it.


  • WindowsTerminal.exe.20628.dmp is a crash in XAML/WinUI and is probably not what you're usually hitting.
  • WindowsTerminal.exe.36432.dmp is the only crash in Windows Terminal Preview 1.21 and probably the best lead. Its FAILURE_ID_HASH is 3638c755-7d8f-cc6a-d47f-a527d4b38699.
  • All the other ones are 1.19 and have no proper stack trace. Their FAILURE_ID_HASH is 15d5ad85-1fad-32ad-f179-efa79edef8d2 which seems to be happening for a number of people since about 2024-05-02 and not just you. It seems it's exclusive to 1.19 though. It's possible that it's actually the same crash as the previous bullet point, but in disguise.

Regarding WindowsTerminal.exe.36432.dmp: Unfortunately, you're the only person who has hit this so far. Your dump shows an error code of 0x80040154 which could be REGDB_E_CLASSNOTREG. Googling for that doesn't bring up inspiring results, in particular when considering the checksum warning: https://stackoverflow.com/a/1496238

However, this is only a guess. It's possible that the application is crashing for you and others for a different reason. It's difficult to say what it could be, especially since the Feedback Hub item doesn't seem to be processed yet. If you want to investigate this yourself, you can install WinDbg from the app store (https://www.microsoft.com/store/productId/9PGJGD53TN86), click "Launch app package" and launch Windows Terminal Preview. You won't have source code access inside WinDbg unfortunately, but you at least get the stack traces of anything that's happening.

@hazeyez
Copy link
Author

hazeyez commented May 14, 2024

@lhecker I appreciate your experienced insight and willingness to go out of your way to help. Well explained, and suggested. I will continue to dig a bit and see what I find.. I suppose a back up + refresh / restore point is in order, ultimately. I honestly might just try win11.

If they're throwing different errors based on version, I'll try other versions also. And not sure what I'd be looking at with stack traces, but I'll do some googling and also let you know what transpires, if anything else.

No way to simply try and replace that ucrtbase.dll, eh? I don't want to download one randomly online for security reasons.. and from what I see I can't find Microsoft offering one.

Please don't close the issue yet, if you don't mind. I hope this reference helps your dev team and also anyone in the future. Thanks again!

@lhecker
Copy link
Member

lhecker commented May 14, 2024

No way to simply try and replace that ucrtbase.dll, eh? I don't want to download one randomly online for security reasons.. and from what I see I can't find Microsoft offering one.

Just to be clear, I'm not 100% sure if the warning is correct. It's just not something I usually see in my own Windows 10 dumps. I can give you my C:\Symbols\sym\sym\ucrtbase.dll\81CF5D89100000\ucrtbase.dll file: ucrtbase.zip
If you open its properties and go to the Signatures tab, you should see that it's signed by Microsoft.

Edit: Oh, I almost forgot to mention:
⚠️ PLEASE ONLY REPLACE IT AFTER MAKING BACKUPS! ⚠️ Almost every application uses ucrtbase.dll. If anything is wrong with my version, then Windows will not boot anymore.

Before you replace it, could you check if their checksums match? If you don't know how, launch PowerShell and run:

Get-FileHash SHA1 <path>

If they don't match, could you upload your version as a .zip here? We'd be interested to see what the differences are. (You should also keep a copy yourself of course, just to be sure.)

Please don't close the issue yet, if you don't mind.

For what it's worth, I'm not 100% sure it's because of just your system. We do have an overall increase in 15d5ad85-1fad-32ad-f179-efa79edef8d2 crashes after all. So, I fully agree with you.

@carlos-zamora carlos-zamora added the Severity-Crash Crashes are real bad news. label May 15, 2024
@carlos-zamora carlos-zamora added this to the Terminal v1.22 milestone May 15, 2024
@carlos-zamora carlos-zamora added the Needs-Attention The core contributors need to come back around and look at this ASAP. label May 15, 2024
@hazeyez
Copy link
Author

hazeyez commented May 24, 2024

@lhecker Hey, Sorry it's been over a week. I've been meaning to reply, finally got some time to sit down and analyze some things.

The SHA-1 of the .dll file you provided C:\Users\hazey\Downloads\ucrtbase\ucrtbase.dll matches the .dll file path being shown in WinDbg .dmp file logs WARNING: Check Image - Checksum mismatch - Dump: 0x106d34, File: 0x1038b3 - C:\ProgramData\Dbg\sym\ucrtbase.dll\81CF5D89100000\ucrtbase.dll on my end.

PS C:\> Get-FileHash -Path "C:\Users\hazey\Downloads\ucrtbase\ucrtbase.dll" -Algorithm SHA1

Algorithm       Hash                                                                   Path
---------       ----                                                                   ----
SHA1            35C04E8403FB7BC7FCF7868B51ABC6BD499C5192                               C:\Users\hazey\Downloads\ucrtbase\ucrtbase.dll


PS C:\> Get-FileHash -Path "C:\ProgramData\Dbg\sym\ucrtbase.dll\81CF5D89100000\ucrtbase.dll" -Algorithm SHA1

Algorithm       Hash                                                                   Path
---------       ----                                                                   ----
SHA1            35C04E8403FB7BC7FCF7868B51ABC6BD499C5192                               C:\ProgramData\Dbg\sym\ucrtbase.dll\81CF5D89100000\ucrtbase.dll

However, I am failing to see how this is relevant - or where the .dmp files got that .dll path & file, unless it creates a new version of the .dll in that path upon hitting the error or upon running WinDbg. I believe that is the case, because that .dll shows a file creation date of May 15, 2024 which is when I ran the WinDbg again.

Point being, it does not match the SHA-1 checksum on the .dll in the notes on the error in the Event Viewer logs wherein it shows Faulting module path: C:\WINDOWS\System32\ucrtbase.dll

PS C:\> Get-FileHash -Path "C:\WINDOWS\System32\ucrtbase.dll" -Algorithm SHA1

Algorithm       Hash                                                                   Path
---------       ----                                                                   ----
SHA1            F156A272DBC6695CC170B6091EF8CD41DB7BA040                               C:\WINDOWS\System32\ucrtbase.dll

Again, as per relevance, I'm going through these other details in this response because A) I am involved in cyber security pentesting and for all I know I could have a malicious DLL here (I will note on this further shortly) and B) I don't really know 100% of what I'm looking at here, for all I know any of this information could potentially help you and your team or possibly give us some new insight on other things to check, at your discretion. So apologies if it seems like a lot.

After reading your last response, on May 15th I took it upon myself to install and evaluate multiple different versions of WindowsTerminal.. from 1.21 back to about 1.15-ish. I think I skipped 1.16, maybe 1.17... Same issue - runs first time when launched from install - or from Windows Store if the version matches to one on there - otherwise crashes when trying to open from file, taskbar search, or "run" (WindowsKey+R).

I also downloaded WinDbg as you suggested, and also ran it on all the .dmp files that I sent you from the previous session.

STRANGELY -- I am not getting the same FAILURE_ID_HASH -- even on the same .dmp files you processed from that first session?? I don't think the Failure ID Hash differs from PC to PC, or session to session, based on your statement that you're getting duplicate failure hashes from multiple users...

  • For WindowsTerminal.exe.36432.dmp I got FAILURE_ID_HASH: {e31753ac-c98a-8055-3663-47e707543d20} which doesn't match yours, for Windows Terminal Preview v1.21

  • For WindowsTerminal.exe.22232.dmp & WindowsTerminal.exe.21672.dmp & WindowsTerminal.exe.20104.dmp I got the same FAILURE_ID_HASH: {e31753ac-c98a-8055-3663-47e707543d20} for Windows Terminal v1.19 -- all of which are either different installs or me just trying to open the program a different time.

    • ^^ All have ERROR_CODE: (NTSTATUS) 0xc0000409 - "The system detected an overrun of a stack-based buffer in this application. This overrun could potentially allow a malicious user to gain control of this application."
  • For WindowsTerminal.exe.20628.dmp which I believe is for Windows Terminal v1.21 I got FAILURE_ID_HASH: {b9efb0c8-7ba7-8f0b-b47a-fd1770cb6293} which doesn't match yours, but same error with the WinUI/XAML.

    • ^^ Which is ERROR_CODE: (NTSTATUS) 0xc0000005 - "The instruction at 0x%p referenced memory at 0x%p. The memory could not be %s."

CrashDumps_from_May13-2024.zip -- All crash dumps from May 13th for Windows Terminal versions 1.19 & 1.21

WinDbg_log_WindowsTerminal_dmp_files_from_May13-2024.txt -- WinDbg logs from the May 13th .dmp files I ran. (I only did the recent most 5 .dmp files, figuring they'd all be similar.).


May 15th 2024 retry of different versions:

v1.19.11213:

  • WindowsTerminal.exe.30236.dmp
  • FAILURE_ID_HASH: {e31753ac-c98a-8055-3663-47e707543d20}

v1.20.11271:

  • WindowsTerminal.exe.26772.dmp
  • FAILURE_ID_HASH: {e31753ac-c98a-8055-3663-47e707543d20}

v1.21.11271:

  • WindowsTerminal.exe.21276.dmp
  • FAILURE_ID_HASH: {e31753ac-c98a-8055-3663-47e707543d20}

v1.18.10301:

  • WindowsTerminal.exe.29988.dmp
  • FAILURE_ID_HASH: {e31753ac-c98a-8055-3663-47e707543d20}

v1.15.2524:

  • WindowsTerminal.exe.27824.dmp
  • FAILURE_ID_HASH: {e31753ac-c98a-8055-3663-47e707543d20}

^^ ALL ERROR_CODE: (NTSTATUS) 0xc0000409 - "The system detected an overrun of a stack-based buffer in this application. This overrun could potentially allow a malicious user to gain control of this application."

CrashDumps_from_May15-2024.zip - All .dmp files from May 15th, 2024

WinDbg_log_WindowsTerminal_dmp_files_from_May15-2024.txt - WinDbg logs for .dmp files from May 15th, 2024


May 22nd, 2024 - retry of v1.19 from MS Store:

v1.19.11213:

  • WindowsTerminal.exe.32660.dmp
  • FAILURE_ID_HASH: {2f8ddf11-773f-f784-ac2b-d6c9d216b29e}

^^ ERROR_CODE: (NTSTATUS) 0xc0000409 - "The system detected an overrun of a stack-based buffer in this application. This overrun could potentially allow a malicious user to gain control of this application."

CrashDump_from_May22-2024.zip - .dmp file from May 22nd, 2024

WinDbg_log_WindowsTerminal_dmp_files_from_May22-2024.txt - WinDbg log file for the .dmp from May 22nd, 2024


Okay, so as you can see -- I am getting completely different FAILURE_ID_HASH values on different dates, for different versions (save for the one WinUI/XML error which is an outlier) -- but they all have the same ERROR_CODE.

As I alluded to earlier in the post, I am a cybersecurity hobbyist. I have to wonder if I have a poisoned DLL file in ucrtbase.dll, especially after seeing that error message ERROR_CODE: (NTSTATUS) 0xc0000409 - The system detected an overrun of a stack-based buffer in this application. This overrun could potentially allow a malicious user to gain control of this application.

I ran Norton on both ucrtbase.dll files that I gave you the SHA-1 checksums for, no red flags. However, I know that does not mean anything. Perhaps it's severe speculation, but I have to wonder, because it is very possible. Even though, I do not even play with malware on purpose, or at all - for that matter. I do CTF events, etc, and some minor research on web apps and systems. Nothing ever outside of a virtual machine.

Anyway, tell me what you think. If nothing else, then I am going to backup my data this weekend and do the windows refresh. I actually just built a brand new PC with Win 11 Pro so in the end, this won't matter much for me. Regardless, I would still like to get to the bottom of it, even if it only helps you guys out in any form.

Here is the ucrtbase.dll from C:\Windows\System32\ucrtbase.dll which is the initial .dll used which is throwing the error as seen in Event Viewer, and does not match your file checksum:
ucrtbase_dll_from_C-Windows-System32-ucrtbase_dll.zip

Here is the ucrtbase.dll from C:\ProgramData\Dbg\sym\ucrtbase.dll\81CF5D89100000\ucrtbase.dll even though you only wanted it if the checksum did not match, just want to send everything:
ucrtbase_dll_from_C-ProgramData-Dbg-sym.zip

The WinDbg logs state *** WARNING: Check Image - Checksum mismatch - Dump: 0x106d34, File: 0x1038b3 - C:\ProgramData\Dbg\sym\ucrtbase.dll\81CF5D89100000\ucrtbase.dll so, who knows if that is relevant or not...

Thanks again, let me know if you need anything else.

PS: Perhaps you'll also find some different, helpful info in the stack trace / STACK_TEXT of some of these.

@hazeyez
Copy link
Author

hazeyez commented May 29, 2024

Worth noting that I found yesterday.. searching and opening "CMD" "PowerShell" or "WSL" in Windows search/start button opens the respective tool right in Windows terminal v1.19 without an issue. Whereas trying to open "wt" or "wt.exe" - whether from search, run, or the direct file in its folder - causes this issue described in this thread.

Very strange. I don't know if there is more information I can offer you that would help you understand more of what is occurring here, but if there is then please let me know. I did some searching around, and installed Process Explorer from SysInternals. Just starting to dig around now, not sure what I'm looking for but it shows ucrtbase.dll & Microsoft.UI.Xaml.dll running just fine in the above-mentioned instances.

I don't want to give you guys more issues to worry about than you need, if this whole task seems null to you then that's fine. I would genuinely like to think that it's worth solving a potential issue that many others may encounter. If you think it's just a one-off occurrence due to my PC or Windows having an error, I can live with backing up data/reinstalling Windows. As mentioned, I built a new PC last week so that would be the route I end up going anyway.

Just wanted to share that new piece of info at the top. Let me know if I can get you anything else. Thanks again!

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 Severity-Crash Crashes are real bad news.
Projects
None yet
Development

No branches or pull requests

3 participants