snehalsao Posted December 1, 2010 Posted December 1, 2010 I have a custom ARX file that is throwing 2 unhandled exceptions while loading in AutoCAD 2011. The original source was built using VC++ 6 and worked with AutoCAD 2000. I fixed all the errors and built the source using Visual Studio 2008. But now the ARX file is not able to load in AutoCAD 2011. I see these exceptions and not sure how to debug and fix them: Unhandled Exception C0000005 (Access Violation Writing 0X3e5dfaac) at address 78556D4Ch Unhandled Exception C0000005 (Access Violation Reading 0X0000) at address 3E6FD4E5h I am a beginner and any help is appreciated. Quote
irneb Posted December 1, 2010 Posted December 1, 2010 You'll need to debug it. The jump from 2000 to 2011 is quite huge, so there might easily be some large amounts of modifications you need to do to the source. Most important is that you'll need the ObjectARX library for the specific AC version you're compiling for, and then have all the referencing in the source use the relevant library names (which may have changed since 2000). The compiler version is less of a necesity, you could even be able to compile the ARX using VS2006 and still have it work in AC2011. Quote
snehalsao Posted December 1, 2010 Author Posted December 1, 2010 I have compiled the source using MS Visual Studio 2008 and ObjectARX 2011 and then tried the custom ARX file in AutoCAD 2011. When I launched AutoCAD 2011 and it tried to load the custom ARX file it threw those 2 unhandled exceptions. What's the best way to debug the loading issue (is there any runtime de****** in AutoCAD)? Please let me know. Thanks. Quote
irneb Posted December 2, 2010 Posted December 2, 2010 I'm trying to find the thread where I discussed debugging in VS & DotNet with ACad. It's somewhere on AUGI, but they're upgrading their web site at the moment - can't open it I think debugging ObjectARX would work similarly. Anyhow, the "trick" is to use VS's debugging - but you'll need to set the project to load the DLL into ACad. And then I've made a piece of lisp to be included in the ACAD.LSP file - this then automatically loaded the DotNet DLL if the current folder was a debug folder (as VS makes when it compiles for debug purposes). It shouldn't be too dificult to also include for ARX files: (vl-load-com) ;; Check if debugging .NET & load the DLL if so (defun DebugNET (/ path flst fn) (setq path (getvar "DWGPREFIX")) (if (wcmatch (strcase path) "*\\DEBUG*") (progn (setq flst (vl-directory-files "*.DLL" 1)) (foreach fn flst (if (wcmatch (strcase path) (strcat "*\\" (strcase fn) "\\*")) (progn (princ (strcat "Loading " fn " for debugging ... ")) (command "._NetLoad" "fn") (princ "done.") ) ;_ end of progn ) ;_ end of if ) ;_ end of foreach ) ;_ end of progn ) ;_ end of if ) ;_ end of defun ;; Startup function (defun-q S::Startup () (princ "Startup function\n") (DebugNET) ) ;_ end of defun-q (princ) Quote
irneb Posted December 2, 2010 Posted December 2, 2010 It might also be a good idea to move this thread to the Forum: .NET, ObjectARX & VBA. You might find more help there. Hint to moderator(s) :wink: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.