Serious FpOleBasic.pas error/bug (Fatal: Internal error 200305057)
Original Reporter info from Mantis: JD
-
Reporter name:
Original Reporter info from Mantis: JD
- Reporter name:
Description:
Hi there everyone,
For some time now, about 25% of the time, whenever I compile one of my projects that uses FpSpreadsheet I get the error below and compilation fails
FpSpreadsheet\fpolebasic.pas(65,3) Fatal: Internal error 200305057
The error occurs on the line in bold below:
AOLEDocument.Stream.Position:=0; //Ensures it is in the begining.
The procedure that causes the problem WriteOLEFile is as shown below:
procedure TOLEStorage.WriteOLEFile(AFileName: string;
AOLEDocument: TOLEDocument; const AOverwriteExisting: Boolean;
const AStreamName: UTF8String);
var
RealFile: TFileStream;
fsOLE: TVirtualLayer_OLE;
OLEStream: TStream;
VLAbsolutePath: UTF8String;
begin
VLAbsolutePath:='/'+AStreamName; //Virtual layer always use absolute paths.
if not AOverwriteExisting and FileExists(AFileName) then begin
Raise EStreamError.Createfmt('File already exists "%s"',[AFileName]);
end;
RealFile:=TFileStream.Create(AFileName,fmCreate);
fsOLE:=TVirtualLayer_OLE.Create(RealFile);
fsOLE.Format(); //Initialize and format the OLE container.
OLEStream:=fsOLE.CreateStream(VLAbsolutePath,fmCreate);
AOLEDocument.Stream.Position:=0; //Ensures it is in the begining.
OLEStream.CopyFrom(AOLEDocument.Stream,AOLEDocument.Stream.Size);
OLEStream.Free;
fsOLE.Free;
RealFile.Free;
end;
I'm using Lazarus 1.1 svn 37469 Win32/FPC 2.6.0 on Windows Vista.
Thanks,
JD
Mantis conversion info:
- Mantis ID: 22370
- Version: 1.1 (SVN)
- Fixed in revision: 2475 (#a7893f3b)