This LoaderLock Error msg prompt out each time i stop the program in VS 2005

The program is running correctly, but the problem is, each time i Stop Running the testing program, this error Message is prompt out.

1."No Symbols are loaded for any call stack frame. The source code cannot be displayed"

2. LoaderLock 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.

Troubleshooting tips: Get information about MDAs

How to Solve this error? What is the effect of this error?

What the means of LoaderLock?

I suspected the Error Msg is come out due to I am using the Chart Viewer.

Please kindly help

Thanks.

[806 byte] By [LeoNg] at [2007-12-24]
# 1

Well, http://windowssdk.msdn.microsoft.com/en-us/library/ms172219.aspx will tell you more about what the problem is, and what the effects may be...

Best regards,
Johan Stenberg

MSJohanStenberg at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2

Hi Johan,

Thank you, actually i read this before, but this information maybe is not so clear to me.

maybe I need the example to explaine the effect of this error.

For other weired thing i found is, when i direct exit on the program(Like click the Exit button on interface), will prompt this msg, but if i using the "Stop debugging" function in VS 2005, then this msg is not coming out.

LeoNg at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3
The "LoaderLock was detected" message should show up when you start your program, not when you end it. Keep an eye on the Output window while your program is starting. You see that message when a DLL you are using is doing something naughty, using the CLR too early. In your case, it is a false alarm and you can ignore it. The CLR is already initialized and ready to be used because your VB program took care of it when it started. If it wasn't a false alarm, your program would freeze at startup.
nobugz at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...