Hi,
For test/demo purpose, I'd like to know if there's a reliable way to crash an OpenEdge session from ABL code. I just would like to keep it easy to reproduce (no external library for example, apart from OS libraries). Fun and creative solution would be even better :-)
11.5 - Windows / Linux
Thanks
Crash the session but not the DB?
Yes, only the client session
Would the "Attempt to define too many indexes" error crash a session (don't remember) ....
Do you mean a crash with an error, or do you mean that the session just dies leaving a procore/protrace file?
If it's ok to have an error then a recursive function call with no stop condition would crash it pretty quickly.
I mean a process crash leaving a protrace file.
Would over-filling the -T directory do it?
Tried to find the CRASH statement in documentation, but didn't find it :-)
I guess filling the -T will probably do it, but it may be difficult to reproduce, as this is for a test/demo purpose and I only have a single disk (so that will lead to all sort of problems for the other processes).
USB Dongle?
[quote user="Richard.Kelters"]
Would the "Attempt to define too many indexes" error crash a session (don't remember) ....
[/quote]
Yes it will.
Actually you could probably have all sorts of fun with a USB stick. Set the -T to point there and pull it out mid operation ;)
Will try those ideas !
RaiseException works fine, thanks !
I see that you already have a windows solution.
The code below fakes a crash on linux, it doesn't really crash but it creates a protrace file.
def var pid as char. input through echo $PPID. import unformatted pid. input close. os-command value(subst("kill -sigusr1 &1", pid)).
quit.
Replcae -sigusr1 by -11 to get a real crash
Just: INTEGER("a").
But session should be started with the modified promsgs file.
In hex editor find the text:
** Invalid character in numeric input %c.(76)
and replace "**" by "%G"
Just: INTEGER("a").
But session should be started with the modified promsgs file.
In hex editor find the text:
** Invalid character in numeric input %c.(76)
and replace "**" by "%G"
Flag this post as spam/abuse.