[Fdo-trac] [fdo-trac] #859: Shape provider: crash reading rows

FDO trac_fdo at osgeo.org
Fri Dec 21 07:29:48 PST 2012


#859: Shape provider: crash reading rows
--------------------------------+-------------------------------------------
   Reporter:  romicadascalescu  |       Owner:  romicadascalescu
       Type:  defect            |      Status:  new             
   Priority:  major             |   Milestone:  3.8.0           
  Component:  SHP Provider      |     Version:  3.8.0           
   Severity:  3                 |    Keywords:                  
External_id:                    |  
--------------------------------+-------------------------------------------
 Fixed a crash reading rows in a: SHP record mismatch?
  A SHP file has the information inside organized like below:
  - Header  (100 bytes)
  (Rec Number) (Length of Shape)
  (Rec Number) (Length of Shape)
  .....

 So normally we can read record by record from the file. The problem show
 up when
 we have gaps between records.

 And that's the problem with this file:
  - Header  (100 bytes)
  (Rec Number) (Length of Shape)
  (-1) (unused space)
  (Rec Number) (Length of Shape)
  .....

 Now this file had -1 however other files could have any random value.
 Also the provider when we read one record we read more records at a time
 (it's a
 cache mechanism) of max 50 records.
 The cache mechanism could not be resynchronized in case of gaps mainly
 because
 to resynchronize it needed information from the spatial index file (SHX).
 To fix this issue make SHP cache mechanism to use SHX data to move ensure
 we
 read from the right positions the records cached if possible.

-- 
Ticket URL: <http://trac.osgeo.org/fdo/ticket/859>
FDO <http://fdo.osgeo.org/>
Feature Data Objects


More information about the fdo-trac mailing list