THook.Disable exception

delphi package - automated exception handling
Post Reply
Posts: 3
Joined: Mon Feb 20, 2012 11:03 pm

THook.Disable exception

Post by peterj »


We are getting a THook.Disable bug reported from Madexcept


We use MadExcept 5.1 , Delphi 10.2 and our app is compiled to 64 bit. We also use gnugettext ... ettext.pas

It is happening on LoadLibrary, which works 99% of the time, so i don't think it is actually a problem with the dll, also this same error happens with other dlls in the program seemingly at random.

I know gnugettext.pas uses THook to do the translation.

Is it possible the THook could be conflicting with madexcept Hooking ?

Or any ideas what else could cause this exception.

gnugettext uses this code initialisation

Code: Select all

  // replace Borlands LoadResString with gettext enabled version:
  HookLoadResString:=THook.Create (@system.LoadResString, @LoadResStringA);
  HookLoadStr:=THook.Create (@sysutils.LoadStr, @SysUtilsLoadStr);
  HookFmtLoadStr:=THook.Create (@sysutils.FmtLoadStr, @SysUtilsFmtLoadStr);
  HookIntoResourceStrings (AutoCreateHooks,false);
Site Admin
Posts: 10665
Joined: Sun Mar 21, 2004 5:25 pm

Re: THook.Disable exception

Post by madshi »

There's no hint I can see here that would point to madExcept being at fault.

If you have the source code of gnugettext, I guess you could try debugging it to find the cause of the issue.

Not sure what else to do/say. This looks like a normal madExcept crash report to me. From what I can see, madExcept did its job on reporting the crash location and the callstack. The rest is your job... :wink:
Post Reply