Visual LISP, AutoLISP and General Customization

Reply
Valued Contributor
FT398
Posts: 93
Registered: ‎03-09-2003
Message 11 of 14 (178 Views)

Re: Reactor triggers fatal error

06-18-2012 07:34 AM in reply to: FT398

Found it.

 

It seems that the error is triggered by the use of command-s within the routines error handlers.

 

A search tells me that command-s appears in these files so presumably they will all be affected.

 

MVSETUP.lsp

EDGE.lsp

AI_UTILS.lsp

VL.arx

Distinguished Mentor
Moshe-A
Posts: 739
Registered: ‎09-14-2003
Message 12 of 14 (160 Views)

Re: Reactor triggers fatal error

06-18-2012 10:01 PM in reply to: FT398

Hi,

 

You mean they use (command) function?

i do not thing they made so essential changes to these command from previous releases

 

moshe

Valued Contributor
FT398
Posts: 93
Registered: ‎03-09-2003
Message 13 of 14 (156 Views)

Re: Reactor triggers fatal error

06-18-2012 10:33 PM in reply to: FT398

It seems that command-s was introduced in AutoCAD 2012. The MVSETUP and EDGE lisp routines which shipped with 2011 and earlier use 'command' and these versions do not trigger the fatal error. However, the use of command-s on 2012 and 2103 when a CommandWillStart reactor is loaded will trigger a fatal error.

 

Partial  error routine from Edge.lsp (2011)

 

(defun edge-er (n) 
  (if (/= s "Function cancelled") 
    (princ (strcat "\nError: " n))
  ) 
  (command) 
  (command "_.UCS" "_P")

 

Same section from Edge.lsp (2013)

 

(defun edge-er (n) 
  (setq *error* lisp-er)
  (if (/= s "Function cancelled") 
    (princ (strcat "\nError: " n))
  ) 
  (edge_setCmdEcho 0)
  (command-s "_.UCS" "_P") 

 

 

If you are running 2012/2013 then load the reactor from my original post and then use this command and you will get a fatal error:

 

(command-s "_.line" "0,0,0" "10,10,0" "")

Valued Mentor
Ian_Bryant
Posts: 362
Registered: ‎06-02-2005
Message 14 of 14 (139 Views)

Re: Reactor triggers fatal error

06-19-2012 04:41 AM in reply to: FT398
Yes you are right, using the command-s function causes Autocad to crash,
when a command reactor is loaded.
I eventually found a description of this function in 2013 help.
It says that the function runs in a temporary command processor
separate from the main Autocad command processor,
and gives an example of how improper use might crash Autocad.
- using (command-s "U") while an ordinary command is active.
It would appear that they forgot to consider how the function
would handle command reactors.
Ian

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community