Question

I have a multithreaded C# "console" application with lots of threads trhat finishes up. All my threads exit. 90% of the time the application gracefully exits. But 10% of the time a copy of my application lingers: console still open.

I attach to this via Visual Studio 2010 and use break to interrupt it, and am shown two "empty" stack frames: one for Main and one for one of my application-created threads. Neither has anything on the stack. Visual Studio says that "source code is not available for the thread" if I click on either of these threads, and it offers a "dissambled code view" link. I click on that and it says "disassembled code is not available for this thread".

Any ideas what I might be doing wrong?

Was it helpful?

Solution

Does you code shut down after some extra minutes. It could be that some .net helper thead or garbage collection thread is still running. That might take some extra time.

Are you running a debug build or a release build and are you sure the process is not one of those visual studio hosted processes that keeps running for design purposes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top