Author Topic: Fatal Error 2010  (Read 31387 times)

jbuzbee

  • Member
  • *
  • Posts: 99
    • JamesDBuzbee.com
Fatal Error 2010
« on: April 04, 2014, 12:10:21 PM »
I'm getting a pretty nasty fatal error in Acad 2010 when the OpenDCL.arx is loaded.  I've painstakingly isolated it to OpenDCL.  It happens when closing a document and executing the "new" command.  At first I thought it was my command reactor but ruled that out as well.

Has anyone else seen this?

jb

BazzaCAD

  • OpenDCL Webmaster
  • Administrator
  • Hero Member
  • *****
  • Posts: 855
  • Cylons will kill you
    • OpenDCL
Re: Fatal Error 2010
« Reply #1 on: April 04, 2014, 12:12:43 PM »
What version of OpenDCL are you using?
a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom

jbuzbee

  • Member
  • *
  • Posts: 99
    • JamesDBuzbee.com
Re: Fatal Error 2010
« Reply #2 on: April 04, 2014, 12:21:59 PM »
8.0.0.5

Also happened with 7.0.1.4

owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 3094
    • Outside The Box
Re: Fatal Error 2010
« Reply #3 on: April 04, 2014, 04:12:55 PM »
I could not reproduce the problem with AutoCAD 2010 64 bit on Windows 7 64 bit. I started AutoCAD 2010, entered OPENDCL to load OpenDCL Runtime 8.0.0.5, entered QNEW and started a new drawing, entered CLOSE to close the second drawing, entered NEW to start another new drawing. All worked as expected.

jbuzbee

  • Member
  • *
  • Posts: 99
    • JamesDBuzbee.com
Re: Fatal Error 2010
« Reply #4 on: April 08, 2014, 08:25:54 AM »
Ok, everyone knows that if I proclaim the problem is solved with the latest version the problem will return with a vengeance.   >:(

So, I'm not going to say the problem is solved - that's not what I'm saying at all.  ;)

jbuzbee

  • Member
  • *
  • Posts: 99
    • JamesDBuzbee.com
Re: Fatal Error 2010
« Reply #5 on: April 08, 2014, 10:22:57 AM »
DAMN IT  >:( >:( >:( >:( >:(

jbuzbee

  • Member
  • *
  • Posts: 99
    • JamesDBuzbee.com
Re: Fatal Error 2010
« Reply #6 on: April 16, 2014, 08:42:47 AM »
Could someone load the attached and see if you can repeat what I'm seeing.

1. Open AutoCAD with a single drawing opened.
2. In the VLIDE editor load the attached lisp
3. command "kbadt"
4. Close the only opened drawing . . . Fatal Error

Thanks for any help.

jb

AutoCAD Architecture 2010
OpenDCL 8.0.0.5
Windows 7 64 bit

This didn't happen on ACA 2009, Opendcl 7, WinXP
« Last Edit: April 16, 2014, 09:16:00 AM by jbuzbee »

owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 3094
    • Outside The Box
Re: Fatal Error 2010
« Reply #7 on: April 16, 2014, 09:40:11 AM »
I can reproduce it in plain AutoCAD 2010. Have you narrowed down which code causes it? I'll have a look under the debugger later today to see if I can tell from there.

jbuzbee

  • Member
  • *
  • Posts: 99
    • JamesDBuzbee.com
Re: Fatal Error 2010
« Reply #8 on: April 16, 2014, 10:45:28 AM »
It's difficult for me to narrow done any suspect code because it worked flawlessly in 2009.  I'm not doing anything weird like reactors or accessing AEC via com.  It's pretty straight forward stuff. 
Thanks for your help Owen!

jb

owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 3094
    • Outside The Box
Re: Fatal Error 2010
« Reply #9 on: April 16, 2014, 12:31:03 PM »
I've narrowed the problem down to your (dcl_Form_Close) call in OnEnteringNoDocState. It appears to be a bug in AutoCAD that occurs when an asynchronous event is fired while entering no-document state. Offhand I don't see any easy way to detect and prevent it in the OpenDCL code, but I'll keep looking. A workaround in the meantime would be to set your form's Event Invoke property to Synchronous so that the OnClose fires synchronously instead of asynchronously.

BTW, the code you attached creates registry keys when executed. It's not really a good idea to upload code for testing that modifies the registry or file system, as it adds more time that I have to spend cleaning the code before I can test it. In this case it wasn't too difficult, but worth mentioning in case you had not thought about it.

owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 3094
    • Outside The Box
Re: Fatal Error 2010
« Reply #10 on: April 16, 2014, 08:15:25 PM »
For the next build, I've implemented an experimental fix for this problem. I added code to force synchronous event handling when a form is closing. This seems reasonable, since an asynchronous event handler will no longer be able to access the form (because the form will be closed before the handler executes). It does prevent this crash from occurring; hopefully it doesn't introduce any unwanted new problems.

jbuzbee

  • Member
  • *
  • Posts: 99
    • JamesDBuzbee.com
Re: Fatal Error 2010
« Reply #11 on: April 17, 2014, 07:37:19 AM »
Thank you Owen.  I don't know what I would do without OpenDCL and obviously you.

Thank you again  8)

jb

p.s. sorry about the registry stuff

jbuzbee

  • Member
  • *
  • Posts: 99
    • JamesDBuzbee.com
Re: Fatal Error 2010
« Reply #12 on: April 18, 2014, 05:48:01 AM »
8.0.0.6 seems to have fixed the bug - Thanks again Owen

jbuzbee

  • Member
  • *
  • Posts: 99
    • JamesDBuzbee.com
Re: Fatal Error 2010
« Reply #13 on: April 22, 2014, 11:54:26 AM »
Well, now I have another Fatal Error: this one is, however, random.  Same palette as posted here, multiple drawings opened, upon closing a drawing - bang.

Any thoughts?

jb

owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 3094
    • Outside The Box
Re: Fatal Error 2010
« Reply #14 on: April 22, 2014, 01:08:55 PM »
See if you can narrow it down to a specific piece of code like I did with the other crash. If you can get to where you can reproduce fairly reliably, then try Synchronous to see if that resolves it. If it does, then we'll know it's probably the same thing as before, just a different trigger.