[Lazarus] Multilog exception tracing

Bogusław Brandys brandys at o2.pl
Tue Apr 14 18:10:22 CEST 2009


Hello General,

Tuesday, April 14, 2009, 3:16:13 PM, you wrote:

DC>   Fstr:=TFileStream.Create('data',fmOpenRead);
DC>   i:=0;
DC>   while i<Fstr.Size do
DC>   begin
DC>     b:=Fstr.ReadByte;
DC>     inc(i);
DC>    ............. Stuff ......................
DC>   end;
DC>   Fstr.Free;  <-- Exception raised here

DC> Do TFileStream objects not have to be freed?

Quite sure you are trashing the stack in the "....stuff...." part,
maybe an array access ? Pointers ? Do you have range checking enabled
?

In the other hand, use of a TFileStream to read byte by byte is
overkill.

-- 
Best regards,
 JoshyFun




More information about the Lazarus mailing list