"Mapping binary file failed"

delphi package - automated exception handling

"Mapping binary file failed"

Postby Adrien » Wed Oct 02, 2013 8:16 pm

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
Adrien
 
Posts: 2
Joined: Wed Oct 02, 2013 7:43 pm

Re: "Mapping binary file failed"

Postby madshi » Wed Oct 02, 2013 9:38 pm

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?
madshi
Site Admin
 
Posts: 9880
Joined: Sun Mar 21, 2004 5:25 pm

Re: "Mapping binary file failed"

Postby Adrien » Wed Oct 02, 2013 10:52 pm

Hi !

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

Adrien
Adrien
 
Posts: 2
Joined: Wed Oct 02, 2013 7:43 pm

Re: "Mapping binary file failed"

Postby madshi » Thu Oct 03, 2013 6:25 am

Good to hear that! :D
madshi
Site Admin
 
Posts: 9880
Joined: Sun Mar 21, 2004 5:25 pm

Re: "Mapping binary file failed"

Postby daniel z » Fri Oct 18, 2013 12:06 am

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
daniel z
 
Posts: 4
Joined: Thu Oct 17, 2013 11:46 pm

Re: "Mapping binary file failed"

Postby madshi » Fri Oct 18, 2013 7:52 am

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?
madshi
Site Admin
 
Posts: 9880
Joined: Sun Mar 21, 2004 5:25 pm

Re: "Mapping binary file failed"

Postby daniel z » Fri Oct 18, 2013 3:20 pm

Sorry, that was a typo - 2.7.7.4/4.8.0.1 is the version that I downloaded and tried yesterday.

Daniel
daniel z
 
Posts: 4
Joined: Thu Oct 17, 2013 11:46 pm

Re: "Mapping binary file failed"

Postby madshi » Fri Oct 18, 2013 4:42 pm

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.
madshi
Site Admin
 
Posts: 9880
Joined: Sun Mar 21, 2004 5:25 pm

Re: "Mapping binary file failed"

Postby daniel z » Fri Oct 18, 2013 6:37 pm

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
daniel z
 
Posts: 4
Joined: Thu Oct 17, 2013 11:46 pm

Re: "Mapping binary file failed"

Postby madshi » Sat Oct 19, 2013 12:20 am

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.
madshi
Site Admin
 
Posts: 9880
Joined: Sun Mar 21, 2004 5:25 pm

Re: "Mapping binary file failed"

Postby daniel z » Sat Oct 19, 2013 6:48 pm

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
daniel z
 
Posts: 4
Joined: Thu Oct 17, 2013 11:46 pm

Re: "Mapping binary file failed"

Postby madshi » Sat Oct 19, 2013 7:38 pm

Ok. FWIW, you can use the installer parameter "/extractOnly".
madshi
Site Admin
 
Posts: 9880
Joined: Sun Mar 21, 2004 5:25 pm

Re: "Mapping binary file failed"

Postby flightrisk » Fri Aug 01, 2014 7:51 pm

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?
flightrisk
 
Posts: 6
Joined: Mon Feb 28, 2011 11:12 pm

Re: "Mapping binary file failed"

Postby madshi » Thu Aug 21, 2014 7:48 am

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?
madshi
Site Admin
 
Posts: 9880
Joined: Sun Mar 21, 2004 5:25 pm

Re: "Mapping binary file failed"

Postby cesarliws » Thu Oct 01, 2015 7:38 pm

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
cesarliws
 
Posts: 1
Joined: Wed Jan 14, 2015 11:38 am

Next

Return to madExcept

Who is online

Users browsing this forum: No registered users and 3 guests