Bug or feature? Crashing of Application by stressing of AppDomain-s

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

I implemented very simple application which creates AppDomain-s in an endless loop and instantiates some simple type. Unfortunately after some time application crashes with following exception:

"A fatal error has occurred and debugging needs to be terminated. For more details, please see the Microsoft Help and Support web site. HRESULT=0x8007000e. ErrorCode=0x0."

Here is the code I use to instantiate the type:

while (true)
{

   AppDomain sandBoxedDomain =
   AppDomain.CreateDomain("Sandboxed Domain");

   TypeHost host = (TypeHost)
   sandBoxedDomain.CreateInstanceFromAndUnwrap(
       typeof(TypeHost).Assembly.GetName().CodeBase,
       typeof(TypeHost).ToString(), false,  
       System.Reflection.BindingFlags.CreateInstance,
       null,
       new object[]
       { @"C:\Temp\ " },
       CultureInfo.CurrentCulture, null, null);
       AppDomain.Unload(sandBoxedDomain);
       
  
Console.Write(" - ok");
}

 

image

 

I used VS2008, with build for .NET2.0, .NET3.0 and .NET3.5 and Vista (without SP1).
Here is official feedback at Microsoft Connect site.


Posted Mar 20 2008, 09:37 AM by Damir Dobric

Comments

Christian Weyer wrote re: Bug or feature? Crashing of Application by stressing of AppDomain-s
on 03-20-2008 16:30

Doesn't happen for me - works well.

I guess you tested it also outside of the debugger, right?

Damir Dobric wrote re: Bug or feature? Crashing of Application by stressing of AppDomain-s
on 03-20-2008 16:47

You are right Christian. It crashes when started in debugger only.

developers.de is a .Net Community Blog powered by daenet GmbH.