PDA

View Full Version : Application terminates after appx 10 exceptions.


Espresso
13-Jun-2009, 01:03 AM
Hi there!
Eureka Log 6.20 with Delphi 2006.
After logging 10 exceptions or so, the app terminates silently.
Is there anything I can do to prevet this? Thanks!


Here is the source to simple Delphi 2006 app to reproduce.
Just drop a button and an TEdit onto the form and press the button.
--------------------------------------------------------
unit Unit7;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExceptionLog, ECore;

type
TForm7 = class(TForm)
Button1: TButton;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
private
iPass : Integer;
public
{ Public declarations }
end;

var
Form7: TForm7;

Procedure LogException;


implementation

{$R *.dfm}

Procedure LogException;
begin
if IsEurekaLogInstalled then begin
StandardEurekaNotify( ExceptObject, ExceptAddr )
end else begin
ShowMessage( 'Eureka log is not installed.' );
end;
end;


procedure TForm7.Button1Click(Sender: TObject);
begin
CurrentEurekaLogOptions.ExceptionDialogType := edtNone;
iPass := 0;
while (true) do try
inc(iPass);
Edit1.Text := IntToStr(iPass);
Edit1.Refresh;
Raise Exception.Create('');
except
LogException;
end;
end;

end.
--------------------------------------------------------

Alex
15-Jun-2009, 10:44 AM
Hi.

Please, check you "Advanced options" tab in EurekaLog's project options.
There is option "Restart/Terminate/None" Application after N errors in M minutes.
Probably your behaviour is by design - you just forget to set proper options.

Espresso
15-Jun-2009, 10:39 PM
... Is it right to have the default behaviour different from Delphi one and hide the setting to "put it the way it was" into "Advanced Settings"?

Alex
16-Jun-2009, 06:20 AM
Hi,

Actually, it is hard decision to make.
You tell that because you now have negative experience with this switch.
But we switch it off by default, then another customer may get upset if his application becomes unusable due to constantly popping exceptions. (well, that may happen after you enable EurekaLog, if there is some bad bug in your code)

This is not the only place, where EurekaLog overrides default behavior.
Another example is TThread. By default (i.e. in Delphi only), every unhandled exception is just saved in FatalException property. No error message at all. EurekaLog modifies this behavior by displaying a error dialog if there is unhandled exception in thread.

P.S.
Hmmm..... actually, EurekaLog doing that A LOT by displaying its own error dialog with call stack and other stuff - certainly, this is not standard Delphi's behavior and you probably don't want "the way it was" be a default setting (I'm just joking :D ).