aehimself 399 Posted April 17, 2021 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
David Heffernan 2353 Posted April 17, 2021 madExcept does support nested exceptions. Share this post Link to post
aehimself 399 Posted April 17, 2021 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
David Heffernan 2353 Posted April 17, 2021 And what about Mathias' response in that thread? Share this post Link to post
aehimself 399 Posted April 17, 2021 Which response you mean? To create a bug report and parse it's text from code? Share this post Link to post
David Heffernan 2353 Posted April 17, 2021 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
aehimself 399 Posted April 17, 2021 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
David Heffernan 2353 Posted April 17, 2021 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. 1 Share this post Link to post
Stefan Glienke 2019 Posted April 17, 2021 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. 1 Share this post Link to post
Anders Melander 1815 Posted April 17, 2021 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
Anders Melander 1815 Posted April 17, 2021 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. 1 Share this post Link to post
aehimself 399 Posted April 18, 2021 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
David Heffernan 2353 Posted April 19, 2021 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
Stefan Glienke 2019 Posted April 19, 2021 (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 April 19, 2021 by Stefan Glienke Share this post Link to post
David Heffernan 2353 Posted April 19, 2021 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
David Heffernan 2353 Posted March 3, 2022 Just trying to use inner exceptions in my own project (which has madExcept) and also feeling the pain ..... Share this post Link to post
Anders Melander 1815 Posted March 3, 2022 31 minutes ago, David Heffernan said: Just trying to use inner exceptions in my own project (which has madExcept) and also feeling the pain ..... Works for me. What's your problem? type EInner = class(Exception); EOuter = class(Exception); ... begin try raise EInner.Create('Inner'); except Exception.RaiseOuterException(EOuter.Create('Outer')); end; end; Share this post Link to post
David Heffernan 2353 Posted March 3, 2022 In Pascal code Exception.InnerException is never assigned. Share this post Link to post
Anders Melander 1815 Posted March 4, 2022 9 hours ago, David Heffernan said: In Pascal code Exception.InnerException is never assigned. Ah, yes; That's madExcept messing things up for everybody else. I thought you meant that madExcept didn't handle nested exceptions. Share this post Link to post
David Heffernan 2353 Posted March 4, 2022 5 hours ago, Anders Melander said: Ah, yes; That's madExcept messing things up for everybody else. I thought you meant that madExcept didn't handle nested exceptions. No doubt I can get the information about the nested exceptions using ME code. I solved my problem a different way that was actually a bit more elegant and avoided the complexity of nested exceptions anyway. Share this post Link to post