LoaderLocker

M

MAF

I am getting an error message on one of my assemblies. First what is the
LoaderLocker? And how can I get past the error?

Here is the error message and some information I found on the Net.

LoaderLock was detected

Message: DLL
'C:\GVSS0509\EnerPrise.Dashboard\bin\Debug\Prosym_SQLWrapper.dll' is
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.
 
W

Willy Denoyette [MVP]

MAF said:
I am getting an error message on one of my assemblies. First what is the
LoaderLocker? And how can I get past the error?

Here is the error message and some information I found on the Net.

LoaderLock was detected

Message: DLL
'C:\GVSS0509\EnerPrise.Dashboard\bin\Debug\Prosym_SQLWrapper.dll' is
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.
Are you sure 'Prosym_SQLWrapper.dll' is a pure managed assembly (written in
C# only), IMO it's impossible to execute inside the OS loader lock from a
pure managed assembly, pure managed assemblies do not have a DllMain entry.


Willy.
 
M

Marko Becirevic

I am getting an error message on one of my assemblies. First what is the
LoaderLocker? And how can I get past the error?

Here is the error message and some information I found on the Net.

LoaderLock was detected

Message: DLL
'C:\GVSS0509\EnerPrise.Dashboard\bin\Debug\Prosym_SQLWrapper.dll' is
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.

Your dll is not purely managed, and dll deadlock can occur (GC.Collect()
executed while in dll loader critical section.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top