Terminal Unexpectedly Closing #15005

Closed
opened 2026-01-31 04:25:49 +00:00 by claunia · 14 comments
Owner

Originally created by @samhenrigold on GitHub (Aug 28, 2021).

Windows Terminal version (or Windows build number)

10.0.19043.0

Other Software

  • Ubuntu 20.04.3 inside WSL

Steps to reproduce

WT (stable or preview) will close in under a minute after opening it. It doesn't matter if it's sitting idle, if I've opened a tab, or if I've run a command before, it crashes within seconds.

This issue started today when I updated Windows from stable to the release preview channel, the Terminal issue began. I restored back to a system image I took last night and I'm now having the same issue on this image where I didn't have it before. Using cmd.exe, PowerShell, the standalone Ubuntu program, or the terminal inside VS Code works fine, it's specifically Windows Terminal.

No events are logged in the event viewer, I'm fairly new to Windows so I don't know how to troubleshoot further. Feedback Hub link and video showing the issue:

https://user-images.githubusercontent.com/49251320/131222006-bc84b322-6825-44d8-b82f-3f0873497ba9.mp4

Expected Behavior

Terminal to not close (crash?) without me closing it.

Actual Behavior

Opening the terminal (stable or preview) and doing anything, the terminal will close within a minute of opening it.

Originally created by @samhenrigold on GitHub (Aug 28, 2021). ### Windows Terminal version (or Windows build number) 10.0.19043.0 ### Other Software - Ubuntu 20.04.3 inside WSL ### Steps to reproduce WT (stable or preview) will close in under a minute after opening it. It doesn't matter if it's sitting idle, if I've opened a tab, or if I've run a command before, it crashes within seconds. This issue started today when I updated Windows from stable to the release preview channel, the Terminal issue began. I restored back to a system image I took last night and I'm now having the same issue on this image where I didn't have it before. Using cmd.exe, PowerShell, the standalone Ubuntu program, or the terminal inside VS Code works fine, it's specifically Windows Terminal. No events are logged in the event viewer, I'm fairly new to Windows so I don't know how to troubleshoot further. [Feedback Hub link](https://aka.ms/AAdnebu) and video showing the issue: https://user-images.githubusercontent.com/49251320/131222006-bc84b322-6825-44d8-b82f-3f0873497ba9.mp4 ### Expected Behavior Terminal to not close (crash?) without me closing it. ### Actual Behavior Opening the terminal (stable or preview) and doing anything, the terminal will close within a minute of opening it.
Author
Owner

@zadjii-msft commented on GitHub (Aug 30, 2021):

Huh. Exception's being thrown somewhere in Terminal.Settings.Model. An E_BOUNDS exception... I wonder what would possibly throw that like, 20s after launch? Maybe querying the WSL distros? But that's already been completed, as you can see them in the list of profiles in the dropdown.

I am having a hard time looking through the full dump myself though, I can't seem to find it on the backend. Maybe I just haven't had enough coffee yet? @DHowett help me out with this one?

@zadjii-msft commented on GitHub (Aug 30, 2021): Huh. Exception's being thrown _somewhere_ in `Terminal.Settings.Model`. An `E_BOUNDS` exception... I wonder what would possibly throw that like, 20s after launch? Maybe querying the WSL distros? But that's already been completed, as you can see them in the list of profiles in the dropdown. I am having a hard time looking through the full dump myself though, I can't seem to find it on the backend. Maybe I just haven't had enough coffee yet? @DHowett help me out with this one?
Author
Owner

@samhenrigold commented on GitHub (Sep 6, 2021):

@zadjii-msft @DHowett Howdy! Sorry to bug today, just wondering to see if this got any more thought. Hope you're having a good labor day, thanks for your help!

@samhenrigold commented on GitHub (Sep 6, 2021): @zadjii-msft @DHowett Howdy! Sorry to bug today, just wondering to see if this got any more thought. Hope you're having a good labor day, thanks for your help!
Author
Owner

@ghost commented on GitHub (Apr 20, 2022):

@zadjii-msft I'll jump in on this issue as it matches what I'm seeing.

I've had this problem for over 2 years. Every 4-6 months I will try a fresh install and I've not seen a difference in behavior.

Fresh install this morning from MS store. v 1.12.10982.0
Launch, wait 5-10 seconds, then window just vaporizes.

If there are diagnostics/dumps I can take for someone to investigate, I'm happy to provide (will need instructions)

Just now, I launched 3 separate WT instances:

  1. Opens to PowerShell. Quickly opened 2nd tab to CMD, then closed PS tab.
  2. Launch another instance of WT. Leave that one on PS.
  3. Launch a 3rd WT window. Open an ubuntu tab.

On window #3, ubuntu started up. I ran sudo apt update. At some point during that, window #1 crashed and closed.
About 10 seconds later, window #2 crashed and closed.
In Window #3, my apt update finished. I then continued with 'sudo apt upgrade' and about 5 seconds into that, window #3 crashed.

system: W10 Home, 21H1 19043.1645
WSL2 installed - ubuntu 20.04

@ghost commented on GitHub (Apr 20, 2022): @zadjii-msft I'll jump in on this issue as it matches what I'm seeing. I've had this problem for over 2 years. Every 4-6 months I will try a fresh install and I've not seen a difference in behavior. Fresh install this morning from MS store. v 1.12.10982.0 Launch, wait 5-10 seconds, then window just vaporizes. If there are diagnostics/dumps I can take for someone to investigate, I'm happy to provide (will need instructions) Just now, I launched 3 separate WT instances: 1. Opens to PowerShell. Quickly opened 2nd tab to CMD, then closed PS tab. 2. Launch another instance of WT. Leave that one on PS. 3. Launch a 3rd WT window. Open an ubuntu tab. On window #3, ubuntu started up. I ran sudo apt update. At some point during that, window #1 crashed and closed. About 10 seconds later, window #2 crashed and closed. In Window #3, my apt update finished. I then continued with 'sudo apt upgrade' and about 5 seconds into that, window #3 crashed. system: W10 Home, 21H1 19043.1645 WSL2 installed - ubuntu 20.04
Author
Owner

@zadjii-msft commented on GitHub (Apr 20, 2022):

@ghammond-banyan Can you try a recording this with the Feedback Hub, and sharing the link here? I'm betting the original FH link in this issue got wiped from the cache by now, but let's get your crash dump anyways just to make sure.

I'd also recommend setting "closeOnExit": "never", just in case it's the client app crashing and the terminal just auto closing itself (which it does weirdly sound like is what's happening)

@zadjii-msft commented on GitHub (Apr 20, 2022): @ghammond-banyan Can you try a recording this with the Feedback Hub, and sharing the link here? I'm betting the original FH link in this issue got wiped from the cache by now, but let's get your crash dump anyways just to make sure. I'd also recommend setting [`"closeOnExit": "never"`](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-advanced#profile-termination-behavior), just in case it's the client app crashing and the terminal just auto closing itself (which it does weirdly sound like is what's happening)
Author
Owner

@ghost commented on GitHub (Apr 27, 2022):

@zadjii-msft here you go https://aka.ms/AAgr87s

I added closeOnExit to settings, but that didn't affect anything.

Thanks for looking at this.

This was on my work machine, which is W10 Pro 21H2 19044.1645

@ghost commented on GitHub (Apr 27, 2022): @zadjii-msft here you go https://aka.ms/AAgr87s I added closeOnExit to settings, but that didn't affect anything. Thanks for looking at this. This was on my work machine, which is W10 Pro 21H2 19044.1645
Author
Owner

@zadjii-msft commented on GitHub (Aug 18, 2022):

Frick. If there was a dump for this one in the backend, it must have been cleared out by now, but maybe there wasn't.

We have however been blind-firing fixes for a bunch of crashes, especially over the last few months. Perhaps we just fixed this one along the way? Could you try out https://github.com/microsoft/terminal/releases/tag/v1.15.2282.0 and see if this has been fixed?

If it isn't, then can you try following the steps in this post to set up automatic crash dumps? (For more info, see this link) If that works, then you should be able to automatically get a .dmp of the terminal when it crashes. Then, can you zip that dump up and send it to us, so we can investigate/?

That's really my last idea at this point 😕

@zadjii-msft commented on GitHub (Aug 18, 2022): Frick. If there was a dump for this one in the backend, it must have been cleared out by now, but maybe there wasn't. We have however been blind-firing fixes for a bunch of crashes, especially over the last few months. Perhaps we just fixed this one along the way? Could you try out https://github.com/microsoft/terminal/releases/tag/v1.15.2282.0 and see if this has been fixed? If it isn't, then can you try following the steps in [this post](https://www.meziantou.net/tip-automatically-create-a-crash-dump-file-on-error.htm) to set up automatic crash dumps? (For more info, see [this link](https://docs.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps)) If that works, then you should be able to automatically get a `.dmp` of the terminal when it crashes. Then, can you zip that dump up and send it to us, so we can investigate/? That's really my last idea at this point 😕
Author
Owner

@samhenrigold commented on GitHub (Aug 18, 2022):

I’m aware this is the least helpful conclusion but since this post, my business switched to a Mac and sent my Windows machine back so I wouldn’t be able to test the fixes. For what it’s worth, I haven’t had the same issue in my W11 ARM VM 😅

@samhenrigold commented on GitHub (Aug 18, 2022): I’m aware this is the least helpful conclusion but since this post, my business switched to a Mac and sent my Windows machine back so I wouldn’t be able to test the fixes. For what it’s worth, I haven’t had the same issue in my W11 ARM VM 😅
Author
Owner

@greg-hammond commented on GitHub (Aug 18, 2022):

Same here - I'm Mac-only for the time being. When I get my Windows machine back up I'll check out the above @zadjii-msft

Thanks.

@greg-hammond commented on GitHub (Aug 18, 2022): Same here - I'm Mac-only for the time being. When I get my Windows machine back up I'll check out the above @zadjii-msft Thanks.
Author
Owner

@zadjii-msft commented on GitHub (Aug 18, 2022):

WELP that's definitely not what you love to hear, but at least it's something. @greg-hammond if you do see this again, follow up here and we can reopen.


<off topic>

Entirely genuinely - is there a particular reason you switched to MacOS? If you've got specific reasons, I always love forwarding feedback to the appropriate internal parties 😄

@zadjii-msft commented on GitHub (Aug 18, 2022): WELP that's definitely not what you love to hear, but at least it's something. @greg-hammond if you do see this again, follow up here and we can reopen. <hr> \<off topic> Entirely genuinely - is there a particular reason you switched to MacOS? If you've got specific reasons, I always love forwarding feedback to the appropriate internal parties 😄
Author
Owner

@greg-hammond commented on GitHub (Aug 18, 2022):

@zadjii-msft I'm working as a contractor for a large employer - their engineering group is mac/linux exclusively. If there are specific reasons why their ecosystem doesn't support Windows, I don't know what they are, but ostensibly there are reasons.

@greg-hammond commented on GitHub (Aug 18, 2022): @zadjii-msft I'm working as a contractor for a large employer - their engineering group is mac/linux exclusively. If there are specific reasons why their ecosystem doesn't support Windows, I don't know what they are, but ostensibly there are reasons.
Author
Owner

@zadjii-msft commented on GitHub (Aug 18, 2022):

That makes perfect sense! Thanks for the follow up ☺️

@zadjii-msft commented on GitHub (Aug 18, 2022): That makes perfect sense! Thanks for the follow up ☺️
Author
Owner

@samhenrigold commented on GitHub (Aug 18, 2022):

I’ve been trying to synthesize my thoughts but I think it comes down to the apps (system and the ones generally available in the wider ecosystem) and features.

There are some apps built into Mac that I’ve really come to appreciate as a designer. Font Book just got a facelift as a place to view my installed fonts, its OpenType features and metadata, the repertoire of characters, and even print out waterfall/catalog specimens. I haven’t been able to find a good, modern-looking stand-in for that on Windows.

And a general-purpose image and PDF viewer like Preview.app is something I found myself missing constantly on Windows. Re-ordering pages of a PDF, extracting pages, rescaling and color corrections, etc. all required me to look for other tools or install an overpowered app like Photoshop.

For the features, it’s mostly stuff that I could find replacements for on Windows but found silly that I even had to:

  • Screen recorders without having to involve the Xbox Game Bar,
  • Better type rendering,
  • Writing AutoHotKey scripts to reducing the number of shortcuts that use uncomfortable-to-reach keys (to select all text from the beginning of the current line to your cursor point, the shortcut on Mac is Command+Shift+Left. On Windows, it’s the Home key + Shift. That's a wild ergonomic stretch on a laptop),
  • Utilities that force a brutalist dark mode for odds and ends that haven’t been updated to support dark mode

Not really a feature but a paper cut I kept running into as a non-native Windows user:

  • Drag and drop locations. Let’s say I'm trying to upload a file sitting in ~/Documents/Clients/Acme/Presentation.pdf and I've got that file location open in an Explorer window. Edge opens the file picker and it's pointed at the desktop. I think dragging that file from the explorer window onto the file picker should point the file picker to that location rather than copying the dragged file to the desktop.

This was supposed to be a blog post that I never finished writing, apologies for the chaotic formatting

@samhenrigold commented on GitHub (Aug 18, 2022): I’ve been trying to synthesize my thoughts but I think it comes down to the apps (system and the ones generally available in the wider ecosystem) and features. There are some apps built into Mac that I’ve really come to appreciate as a designer. Font Book just got a facelift as a place to view my installed fonts, its OpenType features and metadata, the repertoire of characters, and even print out waterfall/catalog specimens. I haven’t been able to find a good, modern-looking stand-in for that on Windows. And a general-purpose image and PDF viewer like Preview.app is something I found myself missing constantly on Windows. Re-ordering pages of a PDF, extracting pages, rescaling and color corrections, etc. all required me to look for other tools or install an overpowered app like Photoshop. For the features, it’s mostly stuff that I *could* find replacements for on Windows but found silly that I even had to: - Screen recorders without having to involve the Xbox Game Bar, - [Better type rendering](https://www.mactype.net), - Writing AutoHotKey scripts to reducing the number of shortcuts that use uncomfortable-to-reach keys (to select all text from the beginning of the current line to your cursor point, the shortcut on Mac is Command+Shift+Left. On Windows, it’s the Home key + Shift. That's a wild ergonomic stretch on a laptop), - Utilities that force a brutalist dark mode for odds and ends that haven’t been updated to support dark mode Not really a feature but a paper cut I kept running into as a non-native Windows user: - Drag and drop locations. Let’s say I'm trying to upload a file sitting in ~/Documents/Clients/Acme/Presentation.pdf and I've got that file location open in an Explorer window. Edge opens the file picker and it's pointed at the desktop. I think dragging that file from the explorer window onto the file picker should point the file picker to that location rather than copying the dragged file to the desktop. This was supposed to be a blog post that I never finished writing, apologies for the chaotic formatting
Author
Owner

@zadjii-msft commented on GitHub (Aug 18, 2022):

Thanks for all this - this is great feedback that I hopefully can bounce around to some folks 🙂

@zadjii-msft commented on GitHub (Aug 18, 2022): Thanks for all this - this is great feedback that I hopefully can bounce around to some folks 🙂
Author
Owner

@greg-hammond commented on GitHub (Jan 6, 2023):

WELP that's definitely not what you love to hear, but at least it's something. @greg-hammond if you do see this again, follow up here and we can reopen.

@zadjii-msft

Following up again - just tried a new install and still hitting the same thing.
Dusted off and updated my old machine. Win10 Pro 22H2 19045.2364.
Did a fresh WT install from the MS store (1.15.3465.0).
Opened it, same result. Window closes usually within 5-10 seconds, whether or not I interact with it.
What should I try? Care to triage this together?

@greg-hammond commented on GitHub (Jan 6, 2023): > WELP that's definitely not what you love to hear, but at least it's something. @greg-hammond if you do see this again, follow up here and we can reopen. > @zadjii-msft Following up again - just tried a new install and still hitting the same thing. Dusted off and updated my old machine. Win10 Pro 22H2 19045.2364. Did a fresh WT install from the MS store (1.15.3465.0). Opened it, same result. Window closes usually within 5-10 seconds, whether or not I interact with it. What should I try? Care to triage this together?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15005