AV in MadExcept 2.7g

delphi package - automated exception handling
Post Reply
clivebennett
Posts: 8
Joined: Wed Feb 02, 2005 4:18 am

AV in MadExcept 2.7g

Post by clivebennett »

Hi,

When I get an exception in my Application, my application just disappears instead of the MadExcept box showing, when I run it through the Delphi 7 IDE, I get the exception (ie duplicate key) then immediately after I get an AV which if I do a stack trace on appears to be within Madexcept, I then OK to the AV and the application halts immediately.

I have reverted back to version 2.7b as this was the only other installation I could find on my PC. I think this error also occured on v2.7f but I cant be sure, but alls ok with 2.7b

Any ideas?.

Thanks
Clive.
clivebennett
Posts: 8
Joined: Wed Feb 02, 2005 4:18 am

Post by clivebennett »

Heres a screenshot of the Stack. If thats any help?
The error always occurs after a DBISAM Database exception, I can trigger it with a Duplicate key error, but the exception handling works fine if I just do something like

var
sl: TStringList
begin
sl.add('test'):

Image
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Hi Clive,

thanks for the screenshot, it helped me locating the code which is responsible for the crash.

Which OS are you running on? The code location which crashed should only be executed in the win9x family. Are you running in win9x?

Please try this:

ShowMessage('os version: ' + IntToHex(GetVersion, 8));
ShowMessage('magic: ' + IntToHex(madDisAsm.Magic, 8));
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

madshi wrote:Please try this:

ShowMessage('os version: ' + IntToHex(GetVersion, 8));
ShowMessage('magic: ' + IntToHex(madDisAsm.Magic, 8));
You can test that with 2.7b, too.
clivebennett
Posts: 8
Joined: Wed Feb 02, 2005 4:18 am

Post by clivebennett »

Im running Windows XP Pro, using D7

os version : OA280105

I couldnt get the Magic one to run, said it couldnt find MadDisAsm, what units that declared in ?. I put the code in the project dpr file.
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

clivebennett wrote:Im running Windows XP Pro, using D7

os version : OA280105
Ok, that is fine. But look into madExcept.pas in the function "IsProcessBlocked". There is code like this:

Code: Select all

  if GetVersion and $80000000 = 0 then
    DoSomethingNtSpecific
  else
    DoSomething9xSpecific;
And according to your screenshot the 9x branch is executed!!

That's the reason for the problems. Do you have any idea why "GetVersion" in "madExcept.IsProcessBlocked" should return something different than it normally does?

Could you please copy "madExcept.pas" and "mad.inc" to your project folder and then change "{$D-}{$L-}" to "{$D+}{$L+}" in "mad.inc"? Afterwards you should be able to step through the "IsProcessBlocked" function. Maybe you can find out what's going on there?
clivebennett
Posts: 8
Joined: Wed Feb 02, 2005 4:18 am

Post by clivebennett »

Im sorry I dont have the madexcept source code, Im more than happy to debug through it if you can let me have the source code?
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Just one idea that came to my mind:

Please right click your exe and check whether you're running it in win9x compatability mode.
clivebennett
Posts: 8
Joined: Wed Feb 02, 2005 4:18 am

Post by clivebennett »

No, Compatibity mode is switched off.

This doesnt just happen with my main application, I created a very small dummy app and it happened with this also.
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Ok, please send me a mail, then I'll send you madExcept.pas for testing.

I really don't understand it. The crash can definately only occur if GetVersion sais that the program is running in win9x.
clivebennett
Posts: 8
Joined: Wed Feb 02, 2005 4:18 am

Post by clivebennett »

I emailed you a couple of days ago, Did you get it ok?
Post Reply