ros-visualization / visualization_tutorials

Tutorials related to using and extending RViz and interactive_markers.
262 stars 263 forks source link

Segmentation Fault in rviz_python_tutorial/myviz.py #46

Closed ProgenitorX closed 6 years ago

ProgenitorX commented 6 years ago

I'm getting a Segmentation Fault (core dumped) whenever I try to run myviz.py.

I've done roscd rviz_python_tutorial followed by rosrun rviz_python_tutorial myviz.py I've also tried simply python myviz.py

The problem happens on line 58: self.frame.initialize() Debugger shows self.frame is an instance of librviz_sip.VisualizationFrame object, as expected.

I'm using Python 2.7.12 and PyQt5 5.5.1 I believe everything should be set up properly (dir under catkin_ws/src and catkin_make succeeded).

Here is the gbd backtrace:

(gdb) bt #0 0x0000000000000000 in ?? () #1 0x00007fffb2c43c09 in ?? () from /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so.1.9.0 #2 0x00007fffb2c0e27f in Ogre::GLStateCacheManager::switchContext(long) () from /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so.1.9.0 #3 0x00007fffb2bff04d in Ogre::GLRenderSystem::initialiseContext(Ogre::RenderWindow*) () from /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so.1.9.0 #4 0x00007fffb2c07b13 in Ogre::GLRenderSystem::_createRenderWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Ogre::STLAllocator<std::pair<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> > >, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > const*) () from /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so.1.9.0 #5 0x00007fffe258888c in Ogre::Root::createRenderWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int, bool, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Ogre::STLAllocator<std::pair<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> > >, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > const*) () from /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0 #6 0x00007fffe5348c1a in rviz::RenderSystem::tryMakeRenderWindow(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsi---Type <return> to continue, or q <return> to quit--- gned int, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, Ogre::STLAllocator<std::pair<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> > >, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > > const*, int) () from /opt/ros/kinetic/lib/librviz.so #7 0x00007fffe534a3de in rviz::RenderSystem::makeRenderWindow(unsigned long, unsigned int, unsigned int, double) () from /opt/ros/kinetic/lib/librviz.so #8 0x00007fffe534c8b5 in rviz::RenderSystem::RenderSystem() () from /opt/ros/kinetic/lib/librviz.so #9 0x00007fffe534ca15 in rviz::RenderSystem::get() () from /opt/ros/kinetic/lib/librviz.so #10 0x00007fffe5347dd1 in rviz::QtOgreRenderWindow::QtOgreRenderWindow(QWidget*) () from /opt/ros/kinetic/lib/librviz.so #11 0x00007fffe536e959 in rviz::RenderPanel::RenderPanel(QWidget*) () from /opt/ros/kinetic/lib/librviz.so #12 0x00007fffe53ba300 in rviz::VisualizationFrame::initialize(QString const&) () from /opt/ros/kinetic/lib/librviz.so

Thanks! Let me know if I can provide anything else that might be of use.

ProgenitorX commented 6 years ago

Turns out 3D Acceleration was on somehow for my VBox, causing a Seg Fault for RViz. Sorry for the trouble and thanks for the tutorials!