welcome to my blog
The best place on the internet for random code!
www.therealgromer.com









Apr
27
    
LoaderLock was detected?!?!
Posted (Mike) on 27-04-2007

If any of you code in Visual Studio 2005, you might have seen this exception thrown before.

Loader Lock Detected

It can be really frustrating if you don’t have the answer. Let me take that stress away. All you need to do is press Ctrl + Alt + E and you will get this window:

Exceptions Window

Expand Managed Debugging Assistants and then scroll down until you see the LoaderLock checkbox. All you need to do is uncheck it.

Loader Lock Checkbox

Hit Okay and you won’t see this problem in this current project again. It will come back in other projects though. I’ve heard there are registry hacks to fix this, but I have yet to try. If anyone has, please comment on the success of it!

Comments:
5 Comments posted on "LoaderLock was detected?!?!"
Stefan Nelson on April 27th, 2007 at 8:22 PM #

Just FYI the cause of this is very frequently iTunes.


Mike on April 27th, 2007 at 8:27 PM #

Well ain’t that some stuff…not a surprise either…


RyanTheRobot on April 28th, 2007 at 12:06 PM #

yeah so the only answers I can find about this have to do with .NET 2.0 and Managed DirectX (MDX) 1.1 assemblies. Apparently the iTunes 7.1 upgrade triggers this somehow.

From MSDN - “Managed debugging assistants (MDAs) are debugging aids that work in conjunction with the common language runtime (CLR) to provide information on runtime state. The assistants generate informational messages about runtime events that you cannot otherwise trap. You can use MDAs to isolate hard-to-find application bugs that occur when transitioning between managed and unmanaged code. You can enable or disable all MDAs by adding a key to the Windows registry or by setting an environment variable. You can enable specific MDAs by using application configuration settings. You can set additional configuration settings for some individual MDAs in the application’s configuration file. Because these configuration files are parsed when the runtime is loaded, you must enable the MDA before the managed application starts. You cannot enable it for applications that have already started.”


RyanTheRobot on April 28th, 2007 at 12:08 PM #

via TheZBuffer:

“To work around the problem you have several choices:
1. Go back to using VS2003 and .Net 1.1
2. Use MDX 2.0. Note that MDX 2.0 will never actually ship as it is being transformed into the XNA framework.
3. Disable the loader lock MDA. Debug/Exceptions (ctrl-alt+E), Open the Managed Debugging Assistants tree node and uncheck LoaderLock. This setting is per solution so it will only affect this solution.”


Dan on April 28th, 2007 at 1:36 PM #

I hate that error.

Thanks for the halpz :o


Post a comment
Name: 
Email: 
URL: 
Comments: