[Gdal-dev] LOCALE dependent segfault in OGR

Markus Neteler neteler at itc.it
Wed Nov 22 10:54:54 EST 2006


Hi,

after a new installation of Mandriva 2007 I found some fancy bug (or whatever),
apparently related to the LOCALE:

1. DE LOCALE:

GRASS 6.3.cvs (eu_laea):~/data/vmap0_europe_shape > v.in.ogr europe_countries_LAEA.shp out=europe_countries --o
WARNUNG: Die Vektorkarte 'europe_countries' existiert bereits und wird
         überschrieben.
A datum name etrs89 (European_Terrestrial_Reference_System_1989) was specified without transformation parameters.
Note that the GRASS default for etrs89 is towgs84=0.000,0.000,0.000.
Die Projektionsinformationen des Eingabedatensatzes und der aktuellen Location stimmen überein.
Fahre mit dem Import fort...
WARNUNG: Die Vektorkarte 'europe_countries' existiert bereits und wird
         überschrieben.
Layer: europe_countries_LAEA
WARNUNG: Spaltenname 'cat' wurde in 'cat_' geändert.
Importiere 3356 Objekte der Karte...
Speicherzugriffsfehler

-> "Segmentation fault"


2. Switching LOCALE:

GRASS 6.3.cvs (eu_laea):~/data/vmap0_europe_shape > export LANGUAGE=en_US
GRASS 6.3.cvs (eu_laea):~/data/vmap0_europe_shape > export LANG=en_US
GRASS 6.3.cvs (eu_laea):~/data/vmap0_europe_shape > export LC_ALL=en_US
GRASS 6.3.cvs (eu_laea):~/data/vmap0_europe_shape > v.in.ogr europe_countries_LAEA.shp out=europe_countries --o
WARNING: The vector 'europe_countries' already exists and will be
         overwritten.
A datum name etrs89 (European_Terrestrial_Reference_System_1989) was specified without transformation parameters.
Note that the GRASS default for etrs89 is towgs84=0.000,0.000,0.000.
Projection of input dataset and current location appear to match.
Proceeding with import...
WARNING: The vector 'europe_countries' already exists and will be
         overwritten.
WARNING: Table 'europe_countries' linked to vector did not exist.
Layer: europe_countries_LAEA
WARNING: Column name changed: 'cat' -> 'cat_'
Importing map 3356 features...
-----------------------------------------------------
Building topology ...
3360 primitives registered
Building areas:  100%
3352 areas built
3329 isles built
Attaching islands:   17%
...

-> works.

############ System
uname -a
Linux localhost 2.6.17-5mdv #1 SMP Wed Sep 13 14:32:31 EDT 2006 i686 Intel(R) Pentium(R) 4 CPU 2.53GHz GNU/Linux

gcc -v
Using built-in specs.
Target: i586-mandriva-linux-gnu
Configured with: ...
gcc version 4.1.1 20060724 (prerelease) (4.1.1-3mdk)

############# Debugging in gdb:

Back to DE LOCALE:

gdb `which v.in.ogr`
GNU gdb 6.3-8mdv2007.0 (Mandriva Linux release 2007.0)
...
This GDB was configured as "i586-mandriva-linux-gnu"...Using host libthread_db library "/lib/i686/libthread_db.so.1".
(gdb) r europe_countries_LAEA.shp out=europe_countries --o

Starting program: /home/neteler/soft/63grass_cvsexp/dist.i686-pc-linux-gnu/bin/v.in.ogr europe_countries_LAEA.shp out=europe_countries --o
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xbfffe000
[Thread debugging using libthread_db enabled]
[New Thread -1224276272 (LWP 14949)]
Detaching after fork from child process 14952.
Detaching after fork from child process 14953.
WARNUNG: Die Vektorkarte 'europe_countries' existiert bereits und wird
         überschrieben.
A datum name etrs89 (European_Terrestrial_Reference_System_1989) was specified without transformation parameters.
Note that the GRASS default for etrs89 is towgs84=0.000,0.000,0.000.
Die Projektionsinformationen des Eingabedatensatzes und der aktuellen Location stimmen überein.
Fahre mit dem Import fort...
Detaching after fork from child process 14954.
WARNUNG: Die Vektorkarte 'europe_countries' existiert bereits und wird
         überschrieben.
Detaching after fork from child process 14955.
Detaching after fork from child process 14956.
WARNUNG: Table 'europe_countries' linked to vector did not exist.
Layer: europe_countries_LAEA
Detaching after fork from child process 14957.
WARNUNG: Spaltenname 'cat' wurde in 'cat_' geändert.
Detaching after fork from child process 14958.
Importiere 3356 Objekte der Karte...

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1224276272 (LWP 14949)]
0xb7cdded9 in OGRSpatialReference::Release (this=0x8073948) at ogrspatialreference.cpp:399
399             delete this;
Current language:  auto; currently c++
(gdb) bt full
#0  0xb7cdded9 in OGRSpatialReference::Release (this=0x8073948) at ogrspatialreference.cpp:399
No locals.
#1  0xb7cd37af in ~OGRGeometry (this=0x80818e0) at ogrgeometry.cpp:204
No locals.
#2  0xb7cd0ff3 in ~OGRPolygon (this=0x80818e0) at ogr_geometry.h:556
No locals.
#3  0xb7cd7c31 in ~OGRFeature (this=0x8080070) at ogrfeature.cpp:188
No locals.
#4  0xb7cd6755 in OGR_F_Destroy (hFeat=0x8080070) at ogrfeature.cpp:250
No locals.
#5  0x0804d5dc in main (argc=4, argv=0xbfa2c474) at main.c:748
        i = Variable "i" is not available.


I updated from GDAL-CVS a few minutes ago. The bt result doesn't tell me
much unfortunately...

Suggestions are welcome,
Markus




More information about the Gdal-dev mailing list