Page 1 of 2

"Mapping binary file failed"

Posted: Wed Oct 02, 2013 8:16 pm
by Adrien
Hi,

I'm evaluating madExcept under Delphi XE4, 32 bit target. After having created a new VCL project, I enabled madExcept using the settings window. However, when I run the project, the following error message is displayed into the "messages" view :
[madExcept] Mapping binary file failed.
...and there is no madExcept dialog when an exception is raised by the compiled application.

Do I miss something ? Is it linked to this post : viewtopic.php?f=4&t=27600 ?

Thanks,

Adrien

Re: "Mapping binary file failed"

Posted: Wed Oct 02, 2013 9:38 pm
by madshi
Could you please try the very latest version which I've just released yesterday/today?

http://madshi.net/madCollection.exe (installer 2.7.7.0)

Does the same problem occur with this version?

Re: "Mapping binary file failed"

Posted: Wed Oct 02, 2013 10:52 pm
by Adrien
Hi !

Just downloaded and installed your new version. It seems to work perfectly now. Thank you very much !

Adrien

Re: "Mapping binary file failed"

Posted: Thu Oct 03, 2013 6:25 am
by madshi
Good to hear that! :D

Re: "Mapping binary file failed"

Posted: Fri Oct 18, 2013 12:06 am
by daniel z
We encountered the same problem on XE4 with madCollection 2.7.6.0.
When I upgraded to 2.7.7.0, the problem also went away.

I then uninstalled the madCollection installer, and simply installed the BPLs from 2.7.7.0 directly (which we do on all of our developer machines to allow us to manage 3rd party components more easily), I ended up with a similar error messages as before:

[madExcept] Starting external madExceptPatch tool failed.

From the message, it sounds like it doesn't know where to find madExceptPatch.exe. Can you tell me how the tool is found for patching at the end of the build process? I've tried copying madExceptPatch.exe into a folder in the windows Path, and adding back registry values to match what the installer does, but so far, haven't found the right combination. I've already verified that running madExceptPatch on the command line, using our .mes file and the map file, works properly.

Thanks,
Daniel

Re: "Mapping binary file failed"

Posted: Fri Oct 18, 2013 7:52 am
by madshi
Can you please update to 2.7.7.4 / madExcept 4.8.0.1?

http://madshi.net/madCollection.exe

Does the problem still occur with that version?

Re: "Mapping binary file failed"

Posted: Fri Oct 18, 2013 3:20 pm
by daniel z
Sorry, that was a typo - 2.7.7.4/4.8.0.1 is the version that I downloaded and tried yesterday.

Daniel

Re: "Mapping binary file failed"

Posted: Fri Oct 18, 2013 4:42 pm
by madshi
Ok, could you please do the following:

(1) Download http://madshi.net/HookProcessCreation.zip
(2) Start DllInjector and inject the 32bit hook dll. Leave the DllInjector GUI open.
(3) Compile your project in such a way that madExcept fails to patch your exe.

The "HookProcessCreation" download is in theory just a little demo which shows what my library "madCodeHook" can do. But in this case it will be useful to find out which exact command line madExcept called "madExceptPatch.exe" with. Once you've found out the command line, please start a command prompt window and try the same command line. What does madExceptPatch.exe report? Probably some sort of error?

When you've got the command line, you can uninject the 32bit hook dll and close the DllInjector and delete the HookProcessCreation demo folder.

Re: "Mapping binary file failed"

Posted: Fri Oct 18, 2013 6:37 pm
by daniel z
Great, thanks for your quick reply. This led us straight to where it's running from.

The command line was
"<folder_where_the_madExcept_BPLs_are_located>\..\tools\madExceptPatch.exe" <exe filename> <mes filename>

As soon as I created this folder, and dropped in madExceptPatch.exe, everything worked properly.

Is the tool just being sought in a folder relative to the BPL? ie "..\tools"? Or is there also a registry key or some other setting that can override this?

Thanks,
Daniel

Re: "Mapping binary file failed"

Posted: Sat Oct 19, 2013 12:20 am
by madshi
I'm not sure I understand. Have you moved the design time BPLs to a different folder? Or why would madExceptPatch.exe not be positioned in "..\tools\"? The installer should install the files with those relative paths, so unless you moved the files around manually, everything should work out fine. Obviously madExceptWizard_.bpl needs to be able to locate madExceptPatch.exe somehow in order to successfully start it.

Re: "Mapping binary file failed"

Posted: Sat Oct 19, 2013 6:48 pm
by daniel z
Yes, that's exactly right. For each of the many 3rd party component we use, we have scripts that move around and register BPLs directly, put files in system paths, add registry keys, etc, so that we don't have to run each component's installer and uninstaller every time we upgrade them or make modifications. It makes things far easier for us to manage on all of our developer machines.

Now that I know that madExceptpatch is required to be in <madExceptWizard_.bpl folder>\..\tools, I can make sure our environment gets set up correctly.

Thanks again,
Daniel

Re: "Mapping binary file failed"

Posted: Sat Oct 19, 2013 7:38 pm
by madshi
Ok. FWIW, you can use the installer parameter "/extractOnly".

Re: "Mapping binary file failed"

Posted: Fri Aug 01, 2014 7:51 pm
by flightrisk
I have the same issue, but I am wondering if it is the type of project I am creating. I created developed a set of ActiveX controls from a set of VCL controls. So the end result is an ActiveX which is a form of DLL. Can MadExcept work with this kind of project or only a VCL Forms application?

Re: "Mapping binary file failed"

Posted: Thu Aug 21, 2014 7:48 am
by madshi
It should generally work fine with an ActiveX control, too. Which madExcept version are you using? Make sure you're using the latest 4.0.10. Does the problem then still occur?

Re: "Mapping binary file failed"

Posted: Thu Oct 01, 2015 7:38 pm
by cesarliws
I'm getting this error with Delphi XE7 Enterprise, I downloaded the last version earlier and still getting the same error.

My question is, what is the cause of the error?
What can I configure in my project to avoid the error?

Regards,


Cesar