[gdal-dev] corrupt block on AIG dataset

Gregory, Matthew matt.gregory at oregonstate.edu
Thu Jul 23 17:19:06 EDT 2009


Hi all,

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 won't even pretend to
understand the intracacies of the driver, but I'm getting this error on
many grids, all of which I believe are fine.  I will file a ticket and
post sample data if desired.

thanks, matt


More information about the gdal-dev mailing list