Oh, ok. What about LoaderOptimization.MultiDomain? Does it also share
resources of GAC assemblies only?
But in any case my original question came up because under certain
conditions I would get ExecutionEngineException from CLR. Doesn't happen if
I don't use AssemblyResolve event and doesn't happen if I use PrivateBinPath
for the same purpose. The exception happens on .NET 1.1, but not on 2.0
>> I have a .NET executable which creates multiple AppDomains on demand. The
>> executable's Main method is marked with
[quoted text clipped - 29 lines]
>
> Arne Janning
> Oh, ok. What about LoaderOptimization.MultiDomain? Does it also share
> resources of GAC assemblies only?
No.
> But in any case my original question came up because under certain
> conditions I would get ExecutionEngineException from CLR. Doesn't happen
> if I don't use AssemblyResolve event and doesn't happen if I use
> PrivateBinPath for the same purpose. The exception happens on .NET 1.1,
> but not on 2.0
Uff, ExecutionEngineException is a fatal error that should never occur. Such
errors occur mainly when the execution engine has been corrupted or data is
missing. Are you using COM/Interop, P/Invoke?
Cheers
Arne Janning
LF - 20 Oct 2004 01:30 GMT
The component that gets loaded into child AppDomain uses COM/Interop.
Also, have you come accross the following:
I have this component that uses COM/Interop loaded into child AppDomain.
If I try AppDomain.Unload at just the right moment when the code was inside
COM/Interop call, the whole .NET process just goes away( exits, disappears)
without any errors or unhandled exceptions. Unfortunately this happens on
1.1 and 2.0
>> Oh, ok. What about LoaderOptimization.MultiDomain? Does it also share
>> resources of GAC assemblies only?
[quoted text clipped - 16 lines]
>
> Arne Janning
Justin Rogers - 23 Oct 2004 03:51 GMT
> Also, have you come accross the following:
> I have this component that uses COM/Interop loaded into child AppDomain.
> If I try AppDomain.Unload at just the right moment when the code was inside
> COM/Interop call, the whole .NET process just goes away( exits, disappears)
> without any errors or unhandled exceptions. Unfortunately this happens on 1.1
> and 2.0
That is called Fail-Fast... It should definitely happen in 1.1... It should get
fixed in
V2.0. If you have a case of FailFast in 2.0 please submit it via LadyBug so
that
MS is aware of the code-path and fix it as part of the reliability push.
Killing an AppDomain during a COM/Interop call is pretty nasty. Normally the CLR
should first coalesce all threads at a breakable point before stopping, but it
seems like
they are actually aborting threads and possibly corrupting memory in your
scenario.

Signature
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers