Opened 12 years ago

Closed 8 years ago

Last modified 8 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 12 years ago.

Download all attachments as: .zip

Change History (5)

by zanollim, 12 years ago

Attachment: poly.zip added

comment:1 by warmerdam, 12 years ago

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 by warmerdam, 12 years ago

Keywords: Shapefile added

comment:3 by Jukka Rahkonen, 8 years ago

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 by Even Rouault, 8 years ago

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.