Why no mbr file?

delphi package - automated exception handling

Why no mbr file?

Postby pcoenen » Mon Sep 30, 2019 9:18 pm

Using madExcept version 5.0.0, 64bit application (Delphi 10.2.3)

Although my application crashes (yes deeply ashamed) and MS windows shows an info popup about the crash, I can't find a mbr file afterwards. I'm sure my setup of madExcept is ok (I've did a test to force an exception which generated a .mbr file).
Is there already a new version of madExcept available?

Regards,
Pascal
pcoenen
 
Posts: 18
Joined: Wed Mar 07, 2018 4:41 pm

Re: Why no mbr file?

Postby madshi » Tue Oct 01, 2019 8:24 am

You can use this build which is somewhat newer, but it's not much different, and it is very unlikely to fix this problem:

http://madshi.net/madCollectionUpdate.exe

There are some kind of exceptions that madExcept cannot properly report. For example, imagine the memory manager gets broken so that each call to the memory manager produces another access violation. madExcept does need to allocate memory. So in this situation madExcept can't work properly. This is just one example, of course, there are others.

Can you reliably reproduce the crash on your dev PC? In that case please activate "instantly crash on buffer overrun". This feature consumes a lot of RAM, though, so if you have bad luck, your program will run out of RAM when using that feature. But if it doesn't, this feature should raise an exception if you have any kind of buffer overrun in your code. That might help finding the real cause of the wild crash you get atm.
madshi
Site Admin
 
Posts: 10098
Joined: Sun Mar 21, 2004 5:25 pm

Re: Why no mbr file?

Postby pcoenen » Tue Oct 01, 2019 2:59 pm

Can you reliably reproduce the crash on your dev PC? In that case please activate "instantly crash on buffer overrun". This feature consumes a lot of RAM, though, so if you have bad luck, your program will run out of RAM when using that feature. But if it doesn't, this feature should raise an exception if you have any kind of buffer overrun in your code. That might help finding the real cause of the wild crash you get atm.


No I can't reproduce this. I've a couple of users with the same issue. Also did the the with the buffer overrun but got no exception.

For example, imagine the memory manager gets broken

Can you please explain what you mean with 'gets broken'.
pcoenen
 
Posts: 18
Joined: Wed Mar 07, 2018 4:41 pm

Re: Why no mbr file?

Postby madshi » Tue Oct 01, 2019 3:23 pm

A random buffer overrun can destroy important data, so that e.g. a memory manager trying to do something results in a crash. For example, if a function pointer is overwritten with a random value, the thread trying to call that function pointer will always jump to a random location, which will automatically lead to a crash (or to even worse damage).

Did you try the buffer overrun check on your own PC, or on the PC of the end user who has this problem? The buffer overrun check will only work if madExcept can find the madExcept32.dll. On your dev PC madExcept will find that automatically. But the end user doesn't have the file. So if you want the buffer overrun check to be performed on the end user's PC, you need to distribute the madExcept32.dll with your EXE file (same folder). But before you do that I recommend that you test your program with the buffer overrun check enabled on your own PC, just to make sure it doesn't run into "out of memory" problems.
madshi
Site Admin
 
Posts: 10098
Joined: Sun Mar 21, 2004 5:25 pm

Re: Why no mbr file?

Postby pcoenen » Wed Oct 02, 2019 2:16 pm

https://stackoverflow.com/questions/16602756/strange-0x0eedfade-exception-in-delphi-multi-thread-program

The above link is the same exception as the one I received from my user (0x0eedfade).


Googled a lot for this 0x0eedfade and at the end I found https://www.thedelphigeek.com/2007/04/most-important-delphi-setting.html

Would (don't laugh) enabling 'range check' help me finding issues like buffer overrun?
pcoenen
 
Posts: 18
Joined: Wed Mar 07, 2018 4:41 pm

Re: Why no mbr file?

Postby madshi » Wed Oct 02, 2019 3:20 pm

A range check finds *some* buffer overruns, but not all.
madshi
Site Admin
 
Posts: 10098
Joined: Sun Mar 21, 2004 5:25 pm

Re: Why no mbr file?

Postby pcoenen » Wed Oct 02, 2019 7:16 pm

Enabled range check and after many many tries... Range check exception in a third party unit. The allocate was not correct handling 64 wparam and lparam.

Resulting mbr file told me where I had to look :D
pcoenen
 
Posts: 18
Joined: Wed Mar 07, 2018 4:41 pm

Re: Why no mbr file?

Postby madshi » Wed Oct 02, 2019 7:20 pm

So did this solve the original problem?
madshi
Site Admin
 
Posts: 10098
Joined: Sun Mar 21, 2004 5:25 pm

Re: Why no mbr file?

Postby pcoenen » Wed Oct 02, 2019 7:21 pm

Yes it did
pcoenen
 
Posts: 18
Joined: Wed Mar 07, 2018 4:41 pm

Re: Why no mbr file?

Postby madshi » Wed Oct 02, 2019 7:30 pm

:D
madshi
Site Admin
 
Posts: 10098
Joined: Sun Mar 21, 2004 5:25 pm

Re: Why no mbr file?

Postby pcoenen » Fri Oct 04, 2019 6:23 pm

strange-0x0eedfade-exception-in-delphi-multi-thread-program

I spoke too soon. It came back but now definitely fixed (we found a way to replicate it on our system). It was a bug in the Pascal Script code. Affected only 64 bit version. Updated to latest svn and it is fixed. Maybe somebody can use this info later, you never know. Always generated this 0x0eedfade exception.

Is there a reason why madExcept doesn't seem to catch exceptions from/within the Pascal Script source (https://github.com/remobjects/pascalscript)
pcoenen
 
Posts: 18
Joined: Wed Mar 07, 2018 4:41 pm

Re: Why no mbr file?

Postby madshi » Fri Oct 04, 2019 6:53 pm

See my first reply.
madshi
Site Admin
 
Posts: 10098
Joined: Sun Mar 21, 2004 5:25 pm


Return to madExcept

Who is online

Users browsing this forum: No registered users and 6 guests

cron