[postgis-users] shp2pgsql segfault and gdb

Jorg Heymans jh at domek.be
Mon Aug 29 02:13:55 PDT 2005


Hi,

shp2pgsql segfaults on several of our shapefiles.

Here is a backtrace from gdb :

MULTILINESTRING 1739 as 1 vertices, set to NULL
MULTILINESTRING 1784 as 1 vertices, set to NULL

Program received signal SIGSEGV, Segmentation fault.
0x4008f6e5 in mallopt () from /lib/libc.so.6
(gdb) backtrace
#0  0x4008f6e5 in mallopt () from /lib/libc.so.6
#1  0x4008f0b3 in calloc () from /lib/libc.so.6
#2  0x0804b5d5 in SHPReadObject (psSHP=0x8054050, hEntity=1786) at
shpopen.c:1376
#3  0x0804ecaf in LoadData () at shp2pgsql.c:631
#4  0x0804e781 in main (ARGC=7, ARGV=0x2) at shp2pgsql.c:408


I remember someone posting a tutorial here on how to use gdb to pinpoint
exactly where a program segfaults but i couldn't find it anymore.

It would help if i could get the exact record number from gdb where it
fails, is this possible?

Regards
Jorg



More information about the postgis-users mailing list