Access violation was because of a memory overwrite. TStream.Read doesn't have a TBytes overload in FPC, so the stack was overwritten instead of the array's content.