Segmentation fault on start

Issue #68 resolved
Former user created an issue

First, thanks for the work on Itom which seems fairly promising (I sadly could not test yet..)

I compiled itom v3.1.0 on a linux machine (debian amd64). Compilation goes smoothly (apart for a few warnings on char pointers), but when starting qitom I get a segfault immediately.

I recompiled with debug symbols and ran from gdb :

Reading symbols from ./qitomd...done. (gdb) r Starting program: /home/shermelin/src/itom/build_debug/itom/qitomd [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault. 0x00007fffe8eb6184 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4 (gdb) bt full

0 0x00007fffe8eb6184 in () at /usr/lib/x86_64-linux-gnu/libQtGui.so.4

1 0x00007ffff7de6f0a in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffe188, env=env@entry=0x7fffffffe198) at dl-init.c:72

    j = <optimized out>
    jm = <optimized out>
    addrs = <optimized out>
    init_array = <optimized out>

2 0x00007ffff7de7016 in call_init (env=0x7fffffffe198, argv=0x7fffffffe188, argc=1, l=<optimized out>) at dl-init.c:118

    preinit_array = <optimized out>
    preinit_array_size = <optimized out>
    i = 24

3 0x00007ffff7de7016 in _dl_init (main_map=0x7ffff7ffe170, argc=1, argv=0x7fffffffe188, env=0x7fffffffe198) at dl-init.c:119

    preinit_array = <optimized out>
    preinit_array_size = <optimized out>
    i = 24

4 0x00007ffff7dd90ca in _dl_start_user () at /lib64/ld-linux-x86-64.so.2

5 0x0000000000000001 in ()

6 0x00007fffffffe476 in ()

7 0x0000000000000000 in ()

(gdb)

Seems like the problem is linked to qt... the shared library libQtGui is version 4.8.7 right now.

Any guess on what can be the problem ?

Thanks, Sylvain

Comments (4)

  1. M. Gronle

    Hi Sylvain,

    at first, I have to mention that the itom development is mainly done with Windows systems. However, we try to provide a running linux version as good as possible. Most linux development is done with Qt5 on Ubuntu systems.

    Nevertheless, I remember that I had similar segfault errors some months ago. Usually, this error was due to incompatible 3rd party libraries. For instance, itom links against a version of Qt. Additionally, itom links against the editor component qscintilla, which is also linked against Qt. Sometimes it happens, that you have a version of qscintilla on your computer that was build with a different version of Qt. Then you get such an error. Sometimes, I also observed such kind of errors after having updated my linux system. Then, some libraries are updated to newer versions, and some libraries are not. Then CMake detects incompatible versions, the compilation of itom might still work, but it will start with such a segfault.

    Please check, that you link against the same version of Qt and that qscintilla also was build using this version of Qt. Did you enable the point cloud support (PCL)? If yes, it might be good if you would disable this for the first tests. Else, you also have to check that the point cloud library links against a version of the visualization toolkit (VTK) that also uses the same version of Qt. The same holds for OpenCV. Usually, you don't need OpenCV with enabled Qt support, since we don't need the windows of OpenCV. However, if you have a version of OpenCV with enabled Qt support, make sure, that it is the same version of Qt that you want to use.

    In general it might be good if you would have a chance to use Qt5. The development of itom started with Qt 4.8, however we migrated to Qt5 some years ago. We still try to provide the Qt4 support, however almost nobody is using this anymore in the daily work such that the chance of bugs is higher than with the Qt5 version.

    I hope that these hints might help you to get itom working.

    Cheers Marc

  2. Sylvain

    Hi Marc,

    thanks for the quick feedback!

    I'll look into that direction, which sound totally resaonnable: I apparently have a mix of QT5 and QT4 both for qscintilla and itom. I'll try to clean that up and let you know!

    Thanks, Sylvain

  3. Sylvain

    itom is now starting! Thanks a lot for pointing me to the right direction.

    I'll head to macrosim now!

    [EDIT] in case it may come to help someone, on debian I ran cmake with the following: cmake -DBUILD_QTVERSION:STRING=Qt5 -DPYTHON_EXECUTABLE:FILEPATH=which python3 -DCMAKE_BUILD_TYPE=debug -DBUILD_TARGET64=ON -DBUILD_UNICODE=ON -DBUILD_WITH_PCL=OFF -DPYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") -DPYTHON_LIBRARIES=$(python3 -c "import distutils.sysconfig as sysconfig; print(sysconfig.get_config_var(\"LIBDIR\"))") ../../sources/

  4. Log in to comment