Mohamed Ramzi

Hello there,

We are facing a crash in one of our processes. The process is ended by Windows. Our process is mixing managed and unmanaged C++ and C# code.

The stack trace is:

# ChildEBP RetAddr

00 1055fb38 792a6854 mscorwks!Thread::ReturnToContext+0x2d

01 1055fbec 7924772c mscorwks!SystemDomain::RunDllMain+0x288

02 1055fe74 7917daa0 mscorwks!ExecuteDLL+0x3c0

03 1055fe8c 7c81a352 mscoree!_CorDllMain+0x40

04 1055feac 7c819178 ntdll!LdrpCallInitRoutine+0x14

05 1055ff60 77e4f920 ntdll!LdrShutdownThread+0xd2

06 1055ff70 7813299f kernel32!ExitThread+0x2f

07 1055ff78 781329c0 msvcr80!_endthreadex+0x1f

08 1055ffb0 78132a47 msvcr80!_endthreadex+0x40

09 1055ffb8 77e64829 msvcr80!_endthreadex+0xc7

0a 1055ffec 00000000 kernel32!BaseThreadStart+0x34

Does anybody have a clue on this

Thanks in advance.

(I have a full .dmp file if need be).



Re: Common Language Runtime crash in moscor dll

Feng Chen - MSFT

Hi Mohamed,

To troubleshoot this issue, we really need the source code to reproduce the problem, so that we can investigate the issue in house. It is not necessary that you send out the complete source of your project. We just need a simplest sample to reproduce the problem. You can remove any confidential information or business logic from it.

Thanks!






Re: Common Language Runtime crash in moscor dll

Mohamed Ramzi

Hi Feng,

thanks for your reply.

As you may guess, it's very hard to reproduce the problem in a simplest sample. We're trying to do so. I've written a simple sample that simulates the main "technical behavior" as our application : we create an AppDomain, dynamically compile C# code, create 4 to 8 threads to execute this dynamic code, unload the AppDomain (We use AppDomain as this the only way to unload a DLL). We'll run this code to see if we reproduce the problem.

Otherwise, does the location of the the exception (ReturnToContext+0x2d) give you any hint on the problem

By the way, we're running .Net 1.1.

Regards,

Mohamed





Re: Common Language Runtime crash in moscor dll

Feng Chen - MSFT

Hi Mohamed,

From the ROTOR source, we can see the ReturnToContext means ”°return into a domain that is unloading”±. This may mean that the appdomain there is some problem with the AppDomain that just being loaded. So the exception might thrown because the initializing part of the appdomain, you can check it.

Thank you!