Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in Ogre::GLStateCacheManager using visualization_msgs/msg/MarkerArray #906

Closed
sloretz opened this issue Sep 20, 2022 · 0 comments · Fixed by #907
Closed

Crash in Ogre::GLStateCacheManager using visualization_msgs/msg/MarkerArray #906

sloretz opened this issue Sep 20, 2022 · 0 comments · Fixed by #907
Assignees
Labels
bug Something isn't working

Comments

@sloretz
Copy link
Contributor

sloretz commented Sep 20, 2022

Launch RViz with this config file. Don't change anything. It sometimes doesn't crash when I change where the camera is looking.

rviz_crash.zip

I see the crash in both the latest sources from master and in ROS Humble debs.

  1. Run this command, but don't start playback yet
ros2 bag play rviz_crash_bag_trimmed  --topics /tf /contacts --start-paused
  1. Run RViz and wait for it to launch completely
gdb -ex=r --args rviz2 -d src/collisions.rviz
  1. Start playback by pressing spacebar in the ros2 bag window

After a few seconds RViz will crash.

The this pointer for Ogre::GLStateCacheManager is a null.

Thread 1 "rviz2" received signal SIGSEGV, Segmentation fault.
0x00007fffdc70b8e8 in Ogre::GLStateCacheManager::setClearDepth (this=0x0, depth=1) at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/RenderSystems/GL/src/OgreGLStateCacheManager.cpp:320
320	            mClearDepth = depth;
(gdb) bt
#0  0x00007fffdc70b8e8 in Ogre::GLStateCacheManager::setClearDepth (this=0x0, depth=1)
    at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/RenderSystems/GL/src/OgreGLStateCacheManager.cpp:320
#1  0x00007fffdc6fa23c in Ogre::GLRenderSystem::_setDepthBufferCheckEnabled (this=0x555556116e60, enabled=true)
    at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/RenderSystems/GL/src/OgreGLRenderSystem.cpp:1868
#2  0x00007fffdc6fa1c4 in Ogre::GLRenderSystem::_setDepthBufferParams (this=0x555556116e60, depthTest=true, depthWrite=true, depthFunction=Ogre::CMPF_LESS_EQUAL)
    at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/RenderSystems/GL/src/OgreGLRenderSystem.cpp:1859
#3  0x00007ffff5922d0b in Ogre::SceneManager::_setPass (this=0x5555566c96b0, pass=0x5555569fea70, evenIfSuppressed=false, shadowDerivation=true)
    at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreSceneManager.cpp:1102
#4  0x00007ffff5924c59 in Ogre::SceneManager::SceneMgrQueuedRenderableVisitor::visit (this=0x5555566c9eb0, p=0x5555569fea70, rs=std::vector of length 1, capacity 1 = {...})
    at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreSceneManager.cpp:1732
#5  0x00007ffff588df7b in Ogre::QueuedRenderableCollection::acceptVisitorGrouped (this=0x5555566d7c60, visitor=0x5555566c9eb0)
    at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreRenderQueueSortingGrouping.cpp:411
#6  0x00007ffff588de1c in Ogre::QueuedRenderableCollection::acceptVisitor (this=0x5555566d7c60, visitor=0x5555566c9eb0, om=Ogre::QueuedRenderableCollection::OM_PASS_GROUP)
    at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreRenderQueueSortingGrouping.cpp:389
#7  0x00007ffff592510c in Ogre::SceneManager::renderObjects (this=0x5555566c96b0, objs=..., om=Ogre::QueuedRenderableCollection::OM_PASS_GROUP, lightScissoringClipping=true, doLightIteration=true, 
    manualLightList=0x0, transparentShadowCastersMode=false) at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreSceneManager.cpp:1830
#8  0x00007ffff592533b in Ogre::SceneManager::renderBasicQueueGroupObjects (this=0x5555566c96b0, pGroup=0x555556a22bc0, om=Ogre::QueuedRenderableCollection::OM_PASS_GROUP)
    at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreSceneManager.cpp:1880
#9  0x00007ffff5925298 in Ogre::SceneManager::_renderQueueGroupObjects (this=0x5555566c96b0, pGroup=0x555556a22bc0, om=Ogre::QueuedRenderableCollection::OM_PASS_GROUP)
    at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreSceneManager.cpp:1862
#10 0x00007ffff5924b73 in Ogre::SceneManager::renderVisibleObjectsDefaultSequence (this=0x5555566c96b0)
    at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreSceneManager.cpp:1702
#11 0x00007ffff59248e0 in Ogre::SceneManager::_renderVisibleObjects (this=0x5555566c96b0)
    at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreSceneManager.cpp:1619
#12 0x00007ffff5923bac in Ogre::SceneManager::_renderScene (this=0x5555566c96b0, camera=0x55555698d590, vp=0x5555564c8460, includeOverlays=true)
    at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreSceneManager.cpp:1383
#13 0x00007ffff566b245 in Ogre::Camera::_renderScene (this=0x55555698d590, vp=0x5555564c8460, includeOverlays=true)
    at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreCamera.cpp:495
#14 0x00007ffff5a56b3f in Ogre::Viewport::update (this=0x5555564c8460) at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreViewport.cpp:218
#15 0x00007ffff58c3d48 in Ogre::RenderTarget::_updateViewport (this=0x5555557072a0, viewport=0x5555564c8460, updateStatistics=true)
    at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreRenderTarget.cpp:203
#16 0x00007ffff58c3c2d in Ogre::RenderTarget::_updateAutoUpdatedViewports (this=0x5555557072a0, updateStatistics=true)
    at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreRenderTarget.cpp:181
#17 0x00007ffff58c3b47 in Ogre::RenderTarget::updateImpl (this=0x5555557072a0) at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreRenderTarget.cpp:158
#18 0x00007ffff58c585c in Ogre::RenderTarget::update (this=0x5555557072a0, swap=false) at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreRenderTarget.cpp:565
#19 0x00007ffff589bd0c in Ogre::RenderSystem::_updateAllRenderTargets (this=0x555556116e60, swapBuffers=false)
    at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreRenderSystem.cpp:263
#20 0x00007ffff5904f66 in Ogre::Root::_updateAllRenderTargets (this=0x555556089590) at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreRoot.cpp:1295
#21 0x00007ffff5902b50 in Ogre::Root::renderOneFrame (this=0x555556089590) at /home/osrf/ws/ros2/build/rviz_ogre_vendor/ogre-v1.12.10-prefix/src/ogre-v1.12.10/OgreMain/src/OgreRoot.cpp:867
#22 0x00007ffff7e7e427 in rviz_common::VisualizationManager::onUpdate (this=0x55555650d940) at /home/osrf/ws/ros2/src/ros2/rviz/rviz_common/src/rviz_common/visualization_manager.cpp:450
#23 0x00007ffff7d6c523 in rviz_common::VisualizationManager::qt_static_metacall (_o=0x55555650d940, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x7fffffff1fa0)
    at /home/osrf/ws/ros2/build/rviz_common/include/rviz_common/moc_visualization_manager.cpp:114
#24 0x00007ffff71c97b8 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007ffff71cd7ee in QTimer::timeout(QTimer::QPrivateSignal) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007ffff71bf32f in QObject::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007ffff75a3713 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007ffff7191e2a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#29 0x00007ffff71ea3db in QTimerInfoList::activateTimers() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#30 0x00007ffff71eacdc in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#31 0x00007ffff40cbd1b in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007ffff41206f8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007ffff40c93c3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007ffff71eb0a8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#35 0x00007ffff719074b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#36 0x00007ffff7198ce4 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#37 0x000055555555e166 in main (argc=3, argv=0x7fffffff2678) at /home/osrf/ws/ros2/src/ros2/rviz/rviz2/src/main.cpp:76
@sloretz sloretz added the bug Something isn't working label Sep 20, 2022
sloretz added a commit to RobotLocomotion/drake-ros that referenced this issue Sep 20, 2022
@sloretz sloretz changed the title Crash in Ogre::GLStateCacheManager Crash in Ogre::GLStateCacheManager using visualization_msgs/msg/MarkerArray Sep 20, 2022
@sloretz sloretz self-assigned this Sep 20, 2022
sloretz added a commit to RobotLocomotion/drake-ros that referenced this issue Dec 29, 2022
sloretz added a commit to RobotLocomotion/drake-ros that referenced this issue Apr 12, 2023
* Copy files from example

Signed-off-by: Greg Balke <greg@openrobotics.org>

* Matching adjusted drake-ros

Signed-off-by: Greg Balke <greg@openrobotics.org>

* Update changes to drake geometry API

Signed-off-by: Greg Balke <greg@openrobotics.org>

* Format with clang

Signed-off-by: Greg Balke <greg@openrobotics.org>

* .cpp/.hpp -> .cc/.h

* Ressurect hydroelastic collisions demo

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

* Move to drake_ros_examples

* Hydroelastic collisions separate from rviz visualizer

* Remove unneeded variable

* tf2_eigen dep is solely in drake_ros_viz

* Strip drake visualizer stuff for now

* Example is now a ball rolling down a hill

* Follow rolling sphere

* Marker namespace from body names

* ConnectContactResultsToRviz and demo is now a slow super big ball

* Namespace cleanup

* Tweak resolution and timestep for faster demo

* Misc cleanup

* Get contact results from plant instead of scene graph

* Add missing CMakeLists.txt

* Two balls and Hydroelastic with fallback

* Return of the body_names_

* Don't need Shapereifier interface

* Visualize point contacts in RViz too

* Make example about collisions, not just hydroelastic ones

* General collisions example

* Generic example for both point and hydroelastic contacts

* Clang-format

* drake_ros_viz linters pass

* drake_ros_examples linters pass

* Move lodpng.h

* Depend on libgflags-dev

* Set timestamp on markers and drop Pt| prefix

* Default publish rate of 32Hz

* Change view to avoid ros2/rviz#906

* Lifetime changes, file naming, drake-visualizer use

* Separate function for color conversion

* Clearer code creating line segment for visualizing point contacts

* Misc fixes

* Use drake_ros_core geometry conversions

* lint fixes

* get_graph_query_port -> get_graph_query_input_port

* Fix code style

* Use Geometry conversions

* Fix linter

* Merge branch 'main' into sloretz__gbalke__drake_ros_viz_hydroelastic

* build and tests pass

* Hash to tag

* Examples builds and passes tests

* Rename to hydroelastic

* Bazelize hydroelastic example

* Add bazel hydroelastic test

* Remove copyright notice

* Use sdformat file for defining scene (works with Bazel, untested with CMake)

* Remove unused resolution_hint flag

* Fix CMake build

* Put code into a namespace

* drake-visualizer -> meshcat

* Document how to enable meshcat

* Add TODO to make convert_color a public API

* Add LeafSystem doxygen tags

* Linting

* Remove copyright notice and lint

* Remove copyright notice

* Fix copy/paste error in comment

* Remove unnecessary public visibility

* Add TODO for Python example

* Removed copy/pasted parameters

* Don't set maximum step size

* Remove newline

* xmllint --pretty 1

* Added TODO for making all geometries compliant

* Use SimulatorConfig

* Remove unused stuff

* VTK instead of lodepng

* GenerateHeatmapPng()

* VisualizationConfig

* Linter

* depend on libvtk

* libvtk9-dev

* Merge branch 'main' into sloretz__gbalke__drake_ros_viz_hydroelastic

* Update drake_ros namespace usage

* Fix linters

* Add ament_index_share_files

* lint

* clang-format

* Clarify note about runfiles_manifest

* Comment why using ament_index_share_files

* Add note about overriding

* Merge branch 'main' into sloretz__gbalke__drake_ros_viz_hydroelastic

* Update comment

Co-Authored-By: Greg Balke <greg@openrobotics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant