DCSIMG
LoaderLock was detected ??? - .NET Geek

.NET Geek

"It is upon the Trunk that a gentleman works" - Confucius

LoaderLock was detected ???

For some time I have seen this weird error that seemed to pop up out of nowhere. When debugging a solution in Visual Studio 2005 I would occasionally get a "Loader Lock was detected. 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 sort of ignored the error for a few days since I couldn't connect it to anything I did. Well, it only took 2 minutes on Google to find out that the offender is ITunes 7.1. (see here and here) I am using an IPod Nano to listen to podcasts while commuting to work. As a morning ritual I plug in my new Nano and ITunes starts automatically. I usually let ITunes run in the background for a little while downloading new shows before shutting it down to save precious CPU cycles for VS which is a slow beast. I still don't have a clue what causes this.
Anyone?

Comments

Kerry said:

I started getting this as well at a new job using VS2005. I couldn't think of anything that I did in code that would cause this but you've found the answer! I did install iTunes at the time it started happening...which is a relief...at least it's not my code!

Thanks!

# May 28, 2007 5:07 PM

rachnoid said:

This is due to is one of the Managed Debugging Assistants (MDAs) that were added to VS2005 to help find hard to debug runtime issues.

Look at

www.thezbuffer.com/.../304.aspx

# October 1, 2007 9:05 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: