The problem is that my users are not getting a bug report when these exceptions occur just a message box with the error, This is usually followed by an Access Violation that also does not fire up MadExcept. I also can't pin down what their actions are that generate this problem since they occur sporadically and I can't recreate the problem on my computer.
The only Exception Filter that I've set is for EDBEditError and when I raise an EInvalidPointer in code, MadExcept does work properly. Any ideas about what's happening here?
Edit: I was looking at compiler settings and noticed that Stack Frames are off for Release. Does MadExcept need thme to be on?
Thanks,
Mitch Wolberg,
RockWare, Inc.
XE8 64bit Windows and Invalid Pointer Exception Problem
Re: XE8 64bit Windows and Invalid Pointer Exception Problem
Stack frames are not needed.
There are 2 possible explanations for this problem:
1) Either there's a try..except block somewhere which catches the invalid pointer exception and "handles" it by showing a simple message box. This would result in madExcept not caring about this exception since madExcept only cares about unhandled exceptions by default. You can make madExcept care about handled exceptions, too, by using this code:
2) Or the process was in such a bad state (e.g. memory allocator not working properly, anymore) that madExcept couldn't do its job, anymore.
There are 2 possible explanations for this problem:
1) Either there's a try..except block somewhere which catches the invalid pointer exception and "handles" it by showing a simple message box. This would result in madExcept not caring about this exception since madExcept only cares about unhandled exceptions by default. You can make madExcept care about handled exceptions, too, by using this code:
Code: Select all
uses ..., madExcept;
procedure ShowHiddenExceptions(const exceptIntf: IMEException; var handled: boolean);
begin
handled := false;
end;
initialization
RegisterHiddenExceptionHandler(ShowHiddenExceptions, stDontSync);
end.
Re: XE8 64bit Windows and Invalid Pointer Exception Problem
Thanks but after some experimentation I found that it's a problem with our build script. When I compile from the IDE MadExcept gets the exception but when I run our build script using MSBuild it fails. We're running MadExceptPatch in the script so it must be the compiler settiings which I though were being pulled from the dproj but obviously something is missing.
Re: XE8 64bit Windows and Invalid Pointer Exception Problem
Ah, ok. You need *compiler* debug options turned on. Linker debug options can be turned off, except for the detailed map file.
Re: XE8 64bit Windows and Invalid Pointer Exception Problem
Update: Finally figured it out and it was my own fault. I had 2 directories of MadCollection, one older and the current, and my build script was using the MadExceptPatch from the version which wasn't 64 bit aware. I'm surprised it worked at all.
Thanks for the help.
Mitch Wolberg,
RockWare, Inc.
Thanks for the help.
Mitch Wolberg,
RockWare, Inc.