Opened 16 years ago

Closed 16 years ago

#2155 closed defect (invalid)

Segmentation fault in OGRGeometry::dumpReadable() Version 1.5

Reported by: roman Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version: 1.5.0
Severity: normal Keywords:
Cc:

Description

Hallo,

I have found a segfault in OGRGeometry::dumpReadable (), when I try to read shape files with the example code from http://www.gdal.org/ogr/ogr_apitut.html.

The shape files, seems to be valid, since I can use them with other tools (QGIS).

I get the following stack trace

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208625472 (LWP 30436)]
0x0078b837 in vfprintf () from /lib/libc.so.6
#0  0x0078b837 in vfprintf () from /lib/libc.so.6
#1  0x007946a6 in fprintf () from /lib/libc.so.6
#2  0x0472c8f6 in OGRGeometry::dumpReadable () from /usr/lib/libgdal.so.1
#3  0x080489f9 in main () at test.cpp:49
Line 48: poGeometry = poFeature->GetGeometryRef();
Line 49:         if( poGeometry != NULL 
Line 50:             && wkbFlatten(poGeometry->getGeometryType()) == wkbPoint )

Thanks

Roman

Change History (3)

comment:1 by roman, 16 years ago

Version: unspecified1.5.0

comment:2 by warmerdam, 16 years ago

Component: defaultOGR_SF

Roman,

I'm afraid this isn't enough for me to go on. I'll need the specific shapefile, and the specific code to pursue this. You might want to try "ogrinfo -ro -al <your>.shp" to see if ogrinfo is able to do DumpReadable() successfully on the file.

comment:3 by roman, 16 years ago

Resolution: invalid
Status: newclosed

Hallo,

I have found the problem. I have different GDAL library versions in /usr/lib and /usr/local/lib. Ogrinfor works fine with /usr/local/lib, but my program segfaults with the version in /usr/lib.

Can you add a ‘--version’ to ogrinfo please, that shows something like ‘GDAL ogrinfo version 1.5.0’.

Thanks

Roman

Note: See TracTickets for help on using tickets.