madExceptPatch error code 5 ?

delphi package - automated exception handling
Post Reply
andrewc
Posts: 5
Joined: Mon Jun 28, 2004 9:25 am

madExceptPatch error code 5 ?

Post by andrewc »

What does madExceptPatch error code 5, patching of unit initialization order failed, actually mean and how can I fix it ?

When building my apps with Final Builder I sometimes get this error.

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

Post by madshi »

You get this "sometimes"? That's bad. Is there a way you can reproduce the problem? Are you using Delphi or BCB?

The error means just what it sais, namely that madExceptPatch tried to patch the order in which the units get initialized and failed to so do (for whatever reason).
andrewc
Posts: 5
Joined: Mon Jun 28, 2004 9:25 am

Post by andrewc »

Yes I can reproduce the problem, its Delphi. I have several large fairly complex apps and have two ways of building them.

By setting conditional compile options my query components are either inherited from TADOQuery using ADOExpress or TQuery for the BDE (patched to use Opus Direct Access). This gives two builds of the apps that either use ADO or DAO (needed for slow machines).

When I build in the Delphi IDE everything is fine either way.

When I build in Final Builder the ADO build is patched with madExceptPatch just fine but the DAO build always fails with error 5.

As an exception:
One of the apps always patches fine either way.
One of the apps always fails either way.

So this does not give us a firm cause either way does it ?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

But you have for all builds made sure that a detailed map file is created?

Could you please mail a non-patched exe to me together with the map file and the mes file (of course an exe which when being patched results in error 5)? So that I can manually call madExceptPatch here on my PC. Then I can probably find out what the problem is. I don't need to be able to execute the exe. I'll just try to patch it here and see what happens and why.

Thanks!
andrewc
Posts: 5
Joined: Mon Jun 28, 2004 9:25 am

Post by andrewc »

Sorry to trouble you. I realised the .map files were being left behind by Delphi and not recreated by Final Builder. This of course meant they were out of sync with different builds giving strange results.

I found an item in a news archive telling me to use -gd command line options so I added these in the Extra command line options box in Final Builder and now everything is fine. Interestingly it only generates the .map files, not .mes files.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

The mes files are created by the madExcept IDE settings dialog. "mes" stands for "(m)ad(E)xcept (s)ettings".
Post Reply