mad file creation

delphi package - automated exception handling
Post Reply
ciuly
Posts: 65
Joined: Mon Apr 30, 2007 1:16 pm
Location: Romania

mad file creation

Post by ciuly »

(on Delphi XE2)
It's been a while since I last used this feature. I have a customer using v4 and he doesn't want to include the map file for security reasons and hence I get nothing in the stacktraces. From what I recall, the only change needed to disable function names, line number and such and still get a stacktrace usable with the compile tool, was to uncheck the "link in function names and line numbers". But there is no mad file generated if I do that Unchecking all 3 there, still doesn't produce a mad file.
was this removed in v4? pr am I doing it wrong?
I do have a semi-cpmplex build configuration set up on the project, like so:

Code: Select all

base
- opset files
- release
- opset fiels
-- release1
-- optset file
--release 2
-- optset file
-debug
..etc
from what I recall, some options in the madexcept config actually change stuff on the project, but I didn't see anything change on the active configuration while toying with these 3 settings, but then again maybe I wasn't looking where needed.

One other thing. once we fix this, I'd like to keep my debug builds with the proper full map file so I don't have to run the compile tool every time during development and testing of debug builds. My current idea is to have a pre-build script modify the mes file, then a post-script modify it back.
Do you happen to have a better idea how to achieve this?

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

Re: mad file creation

Post by madshi »

The mad file *should* be created. Please create an empty file "madExceptWizard.txt" on your desktop, then compile, then upload the log file for me to look at.

As long as the full map file is stlil in the same folder as your exe file, madExcept will produce full callstacks. So you don't have to change the mes file for the debug build, as long as you start the exe in the folder where it was compiled to.
ciuly
Posts: 65
Joined: Mon Apr 30, 2007 1:16 pm
Location: Romania

Re: mad file creation

Post by ciuly »

my bad :oops:
I made a simple test app, to simplify things and there it went ok. So I compared the 2 madExceptWizard.txt for the test app, (which worked) and for my project, (which didn't), and noticed the "map file already appended" message in the latter. Then it hit me: my build event post-build is currently calling madExceptPatch for the debug builds (on which I was testing this). Commenting that out, made the mad file appear as it should.

Interesting suggestion with map file presence. I know I had trouble with this kind of setting a good while back on 2.x or 3.x
After a bunch of tests, to note is that you need to delete both map and mad files to not have full stacktraces, but I don't know who would want that on their dev machine, other than verifying that indeed the stacktraces are what they're supposed to be

one more thing. I log stracktraces to file (via StackTrace function). any chance of getting the 3 mad CRC's or whatever they are that appear in the bugreport, from, code? and if so, any chance of getting the log file compiled by madCompileBugReport.exe? or is it stuck on the bugreport file format?

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

Re: mad file creation

Post by madshi »

You mean the CRCs for the mad file? You can get those from the StackTrace function, see "pMinDebugInfos" parameter, IIRC.

The madCompileBugReport tool does expect a full bug report header. You can have a look at it yourself, see madCompileBugReport.dpr in the madExcept "Sources" directory.
Post Reply