robofit / but_velodyne_lib

Open source library for Velodyne 3D LIDAR point clouds processing provided by Robo@FIT group.
GNU Lesser General Public License v3.0
85 stars 68 forks source link

seg fault #10

Open Benjaminmar8 opened 8 years ago

Benjaminmar8 commented 8 years ago

Dear All, I managed to compile the but_velodyne_lib and but_velodyne_ros based on #3 Now I am trying to test the program and I got a seg fault. I also run the program with gdb (rosrun --prefix 'gdb -ex run --args' but_velodyne_ros but_velodyne_ros_node ) and I got the output as shown below. Is there anything I did wrongly? Thanks a lot for the help!

GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /home/vc1/catkin_ws/devel/lib/but_velodyne_ros/but_velodyne_ros_node...(no debugging symbols found)...done. Starting program: /home/vc1/catkin_ws/devel/lib/but_velodyne_ros/but_velodyne_ros_node [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1". Traceback (most recent call last): File "/usr/share/gdb/auto-load/usr/lib/i386-linux-gnu/libstdc++.so.6.0.19-gdb.py", line 63, in from libstdcxx.v6.printers import register_libstdcxx_printers ImportError: No module named 'libstdcxx'

Program received signal SIGSEGV, Segmentation fault. __strcmp_ssse3 () at ../sysdeps/i386/i686/multiarch/strcmp-ssse3.S:241 241 ../sysdeps/i386/i686/multiarch/strcmp-ssse3.S: No such file or directory. (gdb) continue Continuing.

Program terminated with signal SIGSEGV, Segmentation fault. The program no longer exists.

martin-velas commented 8 years ago

Hi - this library is ROS independent. Please, take a look and try to run the script demo.sh to find out, if the problem is related to the library or the ROS implementation. From this error output I can not tell anything.

Benjaminmar8 commented 8 years ago

I think my issue is that my cmake could not find the module config file for but_velodyne_lib. Quick question, how do you let cmake look for the but_velodyne_lib module config file, suppose I have compiled the but_velodyne_lib at my home directory? Thanks a lot.

ompugao commented 8 years ago

I think my issue is that my cmake could not find the module config file for but_velodyne_lib.

Nope

Quick question, how do you let cmake look for the but_velodyne_lib module config file, suppose I have compiled the but_velodyne_lib at my home directory?

installpath=$HOME/install
cd path/to/but_velodyne_lib
mkdir build; cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$installpath
make install
echo export CMAKE_PREFIX_PATH='$CMAKE_PREFIX_PATH':"$installpath" | tee >> $HOME/.bashrc
exec $SHELL

ImportError: No module named 'libstdcxx'

mkdir -p $HOME/.gdb
svn co https://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python ~/.gdb/python
cat > $HOME/.gdbinit
python
import sys
import os
sys.path.insert(0, os.path.join(os.environ['HOME'],'.gdb/python/'))
sys.path.append(os.path.join(os.environ['HOME'],'.gdb/python/libstdcxx/v6/'))
from libstdcxx.v6.printers import register_libstdcxx_printers
#register_libstdcxx_printers (None)
end
<C-d>

Program received signal SIGSEGV, Segmentation fault.

try backtrace on gdb

Benjaminmar8 commented 8 years ago

This is what I get after I entered backtrace on gdb: (gdb) backtrace

0 __strcmp_ssse3 () at ../sysdeps/i386/i686/multiarch/strcmp-ssse3.S:241

1 0xaef0d023 in QMetaType::registerNormalizedType(QByteArray const&, void ()(void), void* ()(void const), void ()(void), void* ()(void, void const), int, QFlagsQMetaType::TypeFlag, QMetaObject const) ()

from /usr/lib/i386-linux-gnu/libQt5Core.so.5

2 0xae8ddd48 in ?? () from /usr/lib/i386-linux-gnu/libQt5Gui.so.5

3 0xb7fecd77 in call_init (l=, argc=argc@entry=1,

argv=argv@entry=0xbfffe9b4, env=env@entry=0xbfffe9bc) at dl-init.c:78

4 0xb7fece64 in call_init (env=0xbfffe9bc, argv=0xbfffe9b4, argc=1,

l=<optimized out>) at dl-init.c:36

5 _dl_init (main_map=0xb7fff938, argc=1, argv=0xbfffe9b4, env=0xbfffe9bc)

at dl-init.c:126

6 0xb7fdf10f in _dl_start_user () from /lib/ld-linux.so.2

Any idea what went wrong? Thanks!