[fpc-pascal]TFileStream.Seek Bug in 1.1 ??

Judison jueca at brturbo.com
Thu Oct 31 03:16:18 CET 2002


Hi,

First excuse my poor english...

I downloaded the last version from CVS today (October 30) and then, after
install it, I can't compile my project, because of (I think) a bug in
TFileStream.Seek, there is a example of the error:

program test_stream;

uses Classes;

var
  Stream: TStream;
begin
  Stream := TFileStream.Create('test_stream.pas', fmOpenRead);
  WriteLn(Stream.Position);
  Stream.Free;
end.

$ ppc386 -S2 test_stream.pas
$ ./test_stream

And then I get a Access violation when I try to access Stream.Position or
Stream.Seek (GetPosition does a Seek)... In case o TFileStream (THandleStream)
is a FileSeek...

I will try to do a FileOpen and FileSeek, to see where is the error...
But tomorrow, now I go to sleep... :)
And I'm starting to think that I'm doing something wrong...

TIA
your friend,
Judison




More information about the fpc-pascal mailing list