tork-a / jog_control

Apache License 2.0
55 stars 18 forks source link

rviz plugin get segmentation fault when it stated #29

Closed 7675t closed 5 years ago

7675t commented 5 years ago
$ roslaunch jog_launch ur5.launch use_fake_joint:=true use_rviz:=false use_moveit:=true 
$ rviz -d default

get segfault. It happens only the released binary, not with the binary built from source.

Stack trace:

Thread 1 "rviz" received signal SIGSEGV, Segmentation fault.
0x00007ffff43bd4a1 in ros::Time::now() ()
   from /opt/ros/kinetic/lib/librostime.so
(gdb) bt
#0  0x00007ffff43bd4a1 in ros::Time::now() ()
   from /opt/ros/kinetic/lib/librostime.so
#1  0x00007fff9824fbbe in jog_controller::JogFramePanel::publish() ()
   from /opt/ros/kinetic/lib//libjog_controller.so
#2  0x00007ffff1f7fd2a in QMetaObject::activate(QObject*, int, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007ffff1f8c5c8 in QTimer::timerEvent(QTimerEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff1f80bb3 in QObject::event(QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007ffff746405c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#6  0x00007ffff7469516 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7  0x00007ffff1f5138b in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007ffff1fa65ed in QTimerInfoList::activateTimers() ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007ffff1fa6af1 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007ffff14a8197 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007ffff14a83f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#12 0x00007ffff14a849c in g_main_context_iteration ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007ffff1fa77cf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop:
:ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007ffff1f4eb4a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>
) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007ffff1f56bec in QCoreApplication::exec() ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x0000000000400c99 in main ()
7675t commented 5 years ago

I built it in Release mode and stripped, but I can't reproduce this with the library built from source code. When I copied the libjog_controller.so to system, it works. What could be difference between source built library and the released library?

7675t commented 5 years ago

Any thought @534o ? Have you experienced the difference between local build and build farm's build?

534o commented 5 years ago

one possibility is you have rviz or other deb which is build before the newer the latest rostime, that includes changes in it's header files https://github.com/ros/roscpp_core/blob/kinetic-devel/rostime/CHANGELOG.rst you can check the build time by https://github.com/tork-a/88_tools/pull/20

easy way is to run apt-get dist-upgrade,

7675t commented 5 years ago

Great! You are totally correct and dist-upgrade solves it like a charm. Thanks!