I have a little bug (an Exception EAccessViolation) when my application
closes.
To investigate it I tried to generate a linker MAP file, but I forgot
how to read that
Is there anywhere a tutorial/documentation about the MAP file format?
Thanks very much in advance..
Nicola
--
Nicola Farina - "video meliora proboque, deteriora sequor"
Info Line S.r.l.
Via Colorno 63/a
43100 Parma
ITALY
Tel +39-521-609811
Fax +39-521-606924
E-Mail: nicola...@info-line.it
WWW: www.info-line.it
Just a suggestion, check out the jedi component library. They have a unit
JclDebug which parses the map file and can give run-time stack traces.
http://sourceforge.net/projects/jcl/
Hope this helps you.
Charles
--
www.madshi.net
quality low level Delphi components
extended exception handling
API hooking, DLL injection
undocumented functionality
Exception EAccessViolation in module Timbra.exe at 00017319.
Access violation at address 00418581. Read of address 00D9F868
It happens randomly. One time I catched it during a debug session. I
have "break on exception" enabled.
When the exception happens, If I press F7 the execution doesn't stop
anywhere (even if I compiled the vcl with debug info).
The error must be in some point, I guess, in VCL or RTL not compiled
with debug info
madshi wrote:
--
But it could also be that you just used an object which was
already freed. Such a situation is much easier to track down.
For the beginning I recommend to use FreeAndNil,
whereever you free any objects. If you have an old Delphi
version, FreeAndNil ist something like this:
procedure FreeAndNil(var object: TObject);
var obj2 : TObject;
begin
obj2 := object;
object := nil;
obj2.Free;
end;
If after doing this the acception message sais "Read of
address 0000000", then you know that you accessed an
object which was already freed (or not created yet).
Perhaps (perhaps perhaps) an exception tracer could
help you. It depends on some conditions. If you want to
try, here's a download for my package "madExcept"
(it's free for non-commercial purpose):
http://www.madshi.net/madCollection.exe (D4-D6)
But if your exception is one of the wild ones (because of
overwritten memory), madExcept won't help much.
> The problem is: It might be that one hour ago some part
> of your code has overwritten important memory somewhere.
> And just now, one hour later, as a result of that your
> application crashes. If it is this way, you have a *major*
> problem, because it will be damn difficult to find the real
> bug.
>
> But it could also be that you just used an object which was
> already freed. Such a situation is much easier to track down.
>
Well, I strongly *hope* that my case be the latter .. -)
> For the beginning I recommend to use FreeAndNil,
> whereever you free any objects. If you have an old Delphi
> version, FreeAndNil ist something like this:
>
>
The app is written in D2 but I just finished the porting to D5.
I will try this approach
> Perhaps (perhaps perhaps) an exception tracer could
> help you. It depends on some conditions. If you want to
> try, here's a download for my package "madExcept"
> (it's free for non-commercial purpose):
>
> http://www.madshi.net/madCollection.exe (D4-D6)
>
I will give it a try, thank you very much..