Unable to stop window error saying "cmd.exe: application was unable to start correctly (0xc0000142)" #17761

Closed
opened 2026-01-31 05:52:38 +00:00 by claunia · 8 comments
Owner

Originally created by @Sedwin97 on GitHub (Jun 20, 2022).

Windows Terminal version

1.12.10982.0

Windows build number

Version 10.0.18363.1500

Other Software

No response

Steps to reproduce

I've never been able to reproduce this behavior on purpose. What usually happens is that I'm running a program in command prompt and I need to exit early. I think I'm usually unable to CTRL-C out of the application so I close the tab. Then I get the message below. If I press OK, it just shows up again. The only way I know to clear it is to restart my computer.
image

Expected Behavior

I don't really expect the error message to go away, but I think the error message should not pop up again when I press OK.

Actual Behavior

The error window keeps popping up after pressing OK or closing the window

Originally created by @Sedwin97 on GitHub (Jun 20, 2022). ### Windows Terminal version 1.12.10982.0 ### Windows build number Version 10.0.18363.1500 ### Other Software _No response_ ### Steps to reproduce I've never been able to reproduce this behavior on purpose. What usually happens is that I'm running a program in command prompt and I need to exit early. I think I'm usually unable to CTRL-C out of the application so I close the tab. Then I get the message below. If I press OK, it just shows up again. The only way I know to clear it is to restart my computer. <img width="296" alt="image" src="https://user-images.githubusercontent.com/41026527/174648087-20664f5e-dc9b-4773-b19e-a07fa3d034ee.png"> ### Expected Behavior I don't really expect the error message to go away, but I think the error message should not pop up again when I press OK. ### Actual Behavior The error window keeps popping up after pressing OK or closing the window
claunia added the Needs-TriageIssue-BugNeeds-Tag-FixNeeds-Author-Feedback labels 2026-01-31 05:52:38 +00:00
Author
Owner

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

that I'm running a program in command prompt

What program are you running? That message is usually caused by the console host process (conhost.exe) exiting before the client application can even spawn, which is highly irregular. Are you running any sort of antivirus/?

@zadjii-msft commented on GitHub (Jun 20, 2022): > that I'm running a program in command prompt What program are you running? That message is usually caused by the console host process (`conhost.exe`) exiting before the client application can even spawn, which is _highly_ irregular. Are you running any sort of antivirus/?
Author
Owner

@Sedwin97 commented on GitHub (Jun 21, 2022):

The program I start is a Perl test script. I think it's most likely stuck on reading com ports from a device. The com ports are read with Putty's PLink which is started by a batch script. My company has CylancePROTECT set up.

This is the batch script which will usually be killed by the saved PID in Perl.

echo Gathering Data 2>NUL
powershell (Get-WmiObject Win32_Process -Filter ProcessId=$PID).ParentProcessId | tee "PID"
:reconnect
plink -serial %ComPort% -sercfg 115200,8,1,N,N >> serial.dat
echo Connection failed: Reconnecting...
sleep 5
goto reconnect
@Sedwin97 commented on GitHub (Jun 21, 2022): The program I start is a Perl test script. I think it's most likely stuck on reading com ports from a device. The com ports are read with Putty's PLink which is started by a batch script. My company has CylancePROTECT set up. This is the batch script which will usually be killed by the saved PID in Perl. ```@echo off echo Gathering Data 2>NUL powershell (Get-WmiObject Win32_Process -Filter ProcessId=$PID).ParentProcessId | tee "PID" :reconnect plink -serial %ComPort% -sercfg 115200,8,1,N,N >> serial.dat echo Connection failed: Reconnecting... sleep 5 goto reconnect ```
Author
Owner

@DHowett commented on GitHub (Jun 21, 2022):

sleep 5 ... goto reconnect

Would you say that the error message dialog appears every five seconds?

@DHowett commented on GitHub (Jun 21, 2022): > `sleep 5` ... `goto reconnect` Would you say that the error message dialog appears every five seconds?
Author
Owner

@ghost commented on GitHub (Jun 25, 2022):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Jun 25, 2022): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@Sedwin97 commented on GitHub (Jun 30, 2022):

No it's immediate. As soon as you press Okay it pops back up

@Sedwin97 commented on GitHub (Jun 30, 2022): No it's immediate. As soon as you press Okay it pops back up
Author
Owner

@DHowett commented on GitHub (Jun 30, 2022):

Something is starting CMD over and over again -- can you use a tool like Process Explorer or Process Hacker to see who the parent process is?

@DHowett commented on GitHub (Jun 30, 2022): Something is starting CMD over and over again -- can you use a tool like Process Explorer or Process Hacker to see who the parent process is?
Author
Owner

@Sedwin97 commented on GitHub (Jul 4, 2022):

Okay, I will try to use Process Explorer to find the parent process. It may take some time since I don't know how to reproduce it.

@Sedwin97 commented on GitHub (Jul 4, 2022): Okay, I will try to use Process Explorer to find the parent process. It may take some time since I don't know how to reproduce it.
Author
Owner

@zadjii-msft commented on GitHub (Apr 13, 2023):

Hey all, our bot's been acting up the last few weeks. This issue has been marked as requiring author feedback, but hasn't had any activity in the last week. We're gonna close it to tidy up. Feel free to continue the discssion in the comments - we can always reopen if new information comes to light. Thanks!

@zadjii-msft commented on GitHub (Apr 13, 2023): Hey all, our bot's been acting up the last few weeks. This issue has been marked as requiring author feedback, but hasn't had any activity in the last week. We're gonna close it to tidy up. Feel free to continue the discssion in the comments - we can always reopen if new information comes to light. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17761