Process doesn't die

J

jimocz

Hi all,
I am new to .NET so this problem may not be a problem to this groups
readers.
I am learning .NET and I have built programs and lauched them within
the IDE. Occassionally my program's process won't end with the program
completing (by using the window's X button). In fact I cannot manually
terminate the process with the Task Manager. This is frustrating since
I cannot rebuild the program without the executable completing.
Question: Has anybody seen this issue? Is there another way to kill a
process in windows other than the task manager? In Unix you would kill
-9 but I don't know how to kill a process from the CMD prompt in
windows.
 
G

Guest

If you have launched the program from the VS ide, it runs with the debugger
attached by default (if you pushed F5).
to kill it, you have to either select 'debug->stop debugging' from the menu,
or press shift-F5 while the IDE window is the active window.
that should kill your process.

for the shortcut keys i assume that your keybindings have C++ behavior
(tools-> options). else the menu items may have different shortcut keys
attached to it.

kind regards,
Bruno.
 
J

jimocz

It doesn't die with the stop debugging menu selection either. The IDE
thinks it stopped since the Debug menu selections have changed,
however, I try to rebuild but I get a linker error since the executable
is still running and I cannot overwrite the exe file. The task manager
shows the process is running. Last time I rebooted to get rid of the
zombie process (at least I think it is a zombie) and my solution file
refused to load. It was stuck on the Form1.h[ design] file on loading
and all I ever saw was an hourglass. I had to reconstruct the solution
from scratch cutting and pasting code -- but I have the same problem.
The process exists and doesn't want to die!
 
B

Bruno van Dooren

weird.
could you give some more information?
what version of windows? what version of VS? which version of .NET?

could you possibly try to create a small reproduction case and post that
here?

kind regards,
Bruno.
 
O

Oleg Starodumov

It doesn't die with the stop debugging menu selection either. The IDE
thinks it stopped since the Debug menu selections have changed,
however, I try to rebuild but I get a linker error since the executable
is still running and I cannot overwrite the exe file. The task manager
shows the process is running.

A possible reason is that the process is waiting for a pending I/O operation.
After you have reproduced the problem under debugger, break in (Debug | Break All),
take a look at call stacks of all threads and try to determine what they are
waiting for.

Regards,
Oleg
[VC++ MVP http://www.debuginfo.com/]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top