Ticket #3076 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

RasterIO reporting corrupt blocks on AIG datasets

Reported by: grovduck Owned by: rouault
Priority: normal Milestone: 1.7.0
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: AIG RasterIO IReadBlock corrupt
Cc:

Description

When I do a simple RasterIO read over various ArcInfo? grids (using the AIG driver), I am getting sporadic "Corrupt block" errors from line 636 in gridlib.c (r17432) on grids that I think should be fine. This relevant chunk of code in gridlib.c is this:

/* The 4 is to be safe... In theory for a very small block (2x2 or 
 less), and nMinSize < 4, nDataSize could be smaller... */ 

if (nDataSize <  2 + 4) {
  CPLError( CE_Failure, CPLE_AppDefined, "Corrupt block");
  CPLFree( pabyRaw );
  return CE_Failure;
}

I'm erroring out with nDataSize of 4. I've posted a sample dataset which gives this error at:

 ftp://ftp.fsl.orst.edu/pub/gregorym/gdal/corrupt.zip (~108 MB)

Change History

Changed 4 years ago by rouault

  • owner changed from warmerdam to rouault
  • status changed from new to assigned

Changed 4 years ago by rouault

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in r17435. Works fine with corrupt.zip and also tested by hacking with an hexadecimal editor the abc3x1 in autotest/gdrivers/data to test small block sizes

Note: See TracTickets for help on using tickets.