Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Valued Contributor
94 Posts
4 Kudos
Registered: ‎03-09-2003
Post 11 of 14

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
832 Posts
38 Kudos
Registered: ‎09-14-2003
Post 12 of 14

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
94 Posts
4 Kudos
Registered: ‎03-09-2003
Post 13 of 14

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
362 Posts
34 Kudos
Registered: ‎06-02-2005
Post 14 of 14

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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!