Page 1 of 1

Problem with madExceptPatch

Posted: Wed Aug 17, 2016 12:35 am
by slemmnord
Hello Mathias!

I ran into a problem with command-line compilation. I would say it's a bug in how madExceptPatch handles relative paths.

I have the following setup:
The project dpr and mes files are in folder c:\project\source.
The output files go to c:\project\output.
The current directory is set to C:\project.

After compiling the project, the build utility runs madExceptPatch with following command:
tools\madExceptPatch output\project.exe source\project.mes output\project.map

and madExceptPatch returns with exitcode 0 and outputs the following normal messages:
Binary patched.
map file appended

However.... the exe is somehow not correctly patched as the exception dialogs are normal VCL dialogs instead of the custom ones i display via madExcept global handler. If i run the patch again it will complain that exe already has map appended so something was indeed done.

Now, if i replace the command line with absolute paths such as:
tools\madExceptPatch output\project.exe c:\project\source\project.mes output\project.map

...then i again get exit code 0, the same messages and the end result is correct and madExcept handles exceptions.

It seems that relative path for .mes file is somehow confusing madExceptPatch but it still patches the file (with some wrong default settings?).

I think if mes file is implicitly passed on command line and madExceptPatch fails to open/use it then it should return error code.

I'm still using older version -- dated 30.03.2015 - have you made any relevant changes that would warrant retesting with newer version?

Regards,
me :)

Re: Problem with madExceptPatch

Posted: Wed Aug 17, 2016 6:45 am
by madshi
Yes, I did make changes at some point, so testing with the latest build would make sense.

Re: Problem with madExceptPatch

Posted: Wed Aug 17, 2016 11:40 am
by slemmnord
This is indeed already fixed in the current version. Thanks.