settings of auto actions don't work

delphi package - automated exception handling
Post Reply
flair58
Posts: 1
Joined: Sun Jun 05, 2022 10:01 am

settings of auto actions don't work

Post by flair58 »

Hi,
I'm using MadExcept to localize an EOutOfMemory exception.
Therefore I wrote a test application that is allocating more and more memory.
When the exception occurs Madexcept shows the standard message box and I can show the bug report.
But all settings I have done in the "exception auto actions" and in the "exception box settings" will be ignored.
(E.g. I have enabled "automatically restart application at once", but the application will not restart).
Is there a solution for that problem?
Note: This happens only in case of EOutOfMemory, at other exceptions MadExcept reacts as desired.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: settings of auto actions don't work

Post by madshi »

Hi there, and sorry for the late reply.

I'm not sure why your custom settings are not used in that situation. Maybe the part of madExcept that reads those settings isn't able to allocate enough RAM to handle the situation? I'm not sure why that would be the case, though. madExcept has an Out of Memory "insurance". Basically, madExcept allocates 16MB of RAM in its initialization, and then frees is when an exception occurs, in the hope that this extra 16MB will make it possible for madExcept to do its job. The freeing of those 16MB is done as the first thing when doing exception handling, so I'm not sure why madExcept should be able to do its job, but not be able to handle your special settings. That seems weird...
shragam
Posts: 14
Joined: Thu Mar 17, 2022 10:41 am

Re: settings of auto actions don't work

Post by shragam »

I also have this issue in the last version 5.1.2 with Delphi11.1 .
EOutofMemory/ EOutofResources and MadExcept doesn't restart automatically the application :-( (Even if I defined it in the settings)
Any help about this issue.
Thanks
Shraga
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: settings of auto actions don't work

Post by madshi »

Can you provide a simple and small test project to reproduce this problem?
shragam
Posts: 14
Joined: Thu Mar 17, 2022 10:41 am

Re: settings of auto actions don't work

Post by shragam »

It's in a big project, but I will create a small simple demo and upload it later
shragam
Posts: 14
Joined: Thu Mar 17, 2022 10:41 am

Re: settings of auto actions don't work

Post by shragam »

madshi wrote: Tue Aug 16, 2022 8:45 am Can you provide a simple and small test project to reproduce this problem?
I tried to create a small demo, but in the demo everything is working as expected :confused:
This happens once every few days in the big application.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: settings of auto actions don't work

Post by madshi »

Well, "out of memory" and "out of resources" problems should not be that hard to fix? So hopefully it's not a big problem if some of the madExcept settings are not always correctly applied, as long as you get a proper callstack?

Have you tried madExcept's leak reporting functionality to get to the bottom of why you're running out of memory/resources? Might be problematic in 32bit, though, because madExcept's leak reporting eats up a lot of RAM on its own. So ideally you'd do the testing in 64bit, if you can?
shragam
Posts: 14
Joined: Thu Mar 17, 2022 10:41 am

Re: settings of auto actions don't work

Post by shragam »

madshi wrote: Wed Aug 17, 2022 7:37 am Well, "out of memory" and "out of resources" problems should not be that hard to fix? So hopefully it's not a big problem if some of the madExcept settings are not always correctly applied, as long as you get a proper callstack?

Have you tried madExcept's leak reporting functionality to get to the bottom of why you're running out of memory/resources? Might be problematic in 32bit, though, because madExcept's leak reporting eats up a lot of RAM on its own. So ideally you'd do the testing in 64bit, if you can?
My application is 32bit.
It's connection to a lot of NVRs to monitor them.
Sometimes the application just kind of froze with madExcept windows and sometimes it's working ok and just restart my ap and save the log file "bugreport.txt"
in those case, I can identify that there were such exceptions.
I'll keep monitor it and hope to find why.
Shraga
shragam
Posts: 14
Joined: Thu Mar 17, 2022 10:41 am

Re: settings of auto actions don't work

Post by shragam »

Hi
Today I had it again in one of my customers
Image.
Everything was stuck.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: settings of auto actions don't work

Post by madshi »

I'd highly recommend that you try getting the leak reporting to work. If necessary, by trying to compile in 64bit.
shragam
Posts: 14
Joined: Thu Mar 17, 2022 10:41 am

Re: settings of auto actions don't work

Post by shragam »

madshi wrote: Tue Aug 23, 2022 4:22 pm I'd highly recommend that you try getting the leak reporting to work. If necessary, by trying to compile in 64bit.
I can't use 64 bit, only 32 bit.
I also add this to use 4GB

Code: Select all

const
  IMAGE_FILE_LARGE_ADDRESS_AWARE = $0020;
 {$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
It's happened randomly every few days especially in this customer .
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: settings of auto actions don't work

Post by madshi »

You can still try to do leak reporting in 32bit. You may have to try keeping RAM consumption down, in order not to instantly get "out of memory" exceptions, though.
shragam
Posts: 14
Joined: Thu Mar 17, 2022 10:41 am

Re: settings of auto actions don't work

Post by shragam »

madshi wrote: Tue Aug 23, 2022 5:09 pm You can still try to do leak reporting in 32bit. You may have to try keeping RAM consumption down, in order not to instantly get "out of memory" exceptions, though.
I'll check again my code, but the code use a lot of NVR SDK and I can't control on the SDK code.
I'll update if I'll find anything
Shraga
Post Reply