Jump to content
aehimself

Is a "bare-minimum" EurekaLog possible?

Recommended Posts

Hello,

 

I was using MadExcept until now but it's limitations are growing on me slowly. First that it simply swallows TThread.FatalException which is an easy fix honestly, but still.

But yesterday when I started to experiment with nested exceptions and realized that MadExcept simply doesn't support this I started to look for alternatives.

 

I downloaded a trial of EurekaLog and while the settings look intimidating at a first glance, it seems to work as I expect.

Before I'm reaching out to their official support I would like to know if anyone managed to achieve is a bare-minimum Eurekalog functionality: no bug reports, no custom forms; ONLY stack traces for exceptions?

I'll continue to play around with the settings (Threads show no stack traces for now) but if someone knows what should I check and uncheck for the above I'd be able to experiment and decide if I'll switch a lot faster.

 

Thank you!

Share this post


Link to post

http://forum.madshi.net/viewtopic.php?f=4&t=28723

 

I have the same symptoms. This simple code:

procedure TForm1.FormCreate(Sender: TObject);

 Function RecExDump(E:Exception): String;
 Begin
  If Not Assigned(E) Then Exit('');

  Result := E.ClassName + ' - ' + E.Message + sLineBreak + E.StackTrace + sLineBreak + sLineBreak + RecExDump(E.InnerException);
 End;

begin
 Try
  Try
   Raise Exception.Create('Original');
  Except
   Exception.RaiseOuterException(EListError.Create('Outer'));
  End;
 Except
  On E:Exception Do ShowMessage(RecExDump(E));
 End;
End;

Shows both exceptions without MadExcept enabled and with EurekaLog. If MadExcept is enabled, EecExDump only sees the outer exception,

Share this post


Link to post

Which response you mean? To create a bug report and parse it's text from code?

Share this post


Link to post

I guess that like Mathias I don't understand the use case for the code which madExcept is making fail. 

Share this post


Link to post

You don't have to. I just brought a minimum reproduceable code snipplet to show what built-in language feature is not supported by MadExcept.

Share this post


Link to post

Yes, I understand the behaviour, but I just don't know the use case. I guess it just be some exception handling model that I've never used. Like Mathias I tend to raise a new exception, or re-raise. But obviously breaking language feature is not desirable. 

  • Like 1

Share this post


Link to post

I just checked:

The hooking that madExcept is doing in Exception.RaisingException causes Exception.SetInnerException to never be called - and that method is responsible to set the FInnerException field.

Regardless of the use case, I call this a bug.

  • Like 1

Share this post


Link to post
26 minutes ago, Stefan Glienke said:

The hooking that madExcept is doing in Exception.RaisingException causes Exception.SetInnerException to never be called - and that method is responsible to set the FInnerException field.

Regardless of the use case, I call this a bug.

I agree. I believe it's been discussed with Mathias several times but for some reason he's not seen the light.

Share this post


Link to post

One thing to be aware of with EurekaLog is that it, in my experience, makes the link stage unbearable slow for large projects. This alone has made me replace it with madExcept in a few projects.

I have my small grievances with madExcept too though. In particular the fact that it pumps the message queue, for no good reason, when processing silent exceptions.

  • Like 1

Share this post


Link to post
17 hours ago, Anders Melander said:

One thing to be aware of with EurekaLog is that it, in my experience, makes the link stage unbearable slow for large projects.

My main home project atm is ~500k LOC if I'm not mistaken. Linking speed won't be an issue I presume.

 

If I'd be able to encrypt and patch the executable with the .MAP file I think it would be possible to disable all hooks and magic of MadExcept and use it only to fill the .StackTrace of exceptions (unit can be seen here). That'd be an acceptable solution too.

Share this post


Link to post

Encrypting the map file, and then decrypting on runtime doesn't add much security. Your map file would be readily reversible by any moderately skilled hacker. If you want to keep the map file private, don't add it to your exe and decode the stack trace addresses into method names when the bug report is sent to you. 

Share this post


Link to post
Posted (edited)

That's what the madCompileBugReport tool is for - you use madExcept with minimal debug info then the bugreport the application produces does not contain function names and such but using the tool turns it back into that - you need to have archived the map files for your released binaries though.

Edited by Stefan Glienke

Share this post


Link to post
4 hours ago, Stefan Glienke said:

That's what the madCompileBugReport tool is for - you use madExcept with minimal debug info then the bugreport the application produces does not contain function names and such but using the tool turns it back into that - you need to have archived the map files for your released binaries though.

Yes, this is precisely what I currently do

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×