MadExcept not detecting crash

delphi package - automated exception handling

Re: MadExcept not detecting crash

Postby jmarder » Wed Sep 27, 2017 6:52 am

madshi wrote:2) The test program from jmarder is interesting. Basically it shows that crashes inside of a custom "AllocateHwnd()" window proc aren't always caught by madExcept. I've analyzed this problem in detail and it seems that the exception is bypassing all of Delphi's own RTL exception handling somehow, so madExcept never gets access to it, and even Windows's "SetUnhandledExceptionFilter()" API doesn't work. It looks like a bug in the RTL to me


Well, the AllocateHwnd() function is just 12 lines of plain Windows API code. Why do you think it is a bug in the RTL? I would volunteer to open an issue at Embaracdro's issue tracker, but I need more details to do so.

madshi wrote:Fortunately, the problem seems to be limited to AllocateHwnd(), and it's easy enough to manually solve by adding a "try .. except madExcept.HandleException() end" block around the AllocateHwnd() window proc.


Unfortunately it is not that easy. AllocateHwnd() is used in several places in the VCL where I can't add this. AllocateHwnd() is also used in many 3rd party libraries where this exception hadnling is also missing and where you can't easily reference MadExcept as not every Delphi Developer has it installed.
jmarder
 
Posts: 9
Joined: Tue Sep 12, 2017 8:00 am

Re: MadExcept not detecting crash

Postby madshi » Wed Sep 27, 2017 8:27 am

Oh cool, I didn't know those PE options yet!
madshi
Site Admin
 
Posts: 9414
Joined: Sun Mar 21, 2004 5:25 pm

Re: MadExcept not detecting crash

Postby jmarder » Thu Oct 19, 2017 8:44 pm

Is there any news on the AllocateHwnd() issue?
jmarder
 
Posts: 9
Joined: Tue Sep 12, 2017 8:00 am

Previous

Return to madExcept

Who is online

Users browsing this forum: No registered users and 2 guests

cron