locked
LoaderLock Was Detected -- Why this Exception Occures while Debugging???

    Question

  • "Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang."
    Monday, September 03, 2007 12:52 PM

All replies

  • Dear logN,

     

    To turn it off, do the following :

     

    Open VS 2005. In the menu bar, go to Debug > Exceptions(Ctrl+Alt+E). You will find an Exception tree. Open 'Managed Debugging Assistants' > Loader Lock. Uncheck it.

     

    Check this kb article

     

    http://support.microsoft.com/kb/913996

     

     

    HTH,
    Suprotim Agarwal

    -----
    http://www.dotnetcurry.com
    -----

     

    Monday, September 03, 2007 2:11 PM
  •  Suprotim Agarwal wrote:

    Dear logN,

     

    To turn it off, do the following :

     

    Open VS 2005. In the menu bar, go to Debug > Exceptions(Ctrl+Alt+E). You will find an Exception tree. Open 'Managed Debugging Assistants' > Loader Lock. Uncheck it.

     

    Check this kb article

     

    http://support.microsoft.com/kb/913996

     

    The message is occuring for a reason, simply turning off the warning doesn't make the problem go away.
    Monday, September 03, 2007 8:04 PM
    Moderator
  •  logN wrote:
    "Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang."
    This message is usually due to a managed application doing something with a .NET component in it's DllMain, not something that is support and generally doesn't work.

     

    Could you explain the structure of the program you're running that causes this problem?

    Monday, September 03, 2007 8:05 PM
    Moderator
  • Wednesday, September 05, 2007 3:41 PM