Weird AV:s at app shutdown on slight misuse of madExcept

delphi package - automated exception handling
Post Reply
tprami
Posts: 12
Joined: Tue Apr 11, 2017 5:03 am

Weird AV:s at app shutdown on slight misuse of madExcept

Post by tprami »

Hello,

Could someone test this with madExcept 5.0 version.

Try to give best details I can.

1. Debug version of app (Debug define and so on)
2. link madExcept to project but not from .dpr, add madExcept, madLinkDisAsm files to uses in main form etc
- So the IDE-integration will not patch exe-file
3. use app for a while and close it

we get super weird AV:s with guite odd callstacks, but I always suspected this was a problem, removed the linkin to the Debug version and all errors disappear.

Can anyone verify this with their APP/environment

If Author will read this would be nice some other patching detection than those two inits in .dpr file, maybe some external file beside dpr that could also control it. We would like to use single unit where all madExcept related uses clauses and code relies. (As currently) on our release version this is OK because we patch it from command line on Jenkins server after build.

-Tee-
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Weird AV:s at app shutdown on slight misuse of madExcept

Post by madshi »

I'm not sure I fully understand what you're trying to do. Are we talking about compiling in the IDE, or externall, or both? And do you have madExcept actually "enabled", or are you just adding some madExcept units to the "uses" clause without having madExcept actually enabled? Also, when using external compiling, do you run madExceptPatch.exe afterwards? And what is the reason why you don't want to have madExcept listed in the dpr's uses clause?
tprami
Posts: 12
Joined: Tue Apr 11, 2017 5:03 am

Re: Weird AV:s at app shutdown on slight misuse of madExcept

Post by tprami »

That is from IDE.

Try to clarify.

1. madExcept was linked in app from elsewhere than .drp file (For external patching this is OK)
2. madExcept can't (will not I think) patch due it does not find required units in .dpr file
3. Run the app and on shutdown there is quite random AVs

If I remove linking of madExcept (we control it with madExcept define) all problems go a way. I was just thinking that could someone check this out, is this common behavior. and/or bug in madExcept.

Also I suggest that there would be other way to enable patching from IDE, meaning that I could tell somehow to madExcept, go ahead and patch anyway, even though expected madExcept units are not present in .dpr-file

Hope this will clarify

-Tee-
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Re: Weird AV:s at app shutdown on slight misuse of madExcept

Post by madshi »

Do you have madExcept actually "enabled", or are you just adding some madExcept units to the "uses" clause without having madExcept actually enabled? And what is the reason why you don't want to have madExcept listed in the dpr's uses clause?
Post Reply