View Issue Details

IDProjectCategoryView StatusLast Update
0038734FPCFCLpublic2021-04-17 16:31
ReporterAndrea Mauri Assigned ToMarco van de Voort  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformFPC 3.2.0 on Win64OSWindows 
Product Version3.2.0 
Summary0038734: TStreamReader (streamex unit) issue
DescriptionTStreamReader.ReadLine seems to fail under specific circumstances.
I created a test to easily reproduce the problem.
The test makes use of a TStream that behaves in a weird, but formally correct way. I created it based on a real experience with the StdIn that I was able to reproduce thanks to pre-existing logging.

I believe the bug can be fixed by updating VPByte right after FillBuffer is called:

      [...]
      FillBuffer;
      VPByte := @FBuffer[FBufferPosition]; //bugfix
      VPosition := FBufferPosition;
      [...]

Additional InformationTested with Lazarus 2.0.10 FPC 3.2.0 on Win64
TagsNo tags attached.
Fixed in Revision49219
FPCOldBugId
FPCTarget-
Attached Files

Activities

Andrea Mauri

2021-04-09 13:57

reporter  

test_project.zip (131,485 bytes)

Marco van de Voort

2021-04-09 22:38

manager   ~0130211

note that there are two fillbuffers in that method

Andrea Mauri

2021-04-12 12:03

reporter   ~0130305

I was referring to the first FillBuffer, the one inside the repeat/until

Marco van de Voort

2021-04-17 16:31

manager   ~0130429

Committed the fix.

Issue History

Date Modified Username Field Change
2021-04-09 13:57 Andrea Mauri New Issue
2021-04-09 13:57 Andrea Mauri File Added: test_project.zip
2021-04-09 14:54 Michael Van Canneyt Assigned To => Michael Van Canneyt
2021-04-09 14:54 Michael Van Canneyt Status new => assigned
2021-04-09 22:38 Marco van de Voort Note Added: 0130211
2021-04-12 12:03 Andrea Mauri Note Added: 0130305
2021-04-17 16:30 Marco van de Voort Description Updated View Revisions
2021-04-17 16:30 Marco van de Voort Fixed in Revision => 49219
2021-04-17 16:30 Marco van de Voort FPCTarget => -
2021-04-17 16:31 Marco van de Voort Assigned To Michael Van Canneyt => Marco van de Voort
2021-04-17 16:31 Marco van de Voort Status assigned => resolved
2021-04-17 16:31 Marco van de Voort Resolution open => fixed
2021-04-17 16:31 Marco van de Voort Note Added: 0130429