TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Ben Clark on June 16, 2017, 04:42:13 PM

Title: Purposefully Cause Fatal Error with Lisp
Post by: Ben Clark on June 16, 2017, 04:42:13 PM
What would be the best way to purposefully cause a fatal error every time using lisp?

:)
Title: Re: Purposefully Cause Fatal Error with Lisp
Post by: kdub_nz on June 16, 2017, 05:09:10 PM
If you want to hire me for a short time I'm sure I could produce something that would make you happy.



Title: Re: Purposefully Cause Fatal Error with Lisp
Post by: MP on June 16, 2017, 05:36:41 PM
Logon as Greg.
Title: Re: Purposefully Cause Fatal Error with Lisp
Post by: cmwade77 on June 16, 2017, 07:22:49 PM
Let Autodesk make your LISP routine for you.  :2funny:
Title: Re: Purposefully Cause Fatal Error with Lisp
Post by: Keith™ on June 16, 2017, 10:55:54 PM
I write an error handler into my lisp commands that simulate a fatal error along with a random error code. This simulated error is fired at random if the program is not licensed.
Title: Re: Purposefully Cause Fatal Error with Lisp
Post by: ChrisCarlson on June 19, 2017, 08:36:36 AM
What would be the best way to purposefully cause a fatal error every time using lisp?

:)

I'm not sure what your intentions are?
Title: Re: Purposefully Cause Fatal Error with Lisp
Post by: cmwade77 on June 19, 2017, 12:53:23 PM
I write an error handler into my lisp commands that simulate a fatal error along with a random error code. This simulated error is fired at random if the program is not licensed.
That is just mean, I like it, but it is mean.
Title: Re: Purposefully Cause Fatal Error with Lisp
Post by: Ben Clark on June 19, 2017, 05:23:03 PM
Master_Shake, I love ATHF. Also, my intentions are to prank my fellow employees :) I would make sure they didn't execute it and lose a ton of work though.

Keith: I like your style. How did you cause the fatal error?
Title: Re: Purposefully Cause Fatal Error with Lisp
Post by: tedg on June 20, 2017, 08:02:24 AM
Well you could just do a simple lisp that gives them the appearance (alert) of a fatal error,
something like this: (could be made nicer, more believable)
(also could add a -qsave and close option so it shuts them down)
(used "m" as command as most people use that as move in acad)
Code: [Select]

(defun c:m (/ ce ss)
   (setq ce (getvar "cmdecho"))
   (setvar "cmdecho" 1)
   (setq ss (ssget))
(alert "FATAL ERROR!!
YOU WILL LOSE ALL WORK
RECOVERY IS NOT POSSIBLE")
   (setvar "cmdecho" ce)
   (princ)
)
Title: Re: Purposefully Cause Fatal Error with Lisp
Post by: ronjonp on June 20, 2017, 09:18:40 AM
Master_Shake, I love ATHF. Also, my intentions are to prank my fellow employees :) I would make sure they didn't execute it and lose a ton of work though.

Keith: I like your style. How did you cause the fatal error?
You think that purposely causing a fatal error is a prank ... it's just rude IMO.  :?
Title: Re: Purposefully Cause Fatal Error with Lisp
Post by: ChrisCarlson on June 20, 2017, 10:47:26 AM
Master_Shake, I love ATHF. Also, my intentions are to prank my fellow employees :) I would make sure they didn't execute it and lose a ton of work though.

Keith: I like your style. How did you cause the fatal error?

Yea, you'd be gone; pink slipped; "you're outta here!"; if you did that here. There are numerous ways to cause humor discussed in other threads.
Title: Re: Purposefully Cause Fatal Error with Lisp
Post by: Keith™ on June 20, 2017, 04:31:42 PM
Master_Shake, I love ATHF. Also, my intentions are to prank my fellow employees :) I would make sure they didn't execute it and lose a ton of work though.

Keith: I like your style. How did you cause the fatal error?

No error, just a faked dialog with a random error code. When it fires, it looks like the real deal, with the option to save the drawing. Once the document is saved, AutoCAD closes and the user must go back into AutoCAD.

In some blind tests, I found that after a couple of times, users didn't try it anymore. Something about saving a huge drawing, restarting AutoCAD and then re-opening the drawing made them quit trying to use it.

I guess, it isn't so much about telling people "This product isn't licensed" because they will continue to use it anyway because the vast majority of people could not care less. If you make then restart AutoCAD every time they try to use an unlicensed product, then they will a) license it b) stop using it c) something else that I don't care about.

To be fair, I never put it in any commercial software, only that which is given away under the premise that they MUST register it with me after a short while.
Title: Re: Purposefully Cause Fatal Error with Lisp
Post by: Ben Clark on June 21, 2017, 05:52:38 PM
tedg: I like your idea of a nicer version that fakes it, saves, and closes down. I think I'll do something similar.

Master_Shake: Where is here? It sounds like you work for a very bureaucratic company.
Title: Re: Purposefully Cause Fatal Error with Lisp
Post by: ronjonp on June 21, 2017, 06:04:00 PM
..

Master_Shake: Where is here? It sounds like you work for a very bureaucratic company.
Apparently you don't understand what you're asking for is not a prank...
Title: Re: Purposefully Cause Fatal Error with Lisp
Post by: Keith™ on June 21, 2017, 06:07:15 PM
Master_Shake, I love ATHF. Also, my intentions are to prank my fellow employees :) I would make sure they didn't execute it and lose a ton of work though.

Keith: I like your style. How did you cause the fatal error?

Yea, you'd be gone; pink slipped; "you're outta here!"; if you did that here. There are numerous ways to cause humor discussed in other threads.

I once caused a coworker's drawings to have REDRUM on the screen whenever he issued certain commands in a particular order. Kinda like an easter egg. Nobody believed that it was happening because he couldn't reproduce it.

Oh what fun times!
Title: Re: Purposefully Cause Fatal Error with Lisp
Post by: kdub_nz on June 21, 2017, 06:18:03 PM
Master_Shake, I love ATHF. Also, my intentions are to prank my fellow employees :) I would make sure they didn't execute it and lose a ton of work though.

Keith: I like your style. How did you cause the fatal error?
You think that purposely causing a fatal error is a prank ... it's just rude IMO.  :?

Not just rude, also irresponsible and job threatening.
Title: Re: Purposefully Cause Fatal Error with Lisp
Post by: ChrisCarlson on June 22, 2017, 08:02:57 AM
tedg: I like your idea of a nicer version that fakes it, saves, and closes down. I think I'll do something similar.

Master_Shake: Where is here? It sounds like you work for a very bureaucratic company.

That is not a prank, a prank is issuing a SAPI call when an AutoCAD command is initiated. A prank is occasionally changing a users model space background and then changing it back. What you are proposing is just wrong.
Title: Re: Purposefully Cause Fatal Error with Lisp
Post by: tedg on June 22, 2017, 08:13:47 AM
tedg: I like your idea of a nicer version that fakes it, saves, and closes down. I think I'll do something similar.

Master_Shake: Where is here? It sounds like you work for a very bureaucratic company.

That is not a prank, a prank is issuing a SAPI call when an AutoCAD command is initiated. A prank is occasionally changing a users model space background and then changing it back. What you are proposing is just wrong.


That's what I was saying... my suggestion just "appears" to have an error, does nothing to anything.


I think he gets it, what hes trying to do is just make them panic for a second, similar to all other suggestions like it mentioned in other threads.
Maybe I'm wrong.

I agree to make the program actually crash would be bad.
Title: Re: Purposefully Cause Fatal Error with Lisp
Post by: Ben Clark on June 22, 2017, 08:44:29 AM
Master_Shake and kdub: not here to start any arguments. Calm down.

It's not job threatening because I own my own CAD business and I only employ 4 people. I'm trying to have a little fun. The lisp I'm writing will only cause an alert and then save and close the drawings.

Furthermore, most users save their drawings frequently because AutoCAD fatal errors at least once a day anyway. So even if I did execute my original idea of causing a fatal error, the world would continue to spin. Keith gets it; these things are hilarious  :-D