Opened 10 years ago

Closed 7 years ago

Last modified 6 years ago

#4203 closed defect (fixed)

Error in fread() reading object from shp file

Reported by: zanollim Owned by: warmerdam
Priority: normal Milestone: 2.0.0
Component: OGR_SF Version: 1.8.1
Severity: normal Keywords: Shapefile
Cc:

Description

See the attached shapefile. There is a problem with the geometry of the last feature.

Try to extract the zip file in a folder and

ogrinfo /your/folder -sql "SELECT * FROM poly"

You can see this error for the last feature:

ERROR 1: Error in fread() reading object of size 276 from .shp file

NOTE: If I open this shapefile with ESRI ArcMap? there is no problem.

Where is the problem? Is the shapefile corrupted? Is a problem of the ogr library?

Thanks in advance,

michele

Attachments (1)

poly.zip (18.1 KB) - added by zanollim 10 years ago.

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by zanollim

Attachment: poly.zip added

comment:1 Changed 10 years ago by warmerdam

Status: newassigned

The last .shx entry references an object of 268 bytes at offset 28248 (plus 8 bytes of header info) so it does appear to extend past the end of the .shp file which is only 28480 bytes long. I suspect the object header in the .shp file references a shorter length for the actual object but I don't have time this morning to confirm this. I'll dig more later.

comment:2 Changed 10 years ago by warmerdam

Keywords: Shapefile added

comment:3 Changed 7 years ago by Jukka Rahkonen

Milestone: 2.0
Resolution: fixed
Status: assignedclosed

Cuplicate to a fixed issue #5608 http://trac.osgeo.org/gdal/ticket/5608

Summary: Caused by a bug that was present in shapelib till version 1.2.7 http://shapelib.maptools.org/release.html

comment:4 Changed 6 years ago by Even Rouault

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.