Expected behavior and actual behavior.
build this forked version gdal with xodr support by following the official doc. But for any ogr command, e.g. ogr2ogr --version
or ogrinfo --formats
, it will give a "core dumped". For example by ogr2ogr --version
:
GDAL 3.8.0dev-92381f15e8, released 2023/09/18 (debug build)
[1] 96697 segmentation fault (core dumped) ogr2ogr --version
expected behavior: run through without any segmentation fault
Steps to reproduce the problem.
- build the version from commit 92381f1 by following the official doc
- run
ogr2ogr --version
Operating system
Ubuntu 22.04.3 server 64bit
GDAL version and provenance
the version commit 92381f1 from this repo's libopendrive
branch.
Some other (probably) useful info
by looking into the dumped core, it shows the following bt:
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `ogr2ogr --version'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f5ced6c43fe in __GI___libc_free (mem=0x5640c5fcde5a) at ./malloc/malloc.c:3368
3368 ./malloc/malloc.c: No such file or directory.
(gdb) bt full
#0 0x00007f5ced6c43fe in __GI___libc_free (mem=0x5640c5fcde5a) at ./malloc/malloc.c:3368
ar_ptr = <optimized out>
p = <optimized out>
err = <optimized out>
#1 0x00007f5cea93ecb3 in osgeo::proj::common::UnitOfMeasure::~UnitOfMeasure() () from /lib/x86_64-linux-gnu/libproj.so.22
No symbol table info available.
#2 0x00007f5ced664a56 in __cxa_finalize (d=0x7f5ceabfb000) at ./stdlib/cxa_finalize.c:83
check = 1064
cxafn = <optimized out>
cxaarg = <optimized out>
f = 0x5645a1a5c050
funcs = 0x5645a1a5be80
restart = <optimized out>
#3 0x00007f5cea93e737 in ?? () from /lib/x86_64-linux-gnu/libproj.so.22
No symbol table info available.
#4 0x00007ffd62c5ebb0 in ?? ()
No symbol table info available.
#5 0x00007f5cf00f924e in _dl_fini () at ./elf/dl-fini.c:142
array = 0x7f5cf012da48 <_rtld_global+2568>
i = <optimized out>
l = 0x7f5ceaf2e000
maps = 0x7ffd62c5e910
i = 11
l = <optimized out>
nmaps = <optimized out>
nloaded = <optimized out>
ns = 0
do_audit = <optimized out>
__PRETTY_FUNCTION__ = "_dl_fini"
Backtrace stopped: frame did not save the PC
(gdb) Quit
(gdb) exit
So my guess it would be relevant to libproj
? The libproj-dev
installed on my machine is 8.2.1-1
from the official apt source. Btw, from ogrinfo --formats
, I do can see XODR
:
...
Supported Formats:
XODR -vector- (ro): OpenDRIVE - Open Dynamic Road Information for Vehicle Environment\
...
but with a seg fault at the end. I haven't tested if it can work with a real xodr file yet, but will do that and give more updates if I have. Thanks in advance!