Bug Report: Crashing CMD window #1697

Closed
opened 2026-01-30 22:34:01 +00:00 by claunia · 9 comments
Owner

Originally created by @MiltoxBeyond on GitHub (Jun 15, 2019).

Environment

Windows build number: 18362.175
Windows Terminal version (if applicable): Latest Master(as of 8/15/2019)

Any other software?
Just the original Command Prompt

Steps to reproduce

1)Build new terminal,
2) run it without debugging
3) ...
4) Profit
5) Try to run standard command shell

Expected behavior

Should be able to run cmd without issues like normal.

Actual behavior

I noticed a peculiar behavior when trying to run a gulp task in the new terminal. The drawn portion of the terminal window shrinks to a few lines wide. When I try to open the regular command window it opens, shrinks in size then closes.

image

This captures just the brief flash of the command prompt:
image

Originally created by @MiltoxBeyond on GitHub (Jun 15, 2019). <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: 18362.175 Windows Terminal version (if applicable): Latest Master(as of 8/15/2019) ``` Any other software? Just the original Command Prompt # Steps to reproduce 1)Build new terminal, 2) run it without debugging 3) ... 4) Profit 5) Try to run standard command shell # Expected behavior Should be able to run `cmd` without issues like normal. # Actual behavior I noticed a peculiar behavior when trying to run a gulp task in the new terminal. The drawn portion of the terminal window shrinks to a few lines wide. When I try to open the regular command window it opens, shrinks in size then closes. ![image](https://user-images.githubusercontent.com/7705397/59554434-65df1400-8f68-11e9-98ea-f70bc6ad8806.png) This captures just the brief flash of the command prompt: ![image](https://user-images.githubusercontent.com/7705397/59554455-a6d72880-8f68-11e9-9e36-efb8ceade4bc.png)
claunia added the Needs-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-30 22:34:01 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 18, 2019):

Just the original Command Prompt

Run a gulp task ...

There might be a little more to this issue than you're describing ☹️

@DHowett-MSFT commented on GitHub (Jun 18, 2019): > Just the original Command Prompt > Run a gulp task ... There might be a little more to this issue than you're describing ☹️
Author
Owner

@MiltoxBeyond commented on GitHub (Jun 18, 2019):

To be honest that's all I did. I only was trying to run the task. I don't think it was responsible for the issue, just made it visible. Basically I try to open the plain command prompt and it crashes. If I try to open a tab in the new terminal of the command prompt it closes immediately. When I try to run a command in powershell that executes via the command prompt (i.e. a BAT file) the powershell view shrinks to an extremely skinny window as I've shown above. I've gotten around my issue for now by running gulp in the WSL bash prompt. But it still closes. Hopefully some updates will fix it but for now that's it.

Actually now that I think about it, the one thing I did, but ignored was run the project's command console directly from VS2019, before running the correct project, and it did open and close in the same way as the command prompt is doing lately, just I paid it no mind...

@MiltoxBeyond commented on GitHub (Jun 18, 2019): To be honest that's all I did. I only was trying to run the task. I don't think it was responsible for the issue, just made it visible. Basically I try to open the plain command prompt and it crashes. If I try to open a tab in the new terminal of the command prompt it closes immediately. When I try to run a command in powershell that executes via the command prompt (i.e. a BAT file) the powershell view shrinks to an extremely skinny window as I've shown above. I've gotten around my issue for now by running gulp in the WSL bash prompt. But it still closes. Hopefully some updates will fix it but for now that's it. Actually now that I think about it, the one thing I did, but ignored was run the project's command console directly from VS2019, before running the correct project, and it did open and close in the same way as the command prompt is doing lately, just I paid it no mind...
Author
Owner

@zadjii-msft commented on GitHub (Jun 18, 2019):

image
image

What exactly are you running that's causing mode 20,5 to be called?

@zadjii-msft commented on GitHub (Jun 18, 2019): ![image](https://user-images.githubusercontent.com/18356694/59700858-eb0d3780-91b9-11e9-8596-b5426a715fac.png) ![image](https://user-images.githubusercontent.com/18356694/59700879-f4969f80-91b9-11e9-8ee2-bf1fbdba4145.png) What _exactly_ are you running that's causing `mode 20,5` to be called?
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 18, 2019):

This doesn't look like an issue on us. Something in your CMD startup script (autorun, perhaps?) is calling mode 20,5 to set the console window to, well, 20 x 5. Perhaps that's why the console window is becoming 20 x 5.

@DHowett-MSFT commented on GitHub (Jun 18, 2019): This doesn't look like an issue on us. Something in your CMD startup script (autorun, perhaps?) is calling `mode 20,5` to set the console window to, well, `20 x 5`. Perhaps that's why the console window is becoming `20 x 5`.
Author
Owner

@MiltoxBeyond commented on GitHub (Jun 18, 2019):

I'm not sure, there was no startup script before, I'd just like to know how to revert this issue. Tried uninstalling the new terminal, reinstalling, etc. No dice.

@MiltoxBeyond commented on GitHub (Jun 18, 2019): I'm not sure, there was no startup script before, I'd just like to know how to revert this issue. Tried uninstalling the new terminal, reinstalling, etc. No dice.
Author
Owner

@zadjii-msft commented on GitHub (Jun 18, 2019):

Does it repro for all conhost launches?

  • cmd.exe from the start menu
  • cmd.exe from the run box
  • powershell from the start menu
  • powershell from the run box
  • wsl/your favorite distro from the start menu
  • wsl from the run box
@zadjii-msft commented on GitHub (Jun 18, 2019): Does it repro for _all_ conhost launches? * [ ] cmd.exe from the start menu * [ ] cmd.exe from the run box * [ ] powershell from the start menu * [ ] powershell from the run box * [ ] wsl/your favorite distro from the start menu * [ ] wsl from the run box
Author
Owner

@MiltoxBeyond commented on GitHub (Jun 18, 2019):

Neither powershell nor wsl crash. But if I run any command on powershell that triggers a bat file (gulp is my example) it shrinks the output apparently via mode but never executes the commands for that file. I even downloaded an alternate command console and it also shrinks and closes without much time to react. Is there any registry settings I could look at to modify default properties or something?

If I run any developer prompts the same thing happens so it seems to be a problem with the root command (cmd.exe)

@MiltoxBeyond commented on GitHub (Jun 18, 2019): Neither powershell nor wsl crash. But if I run any command on powershell that triggers a bat file (gulp is my example) it shrinks the output apparently via mode but never executes the commands for that file. I even downloaded an alternate command console and it also shrinks and closes without much time to react. Is there any registry settings I could look at to modify default properties or something? If I run any developer prompts the same thing happens so it seems to be a problem with the root command (cmd.exe)
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 18, 2019):

What registry values do you have in Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Command Processor?

How about Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor?

@DHowett-MSFT commented on GitHub (Jun 18, 2019): What registry values do you have in `Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Command Processor`? How about `Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor`?
Author
Owner

@MiltoxBeyond commented on GitHub (Jun 19, 2019):

The first registry key had an entry that was trying to start soundmixer.exe and if it didn't find it it would close... looks like that may have been it. Not sure what that is doing in the autorun entry of the command processor but since it worked before somehow something was removed. It seems that it was also responsible for the Mode 20,8

Yup and removing that fixed it

Thank you so much.

@MiltoxBeyond commented on GitHub (Jun 19, 2019): The first registry key had an entry that was trying to start soundmixer.exe and if it didn't find it it would close... looks like that may have been it. Not sure what that is doing in the autorun entry of the command processor but since it worked before somehow something was removed. It seems that it was also responsible for the Mode 20,8 Yup and removing that fixed it Thank you so much.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1697