id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 2192,[PATCH] Detect I/O read errors in RawRasterBand,Even Rouault,warmerdam,"I'm attaching a patch that reports I/O errors detected in RawRasterBand::AccessLine, when the dataset is accessed in read only mode. Currently no error is reported. This tries to address the following comment in the current code : {{{ // for now I just set to zero under the assumption we might // be trying to read from a file past the data that has // actually been written out. Eventually we should differentiate // between newly created datasets, and existing datasets. Existing // datasets should generate an error in this case. }}} The patch also includes missing ""poDS->eAccess = poOpenInfo->eAccess"" in a few drivers using RawRasterBand. However, with this patch, the autotest suite fails in a few places. By looking at the files, I can see that the data files seem to be truncated to a few bytes. Extract from errors found when running autotest : {{{ Running tests from gdrivers/ers.py TEST: ers_1 ... ERROR 3: Failed to read scanline 5. Running tests from gdrivers/fast.py TEST: fast_2 ... ERROR 3: Failed to read scanline 100. TEST: fast_5 ... ERROR 3: Failed to read scanline 100. Running tests from gdrivers/envi.py TEST: envi_1 ... ERROR 3: Failed to read scanline 0. TEST: envi_2 ... ERROR 3: Failed to read scanline 0. Running tests from gdrivers/genbin.py TEST: genbin_1 ... ERROR 3: Failed to read scanline 0. }}} ",enhancement,closed,normal,1.6.0,GDAL_Raster,unspecified,normal,fixed,rawrasterband,