Author Topic: error: Exception occurred: 0xC0000005 (Access Violation) ; warning: unwind skip  (Read 4380 times)

0 Members and 1 Guest are viewing this topic.

Bill Tillman

  • Guest
I have been searching for help on this error I encountered last night. My project consists of a couple of .NET C# programs which launch AutoCAD load and run some LISP programs to create some automated drawings. I had perfect runs testing yesterday on my desktop which is Windows 7 x64, AutoCAD 2015 Mechanical x64. The production box this will eventually be moved to is Windows 7 x64 with AutoCAD 2013 PDS x64. The codes which ran perfect on my desktop caused AutoCAD 2013 to lock up with the above error message. I got an endless loop of that message box and could not exit AutoCAD without using the Task Manager to kill the process.

The searches I did indicate that this might not be an AutoCAD error, but more related to the OS. Then I found several searches including some posts on theSwamp in which the problems seem to be related to VLISP code, not Windows. The code I'm running gets all the way to the end and it appears that when it's trying to save the file is when this happens. Trouble is, the drawing file is being created and it's all there. If I try to close AutoCAD manually it reports the same error, even though I'm not trying to save anything. If I try to open a file after this happens, the same error message box appear.

Strangely, I rebooted this 2013 machine and the code ran perfect once .... but only once. After that it went right back to the error message box. Since it's a production box I stopped all testing on it until I figure this out.

We're going to try re-installing .NET on this box as per one suggestion I read. But if this pans out, we will end up using AutoCAD 2015 Mechanical as my desktop does not exhibit this same problem. With the only exception of AutoCAD 2015 vs 2013, my desktop was built almost identical to this production machine.
« Last Edit: April 23, 2015, 10:12:05 AM by Bill Tillman »

Andrey Bushman

  • Swamp Rat
  • Posts: 864
It it is difficult to treat a patient through his photo. Where is your code?

MexicanCustard

  • Swamp Rat
  • Posts: 705
It it is difficult to treat a patient through his photo. Where is your code?

Andrey, I'm stealing that phrase.  I like it.
Revit 2019, AMEP 2019 64bit Win 10

Bill Tillman

  • Guest
Thanks for the replies. I wish I could post more but I'm limited....NDA's, etc... It appears to be happening either as the file is being saved or when the LISP code is trying to close the drawing:
Code: [Select]
   (setq fname (strcat "//long_path_name/" dwgno ".dwg"))
   (command-s "._SAVEAS" "2004" fname)
   (command-s "._CLOSE" "_Y")
Like I said, the file gets saved. But AutoCAD hangs up. If I repeat the steps manually from the command line it also locks up AutoCAD, in fact just trying to close the drawing file causes it, so I'm thinking it's when AutoCAD is trying to give up the file to the OS that this happens. Maybe totally unrelated to the LISP code.

BTW, this is 2013 but I develop on a 2015 system. The command-s was changed due to 2015 having some quirks to it. When I researched this it said it was out before 2013 and it's supposed to be compatible with it. And again, this code did run once, flawlessly.

Andrey Bushman

  • Swamp Rat
  • Posts: 864
Andrey, I'm stealing that phrase.  I like it.
No problem.

Bill, I don't know LISP (the "hello world" level only)... Did you try save and close your drawing manualy (after your main code was done), instead of to do the same through LISP?

Also, it is possible you have got a problem earlier in other piece of code, and the saving or closing reveal this problem only (for example, maybe the database of your drawing was damaged by your code in the acad 2013).

Did you try do the same through accoreconsole.exe instead of acad.exe?
« Last Edit: April 23, 2015, 02:56:23 PM by Andrey Bushman »

TMoses

  • Guest
Lisp is "per-document" ... so you close that drawing, where the Lisp code runs inside :-)
This will only work, if (commad "_close" ...) is the absolute last Lisp operation, not even (princ) should follow;
but I guess, even that will not work correctly, finally.