Crash opening new cmd.exe tab and closing by typing exit + ENTER #5339

Closed
opened 2026-01-31 00:10:56 +00:00 by claunia · 9 comments
Owner

Originally created by @larsch on GitHub (Dec 2, 2019).

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.295]
Windows Terminal version (if applicable):  0.7.3291.0

Steps to reproduce

  1. With blank profile, change default shell to cmd.exe
  2. Start Terminal
  3. Create new tab (Ctrl+Shift+T)
  4. Type exit, press ENTER

Expected behavior

Tab closes, leaving the original tab open.

Actual behavior

Terminal disappears, closing all tabs.

Additional info

  • Pressing Ctrl+Shift+W closes the tab without crash.
  • I can't reproduce with PowerShell as default shell
  • I can't reproduce on another PC running Microsoft Windows [Version 10.0.18362.476] (I do not know that the triggering difference is).
  • Creating a new profile with "commandline": "cmd.exe /c dir c:\\", or "commandline": "cmd.exe /k exit" also often crashes Terminal.
  • Creating a profile with another executable, e.g. "commandline": "ls c:\\temp" does not appear to crash Terminal. So it seems related to cmd.exe.
Originally created by @larsch on GitHub (Dec 2, 2019). # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18362.295] Windows Terminal version (if applicable): 0.7.3291.0 ``` # Steps to reproduce 1. With blank profile, change default shell to cmd.exe 2. Start Terminal 3. Create new tab (Ctrl+Shift+T) 4. Type `exit`, press ENTER # Expected behavior Tab closes, leaving the original tab open. # Actual behavior Terminal disappears, closing all tabs. # Additional info - Pressing Ctrl+Shift+W closes the tab without crash. - I can't reproduce with PowerShell as default shell - I can't reproduce on another PC running Microsoft Windows [Version 10.0.18362.476] (I do not know that the triggering difference is). - Creating a new profile with `"commandline": "cmd.exe /c dir c:\\",` or `"commandline": "cmd.exe /k exit"` also often crashes Terminal. - Creating a profile with another executable, e.g. `"commandline": "ls c:\\temp"` does not appear to crash Terminal. So it seems related to `cmd.exe`.
claunia added the Resolution-Duplicate label 2026-01-31 00:10:56 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Dec 2, 2019):

I think I have an idea of what's causing this, though the quickest way for me to be sure is if you could file feedback with the Feedback Hub app, so I can get a stack trace and verify.

/feedback

Thanks!

@zadjii-msft commented on GitHub (Dec 2, 2019): I think I have an idea of what's causing this, though the quickest way for me to be sure is if you could file feedback with the Feedback Hub app, so I can get a stack trace and verify. /feedback Thanks!
Author
Owner

@ghost commented on GitHub (Dec 2, 2019):

Hi there!

Can you please send us feedback with the Feedback Hub with this issue and paste the link here so we can more easily find your crash information on the back end?

Thanks!

image image

@ghost commented on GitHub (Dec 2, 2019): Hi there!<br><br>Can you please send us feedback with the Feedback Hub with this issue and paste the link here so we can more easily find your crash information on the back end?<br><br>Thanks!<br><br>![image](https://user-images.githubusercontent.com/18221333/62478757-b69d0d00-b760-11e9-9626-1fa33c91e7c5.png) ![image](https://user-images.githubusercontent.com/18221333/62478649-6de55400-b760-11e9-806e-5aab7e085a9f.png)
Author
Owner

@larsch commented on GitHub (Dec 2, 2019):

I have attempted to submit issue via Feedback Hub.

@larsch commented on GitHub (Dec 2, 2019): I have attempted to submit issue via Feedback Hub.
Author
Owner

@zadjii-msft commented on GitHub (Dec 2, 2019):

@larsch can you make sure to click on "Share my feedback" and paste the link here so I can actually look it up? Thanks :)

@zadjii-msft commented on GitHub (Dec 2, 2019): @larsch can you make sure to click on "Share my feedback" and _paste the link here_ so I can actually look it up? Thanks :)
Author
Owner

@larsch commented on GitHub (Dec 2, 2019):

https://aka.ms/AA6q5mw

@larsch commented on GitHub (Dec 2, 2019): https://aka.ms/AA6q5mw
Author
Owner

@zadjii-msft commented on GitHub (Dec 2, 2019):

(It was mentioned in triage that this might have something to do with us taking a weak ref to a TermControl and when the control goes away, we don't revoke our event handlers correctly. I don't totally remember, but I don't think that note was added here, so I'm adding what I can)

@zadjii-msft commented on GitHub (Dec 2, 2019): (It was mentioned in triage that this might have something to do with us taking a weak ref to a `TermControl` and when the control goes away, we don't revoke our event handlers correctly. I don't totally remember, but I don't think that note was added here, so I'm adding what I can)
Author
Owner

@mwidmann commented on GitHub (Dec 5, 2019):

As #3829 could be related, here's my Feedback https://github.com/microsoft/terminal/issues/3829#issuecomment-562008244

@mwidmann commented on GitHub (Dec 5, 2019): As #3829 could be related, here's my Feedback https://github.com/microsoft/terminal/issues/3829#issuecomment-562008244
Author
Owner

@DHowett-MSFT commented on GitHub (Dec 5, 2019):

This looks like a /dupe of #3776.

@DHowett-MSFT commented on GitHub (Dec 5, 2019): This looks like a /dupe of #3776.
Author
Owner

@ghost commented on GitHub (Dec 5, 2019):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Dec 5, 2019): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5339