how exactly to read the call stack from the report

delphi package - automated exception handling
Post Reply
emailaya
Posts: 249
Joined: Thu Oct 13, 2005 11:33 am
Contact:

how exactly to read the call stack from the report

Post by emailaya »

hi

today i got the first error report using madexcept
i must say this error was the main reason for looking for an errors manager (not only bugs)

the error is: invalid filename

so now i got the call stack and its last line says:
005e9b8c +1d0 application.exe Main 428 +15 TfrmMain.SaveTitles
which means the error was in SaveTitles proc.
but what line exactly? what does "+15" means?
line 428 has: writeln(f,sometext);
but before that line there are lots of code related to the file
like assignfile and rewrite and some more
so if the file was invalid, i think the exception should have been before
this exact line

i must add that the second line in the call stack is:
005f04c1 +0f1 application.exe Main 1541 +12 TfrmMain.FormCloseQuery
so apparently line 1541 calls to SaveTitles procedure
but its not correct, the call is made in line 1545
and again the question asked, what does the "+12" means?

any ideas?
(the error happens only on a certain computer so i cant really reproduce it on my computer)

thanks
madshi
Site Admin
Posts: 10766
Joined: Sun Mar 21, 2004 5:25 pm

Re: how exactly to read the call stack from the report

Post by madshi »

Hello,
emailaya wrote:the error is: invalid filename

so now i got the call stack and its last line says:
005e9b8c +1d0 application.exe Main 428 +15 TfrmMain.SaveTitles
which means the error was in SaveTitles proc.
but what line exactly? what does "+15" means?
line 428 has: writeln(f,sometext);
but before that line there are lots of code related to the file
like assignfile and rewrite and some more
so if the file was invalid, i think the exception should have been before
this exact line
428 should be the correct line. "+15" is the offset to the beginning of the procedure.
emailaya wrote:i must add that the second line in the call stack is:
005f04c1 +0f1 application.exe Main 1541 +12 TfrmMain.FormCloseQuery
so apparently line 1541 calls to SaveTitles procedure
but its not correct, the call is made in line 1545
and again the question asked, what does the "+12" means?
Again 1541 should be the correct line, while +12 is the offset to the beginning of the procedure.

It's strange, that madExcept seems to be 4 lines off. Normally it's absolutely correct! Can you give me some more information about your development settings/environment? Are you using madExcept 2 or 3? Which Delphi version are you using? Are you compiling in the IDE or via automated (batch) compiling? Can you please post the content of your application.mes file?
emailaya
Posts: 249
Joined: Thu Oct 13, 2005 11:33 am
Contact:

Post by emailaya »

hi there

eventually the problem WAS an invalid filename
and i also found the reason and solved it

i must say that using your report.txt viewer helped me allot

im using madexcept3 with delphi 7
im compiling with the ide
i dont have the project.mes file here i will post it tomorrow when i have it

it seems for now, there is an offset problem in the callstack but since its a constant (4), it still helps allot - i already found 2 problems when users sent me a bug report

thanks allot
madshi
Site Admin
Posts: 10766
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

This offset is really *VERY* strange. I've never had such an offset in my own bug reports I'm regularly receiving, and I've also never heard of any customers who had such a problem.

There are some possibilities where this offset could come from:

(1) Either madExcept was using outdated map file information. That'd be possible only if you shipped an external "application.tds" or "application.map" file with your executable file.

(2) Or there's something strange in your source code, which confuses either madExcept or Delphi or both.

(3) Or there's a bug in madExcept which nobody noticed yet.

Do you have any *.inc files in the PAS which has the line offset? Can you reproduce the problem in a little test project? If you can reproduce it in a little test project, please send that to me, so I can fix the problem. Thanks!
emailaya
Posts: 249
Joined: Thu Oct 13, 2005 11:33 am
Contact:

Post by emailaya »

my users (i still dont have customers :) ) doesnt know about offsets
for them, they get a window with error report to send to me :)

1) i did noticed that a project.map file is produced but i always delete it from the project folder (.tds file i never saw), anyway, the users only get the .exe file alone with no other file

2) the only thing i can think off, is the WinUPack i use in order to shrink the exe - i guess this can be a cause of that problem

3) as for my experience (without connection to this specific problem): there is always another bug :)

4) i have an inc file, only for some icons i use inside my app, but no offset word there, mayb that inc file includes 4 lines, i will check it out later today

i also will test sth i cause myself (which i always do in order to check madexcept), and see if i get this offset myself

will let u know soon
emailaya
Posts: 249
Joined: Thu Oct 13, 2005 11:33 am
Contact:

Post by emailaya »

the res file includes 3 lines :)

here is the mes file
http://s61.yousendit.com/d.aspx?id=0WRF ... ACOT037D22
madshi
Site Admin
Posts: 10766
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

A res file shouldn't harm. An inc file might.
emailaya
Posts: 249
Joined: Thu Oct 13, 2005 11:33 am
Contact:

Post by emailaya »

anyway
as long as i found the source - its ok
and i did solve 2-3 problems only bcoz of madexcept
otherwise i wouldnt have found the source :)

thanks allot for that
and it worth the 300k extra of my exe
Post Reply