Standard exception dialog

delphi package - automated exception handling
Post Reply
mw108
Posts: 5
Joined: Wed Sep 25, 2019 2:04 pm

Standard exception dialog

Post by mw108 »

Even though madExcept is enabled, sometimes users only get a standard exception dialog for some errors like:
Program Name
Access violation at address 010C9D5A in module 'program.exe'.
Read of address 00000110.

[OK]
And no debug.log is created. Other times they get the madExcept error report dialog with a debug.log.

Whats the problem here?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Standard exception dialog

Post by madshi »

Do you have custom madExcept code added to your application? Or did you simply just activate madExcept and let it do its thing?

Does this Access Violation happen during program startup or exit? Or does it happen in the middle of running?
mw108
Posts: 5
Joined: Wed Sep 25, 2019 2:04 pm

Re: Standard exception dialog

Post by mw108 »

Sorry for late reply.

I just activated madExcept and let it do its thing. It happens on program exit. The program is not fully unloaded yet, the GUI is still visible and the program is cleaning up things.

When I forcefully trigger an exception while the program is running, I get a proper madExcept exception dialog with a stack trace and all the other options.

However, this "exit exception" wasn't captured by madExcept anymore.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Standard exception dialog

Post by madshi »

I thought that maybe madExcept was already finalized during process shutdown, but if your GUI is still visible that seems unlikely.

Can you reproduce this problem on your development PC? If not, how often does this happen for users? Can they run tests for you? Or is it so rare that it's hard to test properly?
mw108
Posts: 5
Joined: Wed Sep 25, 2019 2:04 pm

Re: Standard exception dialog

Post by mw108 »

I was able to reproduce the steps which caused the AV on my development machine in the IDE with the debugger and could fix.

At what point during a program shutdown does madExcept get finalized? Does it get finalized after Application.Run or earlier?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Standard exception dialog

Post by madshi »

Afterwards.
mw108
Posts: 5
Joined: Wed Sep 25, 2019 2:04 pm

Re: Standard exception dialog

Post by mw108 »

Hm, there is still something weird going on. Even when the program is running I get the standard exception dialog in many cases. What could be wrong? Anything I can check? We are using madExcept in another project and there it is working fine. But in this project something is wrong.

Code: Select all

[x] enable madExcept

[x] link in madExcept code
[x] link in madExcept settings
[x] link in function names and line numbers
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Standard exception dialog

Post by madshi »

Is this during shutdown the process again? Or in the middle of it running?
mw108
Posts: 5
Joined: Wed Sep 25, 2019 2:04 pm

Re: Standard exception dialog

Post by mw108 »

madshi wrote:Is this during shutdown the process again? Or in the middle of it running?
While it is running.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Standard exception dialog

Post by madshi »

Does this always happen for any exception (even a manually raised test exception)? Or does it only happen sometimes? Can you reproduce the problem at all on your dev PC?
Post Reply