Ticket #3031 (new defect)

Opened 3 years ago

Last modified 23 months ago

Attempt to read past EOF on AIG Windows VAT table

Reported by: grovduck Owned by: dmorissette
Priority: normal Milestone: 1.8.1
Component: GDAL_Raster Version: svn-trunk
Severity: minor Keywords: ReadRAT, EOF, AVC
Cc: matt.gregory@…, jason.roberts@…, neteler, maphew@…, eadam@…

Description

Using svn-trunk on Windows XP with ArcInfo? 9.3 grids. When I try to open grids, I receive this message:

ERROR 3: Attempt to read past EOF in D:/matt/vat_test/grid1/../info/../grid1/vat.adf

when it calls ReadRAT() in aigdataset.cpp. I've tested using two different grids, one with 1280 unique values with VALUE and COUNT fields and then a clip of the first with 398 unique values with VALUE and COUNT. Test 1 gives the error message, test 2 is fine.

As in ticket #2447, the attribute data actually reads in correctly, so this is more of an annoyance than a major issue.

Test grids are at:  ftp://ftp.fsl.orst.edu/pub/gregorym/vat_test.zip (53.4 MB)

Change History

Changed 3 years ago by rouault

  • keywords EOF, AVC added; EOF removed
  • owner changed from warmerdam to dmorissette

Assigning to Daniel. The error is issued by the AVC driver

Changed 3 years ago by neteler

See also trac #2447

Changed 3 years ago by rouault

  • cc matt.gregory@…, jason.roberts@…, neteler@… added

Daniel,

I've pushed in trunk (r17430) and branches/1.6 (r17431) a workaround to enable users to open those datasets that trigger the error with binding languages. Open() in swig/include/gdal.i checks that there is no failure returned by CPLGetLastErrorType() even if the dataset is not NULL. I've tried to look a bit at why the error was issued in the AVC driver but it didn't seem obvious how to fix that without knowledge of the format.

Changed 3 years ago by rouault

r17432 (trunk only) : differ opening of the RAT only when GetDefaultRat?() is called. Will improve performances and make less likely the error message of #3031

Changed 3 years ago by grovduck

Changed location of test grids to:  ftp://ftp.fsl.orst.edu/pub/gregorym/gdal/vat_test.zip

Changed 2 years ago by maphew

  • cc maphew@… added

I get this same error on 2 AIG datasets from a set of 60. They were generated by Arcinfo Workstation (GRID) but at different times (2006 and 2007) and perhaps different versions, in the 9.x range though.

Dataset at  ftp://ftp.geomaticsyukon.ca/users/matt/AIG_read_past_EOF.7z 25mb.

>gdalinfo --version
GDAL 1.7.0dev, released 2008/11/26

>for /d %a in (dem_105e dem_105d dem_105o) do gdal_translate %a gdalout\%a.tif

>gdal_translate dem_105e gdalout\dem_105e.tif
Input file size is 3701, 3857
0...10...20...30...40...50...60...70...80...90...100 - done.

>gdal_translate dem_105d gdalout\dem_105d.tif
Input file size is 3817, 3858
0ERROR 3: Attempt to read past EOF in dem_105d/../info/arc.dir.
ERROR 4: Failed to open table dem_105d.VAT
...10...20...30...40...50...60...70...80...90...100 - done.

>gdal_translate dem_105o gdalout\dem_105o.tif
Input file size is 3410, 3804
0ERROR 3: Attempt to read past EOF in dem_105o/../info/../dem_105o/vat.adf.
...10...20...30...40...50...60...70...80...90...100 - done.

Changed 2 years ago by EliL

  • cc eadam@… added

Changed 23 months ago by neteler

  • cc neteler added; neteler@… removed
  • milestone set to 1.7.1

The problem is still there in GDAL 1.7.svn (using a 64bit Linux box):

gdalinfo $INPUT/dsm000038/                                                                   
Driver: AIG/Arc/Info Binary Grid
Files: /geodata/public/pat_DTM_DSM_LIDAR_2009_UTM_WGS84_dati_grezzi/DSM_BUFF_GRD/dsm_orto_grd1/dsm000038/
       /geodata/public/pat_DTM_DSM_LIDAR_2009_UTM_WGS84_dati_grezzi/DSM_BUFF_GRD/dsm_orto_grd1/dsm000038/w001001x.adf
       /geodata/public/pat_DTM_DSM_LIDAR_2009_UTM_WGS84_dati_grezzi/DSM_BUFF_GRD/dsm_orto_grd1/dsm000038/sta.adf
       /geodata/public/pat_DTM_DSM_LIDAR_2009_UTM_WGS84_dati_grezzi/DSM_BUFF_GRD/dsm_orto_grd1/dsm000038/w001001.adf
       /geodata/public/pat_DTM_DSM_LIDAR_2009_UTM_WGS84_dati_grezzi/DSM_BUFF_GRD/dsm_orto_grd1/dsm000038/log
       /geodata/public/pat_DTM_DSM_LIDAR_2009_UTM_WGS84_dati_grezzi/DSM_BUFF_GRD/dsm_orto_grd1/dsm000038/dblbnd.adf
       /geodata/public/pat_DTM_DSM_LIDAR_2009_UTM_WGS84_dati_grezzi/DSM_BUFF_GRD/dsm_orto_grd1/dsm000038/hdr.adf
Size is 2020, 2020
Coordinate System is `'
Origin = (713990.000000000000000,5152010.000000000000000)
Pixel Size = (1.000000000000000,-1.000000000000000)
Corner Coordinates:
Upper Left  (  713990.000, 5152010.000)
Lower Left  (  713990.000, 5149990.000)
Upper Right (  716010.000, 5152010.000)
Lower Right (  716010.000, 5149990.000)
Center      (  715000.000, 5151000.000)
Band 1 Block=505x4 Type=Float32, ColorInterp=Undefined
  Min=1730.546 Max=2535.939
  NoData Value=-3.4028234663852886e+38
ERROR 3: Attempt to read past EOF in /geodata/public/pat_DTM_DSM_LIDAR_2009_UTM_WGS84_dati_grezzi/DSM_BUFF_GRD/dsm_orto_grd1/dsm000038//../info/arc.dir.
ERROR 4: Failed to open table .VAT

I wonder if it is harmless or harmful.

Note: See TracTickets for help on using tickets.