Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugged Program Window Won't Close

I'm using VS 2008 on a 64-bit XP machine. I'm debugging a 32-bit C++ DLL via a console program. The DLL and EXE projects are contained in the same SLN so that I can modify the DLL as I test.

What happens is that every once in a while I kill the program with Debug | Stop Debugging (Shift-F5). VS stops the program, but the console window stays open! If I'm sitting at a breakpoint and hit Shift-F5, it will terminate properly, but if the program is running full-tilt when I stop it, I often see this instead.

The big problem is that I can't close these zombie windows. Using End Task in Task Manager does nothing (no message, no nothing). When I shut down the machine, it is unable to due to the orphans and I have to resort to actually turning off the power.

I think this is connected to having the DLL and EXE project in the same SLN, as for months I worked on this project in 2 VS instances, one for the DLL and the other for the EXE. I would continually jump back and forth between the windows as I worked. This problem never happened until I put the two projects into a single SLN. The single SLN works a lot better, but this anomaly is very irritating.

Any ideas anyone?

UPDATE

After a bit of searching (here), I found that it appears to have to do with one of the updates from last Tuesday (KB977165 or KB978037). Thank you Microsoft for your excellent pre-release testing.

like image 500
Marc Bernier Avatar asked Feb 16 '10 18:02

Marc Bernier


People also ask

Why does JIT debugging keep popping up?

The Just-In-Time Debugger dialog box may open when an error occurs in a running app, and prevent the app from continuing. The Just-In-Time Debugger gives you the option to launch Visual Studio to debug the error.

How do I stop a program debugging?

To end a debugging session in Microsoft Visual Studio, from the Debug menu, choose Stop Debugging.

Why are my breakpoints not working?

If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.


2 Answers

It's KB978037. Uninstalling it resolves the issue.

More info here

like image 196
Chris Avatar answered Sep 30 '22 19:09

Chris


Console windows are owned by csrss.exe, which is a system process, and actually the only process that you cannot kill (at least on XP, you can kill the other system processes if you do it in the right order, look for the article "Running Windows with No Services" by Mark Russinovich). So unfortunately, power cycling seems to be the only way to get rid of the zombie console windows.

like image 29
gpvos Avatar answered Sep 30 '22 20:09

gpvos