OS Loader Lock
-
When testing one of my programs i got a Loader Lock Message from VIsual Studio 2005: LoaderLock was detected Message: 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. I did some testing and it occurs whenever I press a key on a program i am testing, even if there is only a form and nothing else. How should I fix this problem? I need this fixed to test my program. Thanks.
-
When testing one of my programs i got a Loader Lock Message from VIsual Studio 2005: LoaderLock was detected Message: 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. I did some testing and it occurs whenever I press a key on a program i am testing, even if there is only a form and nothing else. How should I fix this problem? I need this fixed to test my program. Thanks.
The loader lock detection isn't an actual exception; it's a Visual Studio "debugging assistant" that helps you track down bad practices, leaks, and other workin's of the devil. ;) First of all, make sure this is valid: are you doing any unmanaged interop during initialization? If so, this error may be valid and you should fix it. If this isn't a valid error, fortunately for this scenario, you can disable this debugging assistant: Debug->Exceptions->Managed Debugging Assistants->Loader Lock. Uncheck the "thrown" box, and you won't see this error any more.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Rabbi Kadouri Meets Messiah? The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
The loader lock detection isn't an actual exception; it's a Visual Studio "debugging assistant" that helps you track down bad practices, leaks, and other workin's of the devil. ;) First of all, make sure this is valid: are you doing any unmanaged interop during initialization? If so, this error may be valid and you should fix it. If this isn't a valid error, fortunately for this scenario, you can disable this debugging assistant: Debug->Exceptions->Managed Debugging Assistants->Loader Lock. Uncheck the "thrown" box, and you won't see this error any more.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Rabbi Kadouri Meets Messiah? The apostle Paul, modernly speaking: Epistles of Paul Judah Himango