| Anonymous | Login | Signup for a new account | 2013-05-22 09:53 CEST | ![]() |
| All Projects | FPC | Lazarus: Packages, Patches | Lazarus CCR | Mantis | fpGUI | fpcprojects: fpprofiler |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0022370 | FPC | LCL | public | 2012-07-05 00:58 | 2012-09-13 15:48 | ||||
| Reporter | JD | ||||||||
| Assigned To | Felipe Monteiro de Carvalho | ||||||||
| Priority | normal | Severity | major | Reproducibility | sometimes | ||||
| Status | resolved | Resolution | fixed | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | Product Build | ||||||||
| Target Version | Fixed in Version | ||||||||
| Summary | 0022370: Serious FpOleBasic.pas error/bug (Fatal: Internal error 200305057) | ||||||||
| 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 | ||||||||
| Tags | No tags attached. | ||||||||
| FPCOldBugId | |||||||||
| Fixed in Revision | 2475 | ||||||||
| Attached Files | |||||||||
Relationships |
||||||
|
||||||
Notes |
|
|
(0060864) José Mejuto (reporter) 2012-07-05 12:41 |
This is a compiler error, but I was unable to generate a new synthetic sample code that shows the error. You can solve the problem locally simple by declaring a new variable like "tmpStream: TStream" and using it as a temporal holder for AOLEDocument.Stream. Something like: var [...] tmpStream: TStream; begin [...] tmpStream:=AOLEDocument.Stream; tmpStream.Position:=0; //Ensures it is in the begining. [...] end; |
|
(0060866) JD (reporter) 2012-07-05 15:27 |
@José Mejuto I got the same problem with the 2.6.1 compiler. But after making the changes you suggested, it worked. Muchos gracias! |
|
(0060867) Felipe Monteiro de Carvalho (developer) 2012-07-05 15:35 |
I commited the proposed workaround in rev 2475, but I didn't have this internal error with my FPC 2.6.0 in Windows 7 (but didn't test so many times either) |
|
(0060868) Marco van de Voort (manager) 2012-07-05 16:27 edited on: 2012-07-05 16:27 |
See also http://www.lazarus.freepascal.org/index.php/topic,17446.0/topicseen.html [^] and 0021914 |
|
(0062330) Jonas Maebe (manager) 2012-09-13 15:48 |
In the future, please don't resolve compiler bugs (internal errors are always compiler bugs) when you implement a workaround in a third party package. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-07-05 00:58 | JD | New Issue | |
| 2012-07-05 00:58 | JD | Widgetset | => Win32/Win64 |
| 2012-07-05 01:42 | Maxim Ganetsky | Project | Lazarus => FPC |
| 2012-07-05 12:41 | José Mejuto | Note Added: 0060864 | |
| 2012-07-05 15:27 | JD | Note Added: 0060866 | |
| 2012-07-05 15:35 | Felipe Monteiro de Carvalho | Status | new => assigned |
| 2012-07-05 15:35 | Felipe Monteiro de Carvalho | Assigned To | => Felipe Monteiro de Carvalho |
| 2012-07-05 15:35 | Felipe Monteiro de Carvalho | Fixed in Revision | => 2475 |
| 2012-07-05 15:35 | Felipe Monteiro de Carvalho | Status | assigned => resolved |
| 2012-07-05 15:35 | Felipe Monteiro de Carvalho | Resolution | open => fixed |
| 2012-07-05 15:35 | Felipe Monteiro de Carvalho | Note Added: 0060867 | |
| 2012-07-05 16:27 | Marco van de Voort | Note Added: 0060868 | |
| 2012-07-05 16:27 | Marco van de Voort | Note Edited: 0060868 | |
| 2012-07-05 16:27 | Marco van de Voort | Note Edited: 0060868 | |
| 2012-09-13 14:12 | Jonas Maebe | Relationship added | related to 0022869 |
| 2012-09-13 15:48 | Jonas Maebe | Note Added: 0062330 | |
| Main | My View | View Issues | Change Log | Roadmap |



