0
$\begingroup$

Rosanswers logo

Hi all,

I installed ROS Indigo in Ubuntu 14.04 and the RVIZ version is 1.11.15. When I run rviz and try to add Image or Camera display type, RVIZ crashes giving following output:

Segmentation Fault (Core Dumped)

Although I am able to add PointCloud2 display type without any issues.
I have NVIDIA drivers version 367.27.

Update - 1
I get the following output after building RVIZ from source and running with GDB. The segmentation fault occurs when I try to add the Camera display type to RVIZ:

c-naman.kumar@namanviumar:~$ rosrun --prefix 'gdb --args' rviz rviz
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 "x86_64-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/likewise-open/FARADAYFUTURE/c-naman.kumar/catkin_ws/devel/lib/rviz/rviz...done.
(gdb) run
Starting program: /home/likewise-open/FARADAYFUTURE/c-naman.kumar/catkin_ws/devel/lib/rviz/rviz 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffdbd6a700 (LWP 8788)]
[New Thread 0x7fffdb569700 (LWP 8789)]
[New Thread 0x7fffd3fff700 (LWP 8790)]
[New Thread 0x7fffd37fe700 (LWP 8791)]
[New Thread 0x7fffd2ffd700 (LWP 8792)]
[ INFO] [1479141998.084372668]: rviz version 1.11.15
[ INFO] [1479141998.084458500]: compiled against Qt version 4.8.6
[ INFO] [1479141998.084484005]: compiled against OGRE version 1.8.1 (Byatis)
[New Thread 0x7fffd25f1700 (LWP 8796)]
[New Thread 0x7fffd1df0700 (LWP 8797)]
[New Thread 0x7fffd15ef700 (LWP 8798)]
[New Thread 0x7fffd0dee700 (LWP 8803)]
[Thread 0x7fffd37fe700 (LWP 8791) exited]
[New Thread 0x7fffd37fe700 (LWP 8804)]
[New Thread 0x7fffadae8700 (LWP 8805)]
[New Thread 0x7fffad2e7700 (LWP 8806)]
[New Thread 0x7fffacae6700 (LWP 8807)]
[New Thread 0x7fffa7fff700 (LWP 8808)]
[New Thread 0x7fffa77fe700 (LWP 8809)]
[New Thread 0x7fffa6ffd700 (LWP 8810)]
[New Thread 0x7fffa67fc700 (LWP 8811)]
[New Thread 0x7fffa5ffb700 (LWP 8812)]
[New Thread 0x7fffa57fa700 (LWP 8813)]
[New Thread 0x7fffa4ff9700 (LWP 8814)]
[New Thread 0x7fff83fff700 (LWP 8815)]
[ INFO] [1479141998.795922717]: Stereo is NOT SUPPORTED
[ INFO] [1479141998.796146340]: OpenGl version: 4.5 (GLSL 4.5).
[New Thread 0x7fff837fe700 (LWP 8829)]
[New Thread 0x7fff82ffd700 (LWP 8830)]

Program received signal SIGSEGV, Segmentation fault.
__strcmp_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:29
29  ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S: No such file or directory.
(gdb)

Update - 2
Here is the backtrace:

(gdb) bt
#0  __strcmp_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:29
#1  0x00007fff67eae09e in QMetaType::registerNormalizedType(QByteArray const&, void (*)(void*), void* (*)(void const*), void (*)(void*), void* (*)(void*, void const*), int, QFlags<QMetaType::TypeFlag>, QMetaObject const*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#2  0x00007fff676a37b7 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#3  0x00007ffff7dea10a in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffda98, env=env@entry=0x7fffffffdaa8) at dl-init.c:78
#4  0x00007ffff7dea1f3 in call_init (env=<optimized out>, argv=<optimized out>, argc=<optimized out>, l=<optimized out>) at dl-init.c:36
#5  _dl_init (main_map=main_map@entry=0x1659300, argc=1, argv=0x7fffffffda98, env=0x7fffffffdaa8) at dl-init.c:126
#6  0x00007ffff7deec30 in dl_open_worker (a=a@entry=0x7fffffffbb58) at dl-open.c:577
#7  0x00007ffff7de9fc4 in _dl_catch_error (objname=objname@entry=0x7fffffffbb48, errstring=errstring@entry=0x7fffffffbb50, mallocedp=mallocedp@entry=0x7fffffffbb40, operate=operate@entry=0x7ffff7dee960 <dl_open_worker>, args=args@entry=0x7fffffffbb58) at dl-error.c:187
#8  0x00007ffff7dee37b in _dl_open (file=0x164f668 "/opt/ros/indigo/lib//libcompressed_depth_image_transport.so", mode=-2147483391, caller_dlopen=<optimized out>, nsid=-2, argc=1, argv=0x7fffffffda98, env=0x7fffffffdaa8) at dl-open.c:661
#9  0x00007fffedd5b02b in dlopen_doit (a=a@entry=0x7fffffffbd70) at dlopen.c:66
#10 0x00007ffff7de9fc4 in _dl_catch_error (objname=0x60b820, errstring=0x60b828, mallocedp=0x60b818, operate=0x7fffedd5afd0 <dlopen_doit>, args=0x7fffffffbd70) at dl-error.c:187
#11 0x00007fffedd5b62d in _dlerror_run (operate=operate@entry=0x7fffedd5afd0 <dlopen_doit>, args=args@entry=0x7fffffffbd70) at dlerror.c:163
#12 0x00007fffedd5b0c1 in __dlopen (file=<optimized out>, mode=<optimized out>) at dlopen.c:87
#13 0x00007fffefda1c33 in Poco::SharedLibraryImpl::loadImpl(std::string const&) () from /usr/lib/libPocoFoundation.so.9
#14 0x00007fffefda214f in Poco::SharedLibrary::SharedLibrary(std::string const&) () from /usr/lib/libPocoFoundation.so.9
#15 0x00007ffff50a4e1b in class_loader::class_loader_private::loadLibrary(std::string const&, class_loader::ClassLoader*) () from /opt/ros/indigo/lib/libclass_loader.so
#16 0x00007ffff509f52c in class_loader::ClassLoader::loadLibrary() () from /opt/ros/indigo/lib/libclass_loader.so
#17 0x00007ffff509f760 in class_loader::ClassLoader::ClassLoader(std::string const&, bool) () from /opt/ros/indigo/lib/libclass_loader.so
#18 0x00007ffff50a8567 in class_loader::MultiLibraryClassLoader::loadLibrary(std::string const&) () from /opt/ros/indigo/lib/libclass_loader.so
#19 0x00007ffff79f9c6d in pluginlib::ClassLoader<image_transport::SubscriberPlugin>::loadLibraryForClass (this=0x7fffffffc620, lookup_name="image_transport/compressedDepth_sub") at /opt/ros/indigo/include/pluginlib/class_loader_imp.h:528
#20 0x00007ffff79f6957 in pluginlib::ClassLoader<image_transport::SubscriberPlugin>::createInstance (this=0x7fffffffc620, lookup_name="image_transport/compressedDepth_sub") at /opt/ros/indigo/include/pluginlib/class_loader_imp.h:135
#21 0x00007ffff79f2001 in rviz::ImageDisplayBase::scanForTransportSubscriberPlugins (this=0x168ffe0) at /home/likewise-open/FARADAYFUTURE/c-naman.kumar/catkin_ws/src/rviz/src/rviz/image/image_display_base.cpp:233
#22 0x00007ffff79f05a4 in rviz::ImageDisplayBase::onInitialize (this=0x168ffe0) at /home/likewise-open/FARADAYFUTURE/c-naman.kumar/catkin_ws/src/rviz/src/rviz/image/image_display_base.cpp:85
#23 0x00007fff82003216 in rviz::CameraDisplay::onInitialize (this=0x168ffe0) at /home/likewise-open/FARADAYFUTURE/c-naman.kumar/catkin_ws/src/rviz/src/rviz/default_plugin/camera_display.cpp:138
#24 0x00007ffff79b1a17 in rviz::Display::initialize (this=0x168ffe0, context=0x129c430) at /home/likewise-open/FARADAYFUTURE/c-naman.kumar/catkin_ws/src/rviz/src/rviz/display.cpp:94
#25 0x00007ffff7ad057e in rviz::VisualizationManager::addDisplay (this=0x129c430, display=0x168ffe0, enabled=true) at /home/likewise-open/FARADAYFUTURE/c-naman.kumar/catkin_ws/src/rviz/src/rviz/visualization_manager.cpp:434
#26 0x00007ffff7ad0a2b in rviz::VisualizationManager::createDisplay (this=0x129c430, class_lookup_name=..., name=..., enabled=true) at /home/likewise-open/FARADAYFUTURE/c-naman.kumar/catkin_ws/src/rviz/src/rviz/visualization_manager.cpp:477
#27 0x00007ffff79d11b2 in rviz::DisplaysPanel::onNewDisplay (this=0x129f040) at /home/likewise-open/FARADAYFUTURE/c-naman.kumar/catkin_ws/src/rviz/src/rviz/displays_panel.cpp:126
#28 0x00007ffff7ae9a9e in rviz::DisplaysPanel::qt_static_metacall (_o=0x129f040, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffffffccf0) at /home/likewise-open/FARADAYFUTURE/c-naman.kumar/catkin_ws/build/rviz/src/rviz/moc_displays_panel.cpp:54
#29 0x00007ffff2c9787a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#30 0x00007ffff72ed172 in QAbstractButton::clicked(bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#31 0x00007ffff7050a63 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#32 0x00007ffff7051bd3 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#33 0x00007ffff7051cbc in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#34 0x00007ffff6cee51a in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#35 0x00007ffff6c9ee2c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#36 0x00007ffff6ca55dd in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#37 0x00007ffff2c834dd in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#38 0x00007ffff6ca4d93 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#39 0x00007ffff6d199eb in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#40 0x00007ffff6d19289 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#41 0x00007ffff6d40b32 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#42 0x00007ffff15f6e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#43 0x00007ffff15f7048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#44 0x00007ffff15f70ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#45 0x00007ffff2cb07be in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#46 0x00007ffff6d40be6 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#47 0x00007ffff2c820af in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#48 0x00007ffff2c823a5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#49 0x00007ffff2c87b79 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#50 0x0000000000401113 in main (argc=1, argv=0x7fffffffda98) at /home/likewise-open/FARADAYFUTURE/c-naman.kumar/catkin_ws/src/rviz/src/rviz/main.cpp:42
(gdb) 

Please let me know if you need more information from my side. Any help will be appreciated.

Thanks.
Naman


Originally posted by Naman on ROS Answers with karma: 1464 on 2016-11-12

Post score: 1


Original comments

Comment by gvdhoorn on 2016-11-12:
Probably the easiest way to diagnose this is to build RViz from sources with -DCMAKE_BUILD_TYPE=Debug and then run it in GDB. Without a backtrace we'd need a lucky guess to resolve your problem.

Comment by Naman on 2016-11-14:
Thanks. I have updated the question with the output!

Comment by gvdhoorn on 2016-11-14:
Thanks, that's going in the right direction. Could you trigger the SEGFAULT once more, and now, at the gdb prompt, enter bt. Then press enter. Then add the backtrace to your question description.

Comment by Naman on 2016-11-14:
Hey, added the backtrace!

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The problem was that RVIZ was compiled against Qt4 whereas when I try to load an image/ camera/ depthcloud in RVIZ, it finds Qt5 which was present because I installed opencv 2.4.10 whereas ROS comes with opencv 2.4.8. So, there was a qt conflict because of multiple versions of opencv. I uninstalled opencv 2.4.10 and then also uninstalled ROS with all its dependencies to do a clean install. After installing ROS again, it worked. Hope it helps!


Originally posted by Naman with karma: 1464 on 2016-11-15

This answer was ACCEPTED on the original site

Post score: 3

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.