TheSwamp
Code Red => .NET => Topic started by: Kerry on December 29, 2005, 02:25:59 AM
-
Visual Studio VS2003
for AC2005, AC2006
Setup as per Lab 02. If anyone needs a hand, just Yell.
Visual Studio VS2005 EXPRESS Editions
Interactive Debugging for ACAD is not enabled.
Visual Studio VS2005
There is an issue with debugging, and thankfully a work-around.
AutoCAD 2006 was written using the 1.1 version of the .NET framework.
VS2005 uses the 2.xx version.
Because of this mix, we can get what is called a LoaderLock/Deadlock when code is executed inside the unmanaged DllMain of a Mixed Mode DLL..
read <techno> : http://msdn2.microsoft.com/en-us/library/ms172219.aspx
The exception Mesasage looks like this :
LoaderLock was detected
Message: 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.
The Workaround : .. only until AC2007 release hopefully. This ONLY affects interactive DEBUGGING.
Create 2 registry files < text files > and save somewhere easily accessable from a file Explorer.
VS_debug_enable.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
"MDA"="0"
VS_debug_disable.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
"MDA"="1"
Just click the enabler VS_debug_enable.reg whenever you want to work with ACAD2006 < or prior ? >
I reset using VS_debug_disable.reg when I'm finished a session.
PS:
Don't forget to add the path of your ACAD.exe in the Project Properties tab.
Normal F5 debugging should now be accessable without spitting the dummy.
Regards
Kerry
I hope all members have a Safe and Happy New Year !
-
acad.exe.config??????????
-
Yeah, I just received VS2005 yesterday. Wish I had seen this before I started getting realllyyyy upset.
I wound up just turning LoaderLock off in my IDE settings.
-
Found it by brute force:
From the toolbars:
Debug->Exceptions->Managed Debugging Assistants-> uncheck LoaderLock.
-
interesting .. that stops the exception reporting for the error.
the registry key disables the managed debugging assistant (MDA) ..
I wonder if they are essentially the same thing ? The error is caused by several threads locking, and I wonder about the consequences of actually ignoring that.
-
Draftek ,
I have been advised that your posted solution < setting from the IDE> and modifying the registry are essentially the same workaround.
Although .. I'm not convinced that this is true in all respects, one difference is that the IDE settings are solution specific.
I've decided to change the setting from the IDE , untill/unless convinced otherwise.
-
Thanks for the update.
Also, doesn't the registry edit turn off ALL MDA's?