Image reader "File operation failed" for large raw files
Reading a raw file using the 'Image Reader' seems to fail for files larger than 2^30 cells in Paraview v5.12.0-RC3.
Steps to repoduce:
- Unpack the attached 7z file, this is a 3D raw file of 32-bit floats with dimensions 2048 x 2048 x 256. Each x-y slice holds a single value of the z index (i.e. the first x-y slice is all 0, second 1 etc.).
- Drag and drop into Paraview and pick 'Image Reader'.
- Settings as below:
- Error:
Generic Warning: In vtkImageReader.cxx, line 275
File operation failed. row = 0, Tried to Read = 8192, Read = 0, Skip0 = 0, Skip1 = 0, FilePos = -1
Changing the z-extent to 63 (i.e. 63 rather than 255) works and reads in the first 63 layers. Changing to 64 triggers the error message.
I thought this may be to do with a file pointer storing the offset byte in a signed integer (i.e. an overflow at 2^31), but this seems to also fail for other data types, e.g. the attached unsigned char raw file with dimensions 2048 x 2048 x 256 also fails to read after layer 63. The only thing in common seems to be they fail after reading 2^30 cells.