Groups | Blog | Home
all groups > dotnet clr > october 2004 >

dotnet clr : .NET process disappears/exits without trace


LF
10/19/2004 8:36:20 PM
Hi all,

I have a problem where normal .NET process that hosts multiple AppDomains
just exits during one of the AppDomain.Unload's. (small detail:
AppDomain.Unload happens on a separate background thread). No unhandled
exceptions or my trace get outputted. I have a suspicion that it happens
when code in the AppDomain that is about to get Unloaded is inside
COM/Interop. I think if i catch it at just the right time something bad
happens and .NET process just goes away. Has anyone come accords this or
know how to debug it?

Thanks in advance

rlander [MSFT]
12/15/2004 12:57:43 PM
This sounds very odd ...

Does the domain ever get unloaded? You can register for the
AppDomain.DomainUnload event to know when that happens.

Processes do not just 'disappear' - they either exit or get
killed because of an exception or get killed by something external.

You need to do some debugging here. I suggest you set some breakpoints
at various interesting points in your app. You should be able to
determine when and why the app "disappears". The other sure-fire option
is to set a breakpoint on kernel32!ExitProcess so that you both know
when the process exits and can look at its state at that point.
HTH -- rich
AddThis Social Bookmark Button