RE: Problem with MFC extension DLL, threads, and .Net loader lock
- From: v-garych@xxxxxxxxxxxxxxxxxxxx ("Gary Chang[MSFT]")
- Date: Fri, 27 Oct 2006 08:28:46 GMT
Hi Norman,
Based on my understanding, the problem is your application implicitly links
to a MFC extension DLL(XMap), and use that DLL's function in a worker
thread. When that worker thread exits, yo receive an error message about
the OS Load Locker issue which invoked from another mixed DLL
(RegexWrapD.dll). Please correct me if I misunderstood anything.
Before we dig into this problem, would you please tell us whether this
problem occurs outside the VS2005 debugger? If your application could work
well without VS2005' s debugger, then this problem may occur because of the
way in which the debugger in Visual Studio 2005 runs managed applications
that use Microsoft Foundation Classes version 8.0 in one or more DLL files.
We have an MSDN KB article which targets on this issue:
FIX: Error message when you use the debugger in Visual Studio 2005 to debug
an MFC class library application: "Managed Debugging Assistant 'LoaderLock'
has detected a problem in '<filename.exe>'"
http://support.microsoft.com/default.aspx/kb/913996
If the above KB article cannot resolve your problem, we may need more info
to isolate the issue:
1. How about that mixed DLL, how do you use it in your application? It
seems that worker thread also load that DLL.
2. Each thread's call stack info while the application breaks on that
error. You can get a specific thread's call stack by select the target
thread ID in the Debug | Windows | Threads window, then invoke its
corresponding Call Stack window.
Before doing this, you may need to setup the debugging symbols for your
VS2005. For example to set the Symbol Server path you need to input
"srv*c:\LocalSymbols*http://msdl.microsoft.com/download/symbols;" in the
Tools | Options | Debugging | Symbols as the directory. This will tell the
VS2005 debugger to lookup symbol from the Microsoft symbol server
"http://msdl.microsoft.com/download/symbols" and cache the downloaded
symbol in "c:\LocalSymbols" folder.
By the way, there would be many reasons to cause the loader locker problem
in the case of the mixed DLL, I suggest you refer to the following MSDN
articles for the details:
Converting Managed Extensions for C++ Projects from Pure Intermediate
Language to Mixed Mode
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmex/html/
vcconconvertingmanagedextensionsforcprojectsfrompureintermediatelanguagetomi
xedmode.asp
Mixed DLL Loading Problem
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechar
t/html/vcconMixedDLLLoadingProblem.asp
Thanks!
Best regards,
Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- Follow-Ups:
- References:
- Problem with MFC extension DLL, threads, and .Net loader lock
- From: Al Norman
- Problem with MFC extension DLL, threads, and .Net loader lock
- Prev by Date: Re: vc is faster, no?
- Next by Date: Re: Losing all previous preprocessor symbols when adding one
- Previous by thread: Problem with MFC extension DLL, threads, and .Net loader lock
- Next by thread: Re: Problem with MFC extension DLL, threads, and .Net loader lock
- Index(es):
Relevant Pages
|
Loading