Continue button

delphi package - automated exception handling
Post Reply
Halley73
Posts: 6
Joined: Mon Oct 26, 2015 11:28 am

Continue button

Post by Halley73 »

Hi,
i'm testing madExcept for a future use in my application.

I simulate an exception with this simple code:

procedure ...
var LList : TStringList;
begin
LList.Add('Pippo');
end;

All works fine. The madExcept dialog appear. But when i hit Continue button the program write log file and exit. It remain in process list.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: Continue button

Post by madshi »

Many users seem to be testing with code like this. I don't like to too much, because it's very random. Using a non-initialized local variable means that basically "LList" has a random value. So calling LList.Add() means you're calling TStringList.Add() with a random "self" value. This can result in all sorts of weird behaviour. It could crash right away, or it could just overwrite some random memory and return without a crash, only to cause weird behaviour later.

If you want to test a straight crash, which doesn't overwrite random memory, I'd suggest you use either "raise Exception.Create('test')", or alternatively "integer(nil^) := 0". Both of these will test madExcept, without damaging the stability of the process. Calling methods with a random "self" value is rather unpredictable in comparison, and as such not really a very good test.

That said, it seems madExcept did catch the crash, which is good. I'm not totally sure what happens after that, though. You're saying a log is written and then your program exists but remains in the process list? What kind of log are you talking about? Do you mean madExcept writes a bug report? Or do you mean a different kind of log? And what happens if you disable madExcept and simulate the same crash? Does the same problem occur then, too?
Halley73
Posts: 6
Joined: Mon Oct 26, 2015 11:28 am

Re: Continue button

Post by Halley73 »

Hi,
i mean the bug report.

After i write post i made some try. I also uninstall and reinstall madExcept and all seems ok.

Thank you
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: Continue button

Post by madshi »

So all problems solved?
Halley73
Posts: 6
Joined: Mon Oct 26, 2015 11:28 am

Re: Continue button

Post by Halley73 »

Yes, thank you.

I wrote another post about Stack Trace problem.
Post Reply