views:

1850

answers:

4

Hey,

EDIT #3 : Microsoft has released a 'fix' to this problem which is available here. I haven't had the time to test it, but I those who want to are welcome to leave their feedback here !

Sometimes when I run an application from Visual Studio and it crashes or I stop it using the stop button in the debug menu (Debug->Stop Debugging (Shift-F5)), the console of said application stays open... and never closes. I cannot close it by clicking the 'x' button in the top right corner. I cannot kill the process as it is not even listed in taskmgr.

I have seen this problem documented in different places on the web, but no solution so far.

I am running on windows XP SP3, using visual studio 2008 w/ SP1.

1- What could be causing this ?
2- Is there a fix ?

thanks alot.

JC

EDIT: There is no MyApp.vshost.exe process to close, and closing visual studio does not close the console either. Worse even, if I try to restart my computer windows will hang and never close, I need to do a forced shut down.

EDIT #2 : (from Brad Sullivan, Program Manager - Visual Studio Debugger on March 2nd)

[...] this issue is likely not in Visual Studio since it also occurs in scenarios where Visual Studio is not present. We are in the process of handing over our investigation to the Windows Servicing team.

But for now, removing the KB978037 update and it's related files seems to work.

+1  A: 

There are a couple of things that could be happening here. Try closing down the following process and see which one, if any close down the Console application as well.

  • The Hosting Process: Typically named YourExecutable.vshost.exe
  • Visual Studio

If closing the hosting process fixes the issue then one quick work around is to disable the hosting process itself.

Right Click on Project -> Properties -> Debug -> Uncheck the hosting process

If closing down Visual Studio fixes the problem then it's potentially a bug in Visual Studio. Please file a bug on connect.

http://connect.microsoft.com

JaredPar
There is no MyApp.vshost.exe process to close, and closing visual studio does not close the console either. Worse even, if I try to restart my computer windows will hang and never close, I need to do a forced shut down.
JC
@JC, then I would definitely file a connect bug
JaredPar
+7  A: 

This is a bug introduced in security update KB978037. Back out this update and you'll be back to normal.

Also see here:

http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/e6d4a4f5-7002-401a-90e1-6174d7f9e3ca

+1  A: 

Visual Studio Debugger Team has already acknowledge this issues on their blog. check the below url for more information.

http://blogs.msdn.com/debugger/archive/2010/03/11/help-my-console-windows-won-t-go-away.aspx

Shaikh Zulfikar
+2  A: 

Microsoft has released a 'fix' to this problem which is available here. I haven't had the time to test it, but I those who want to are welcome to leave their feedback here !

JC
For what it's worth, I installed this patch and have been running with it for about one week. It seems to work as advertised with no obvious side-effects. Ah, yes, the joys of <shift><F5> are mine again.
Mark Wilkins
There is no fix yet for x64 systems. Guess we have to wait for the next patch day and hope this will end up on the official patch list.
Laur