brainvisa / anatomist-free

3D visualization of neuroimaging objects, C++ part
Other
2 stars 0 forks source link

Segmentation fault in libanahistogram under Python 3 #16

Closed ylep closed 4 years ago

ylep commented 4 years ago

Under Ubuntu 16.04 (NeuroSpin standard install, outside of casa-distro), anatomist crashes during start-up. The stack trace follows:

Thread 1 "anatomist" received signal SIGSEGV, Segmentation fault.
0x00007fffabc145a4 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
(gdb) bt
#0  0x00007fffabc145a4 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#1  0x00007ffff7de76ca in call_init (l=<optimized out>, argc=argc@entry=1, 
    argv=argv@entry=0x7fffffffda78, env=env@entry=0x7fffffffda88)
    at dl-init.c:72
#2  0x00007ffff7de77db in call_init (env=0x7fffffffda88, argv=0x7fffffffda78, 
    argc=1, l=<optimized out>) at dl-init.c:30
#3  _dl_init (main_map=main_map@entry=0xab5c70, argc=1, argv=0x7fffffffda78, 
    env=0x7fffffffda88) at dl-init.c:120
#4  0x00007ffff7dec8f2 in dl_open_worker (a=a@entry=0x7fffffffcfb0)
    at dl-open.c:575
#5  0x00007ffff7de7574 in _dl_catch_error (
    objname=objname@entry=0x7fffffffcfa0, 
    errstring=errstring@entry=0x7fffffffcfa8, 
    mallocedp=mallocedp@entry=0x7fffffffcf9f, 
    operate=operate@entry=0x7ffff7dec4e0 <dl_open_worker>, 
    args=args@entry=0x7fffffffcfb0) at dl-error.c:187
#6  0x00007ffff7debdb9 in _dl_open (file=0xabcac0 "libanahistogram.so.4.6.2", 
    mode=-2147483390, caller_dlopen=
    0x7fffefb15e64 <carto::PluginLoader::loadPluginFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)+2516>, nsid=-2, argc=<optimized out>, argv=<optimized out>, env=0x7fffffffda88)
    at dl-open.c:660
#7  0x00007fffec819f09 in dlopen_doit (a=a@entry=0x7fffffffd1e0) at dlopen.c:66
#8  0x00007ffff7de7574 in _dl_catch_error (objname=0x66e770, 
    errstring=0x66e778, mallocedp=0x66e768, 
    operate=0x7fffec819eb0 <dlopen_doit>, args=0x7fffffffd1e0)
    at dl-error.c:187
#9  0x00007fffec81a571 in _dlerror_run (
    operate=operate@entry=0x7fffec819eb0 <dlopen_doit>, 
    args=args@entry=0x7fffffffd1e0) at dlerror.c:163
#10 0x00007fffec819fa1 in __dlopen (file=<optimized out>, mode=<optimized out>)
    at dlopen.c:87
Python Exception <class 'gdb.error'> Il n'y a pas de membre nommé _M_dataplus.: 
#11 0x00007fffefb15e64 in loadlib2 (lname=, verbose=<optimized out>)
    at /volatile/bv/src/soma/soma-io/master/src/libsoma-io/plugin/plugin.cc:177
#12 loadlib (libname=..., ver=..., verbose=<optimized out>)
    at /volatile/bv/src/soma/soma-io/master/src/libsoma-io/plugin/plugin.cc:259
#13 carto::PluginLoader::loadPluginFile (p=..., ver=..., verbose=0)
    at /volatile/bv/src/soma/soma-io/master/src/libsoma-io/plugin/plugin.cc:354
#14 0x00007fffefb153aa in carto::PluginLoader::load (verbose=0, 
    forcereload=false)
    at /volatile/bv/src/soma/soma-io/master/src/libsoma-io/plugin/plugin.cc:315
#15 0x00007ffff78c5604 in anatomist::Anatomist::initialize (
    this=0x7fffffffd760)
    at /volatile/bv/src/anatomist/anatomist-free/master/src/lib/application/Anatomist.cc:647
#16 0x000000000040142e in main (argc=<optimized out>, argv=0x7fffffffda78)
    at /volatile/bv/src/anatomist/anatomist-free/master/src/anatomist/anatomist.cc:61
denisri commented 4 years ago

This looks like a library conflict (both Qt4 and Qt5 loaded for instance) but we need more info to find out. Is it a personal build or somewhere I can try ? In gdb when the crash occurs you can use the command "sharedlibrary" to get the list of all loaded libraries. From there we can look for conflicting/incompatible libraries.

ylep commented 4 years ago

Thanks for the hint Denis, this was probably a Qt version conflict. I guess I must have changed DESIRED_QT_VERSION at some point, and my build tree was inconsistent. Rebuilding from scratch fixed the issue.