OK, I'm fairly new to the world of reactors and have run into a problem which I'm hoping somebody can help me with.
I have created a very basic reactor as a test. As you can see, it doesn't actually do anything other than set a variable so I know the error isn't caused by something I'm doing with the reactor.
(defun np:test (reactor callbackdata / ) (setq abc 123) ) (if (not np:reactor1) (setq np:reactor1 (vlr-command-reactor nil '((:vlr-commandwillstart . np:test))) ) )
OK, so the problem I have found is that if I load this reactor into a drawing and then use the MVSETUP command but escape out without completing the command, AutoCAD throws an error and becomes unusable. When I then close AutoCAD down I am met with multiple unhandled exception errors before the app finally closes.
I then altered the reactor from a vlr-command-reactor to a vlr-editor-reactor and found that with this, I am no longer met with the same error while escaping out of MVSETUP. However, when I close CAD down I am eventually left with an 'AutoCAD Application has stopped working' error dialog on screen which reports that acad.exe as crashed.
I am working on AutoCAD Architecture 2012 (although I have tried it on 2013 to with the same results) on Windows 7 64bit. I have also tried this on ACA2012 x32 and found the same error exists.
Is there anybody out there who can confirm whether they get the same errors as me or whether I am doing something fundamentally wrong in the way I am handling reactors?
(defun np:test (reactor callbackdata / )
(setq abc 123)
(if (not np:reactor1)
(vlr-command-reactor nil '((:vlr-commandwillstart . np:test)))
the only thing i found that might be a problem is the extra slash (in red)
otherwise it is working good
Still crashes without - and that slash would normally be needed to clear out any localised variables in your reactor code. It's just that my example doesn't have any local variables in it for simplicity.
I certainly have none of my own reactors. I have even tried a clean out-of-the-box install and tried this directly after install and still get the crash.
MVSETUP is the only command I have found that causes the error. A bit of testing has shown some odd behaviour with it. If I make a CommandCancelled reactor, this flags when I cancel any command EXCEPT when I cancel MVSETUP and this just seems to close quietly without triggering the reactor.
I can confirm that mvsetup triggers a fatal error if a command reactor with a :vlr-commandwillstart event is active.
Sounds like a bug. Have you reported it at autodesk.com/submitbug ?
I hadn't reported it yet as I wanted to make sure other people could replicate it and also that it wasn't down to me doing something wrong. I'll report the bug now and see if anything comes of it. In the meantime I need to find a way around this because while there are any CommandWillStart reactors loaded, it means that MVSETUP will always trigger this error.
Seems that the EDGE command also triggers the same fatal error. Interestingly, both of these routines are old legacy lisp routines so at least I may be able to pinpoint the trigger point within the files.
Access a broad range of knowledge to help get the most out of your products and services.