Skip to content

Crash when disabling gi with active debug visualization mode #3060

@XINJIANGMO

Description

@XINJIANGMO

Environment

  • OS Version: Ubuntu 24.04
  • Source or binary build?
    Source, gz-sim10

Description

  • Expected behavior: when I uncheck Enabled button in gui with active debug visualization mode
    ,gazebo works well.
  • Actual behavior: gazebo crashes

Steps to reproduce

  1. gz sim shapes.sdf
  2. from the plugin dropdown, select the Global Illumination VCT plugin
  3. tick Enabled and Select any mode except None
  4. uncheck Enabled

Output

Stack trace (most recent call last) in thread 1477176:
#25   Object "", at 0xffffffffffffffff, in 
#24   Source "../sysdeps/unix/sysv/linux/x86_64/clone3.S", line 78, in clone3 [0x7451ec529c3b]
#23   Source "./nptl/pthread_create.c", line 447, in start_thread [0x7451ec49caa3]
#22   Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7451ece7c48c, in 
#21   Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7451ece10682, in QThread::exec()
#20   Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7451ecd429a2, in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
#19   Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7451ecf315ee, in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#18   Source "../../../glib/gmain.c", line 4282, in g_main_context_iteration [0x7451ea513a52]
#17 | Source "../../../glib/gmain.c", line 4217, in g_main_context_dispatch_unlocked
      Source "../../../glib/gmain.c", line 4152, in g_main_context_iterate_unlocked [0x7451ea573716]
#16   Source "../../../glib/gmain.c", line 3344, in g_main_dispatch [0x7451ea5145b4]
#15   Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7451ecf33a8e, in 
#14   Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7451ecd38634, in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
#13   Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7451ecd38447, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#12   Object "/usr/lib/x86_64-linux-gnu/libQt6Widgets.so.6.4.2", at 0x7451eaf8b3af, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#11   Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7451ecd76682, in QObject::event(QEvent*)
#10   Source "/home/momo/gz_jetty/src/gz-gui/src/plugins/minimal_scene/MinimalScene.cc", line 929, in RenderNext [0x7451d37422f8]
        926: /////////////////////////////////////////////////
        927: void RenderThread::RenderNext(RenderSync *_renderSync)
        928: {
      > 929:   this->rhi->RenderNext(_renderSync);
        930:   emit this->TextureReady(
        931:     this->rhi->TexturePtr(),
        932:     this->rhi->TextureSize());
#9    Source "/home/momo/gz_jetty/src/gz-gui/src/plugins/minimal_scene/MinimalSceneRhiOpenGL.cc", line 178, in RenderNext [0x7451d3754307]
        175:   }
        176: 
        177:   // Call the renderer
      > 178:   this->dataPtr->renderer->Render(_renderSync, *this);
        179: 
        180:   this->dataPtr->context->doneCurrent();
        181: }
#8    Source "/home/momo/gz_jetty/src/gz-gui/src/plugins/minimal_scene/MinimalScene.cc", line 390, in Render [0x7451d374bee9]
        388:   if (gz::gui::App())
        389:   {
      > 390:     gz::gui::App()->sendEvent(
        391:         gz::gui::App()->findChild<gz::gui::MainWindow *>(),
        392:         new gui::events::Render());
        393:   }
#7    Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7451ecd38447, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#6    Object "/usr/lib/x86_64-linux-gnu/libQt6Widgets.so.6.4.2", at 0x7451eaf8b39f, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#5    Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7451ecd35f09, in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*)
#4    Source "/home/momo/gz_jetty/src/gz-sim/src/gui/plugins/global_illumination_vct/GlobalIlluminationVct.cc", line 468, in eventFilter [0x7451aea15473]
        465:         }
        466: 
        467:         // Restore debug visualization to desired.
      > 468:         this->dataPtr->gi->SetDebugVisualization(
        469:           static_cast<rendering::GlobalIlluminationVct::DebugVisualizationMode>(
        470:             this->dataPtr->debugVisMode));
#3    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextHlmsPbs.so.2.3.1", at 0x7451a37df7d6, in Ogre::VctVoxelizerSourceBase::setDebugVisualization(Ogre::VctVoxelizerSourceBase::DebugVisualizationMode, Ogre::SceneManager*)
#2    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextHlmsPbs.so.2.3.1", at 0x7451a37de7f6, in Ogre::VctVoxelizerSourceBase::setTextureToDebugVisualizer()
#1    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7451751123f7, in Ogre::BarrierSolver::resolveTransition(Ogre::FastArray<Ogre::ResourceTransition>&, Ogre::TextureGpu*, Ogre::ResourceLayout::Layout, Ogre::ResourceAccess::ResourceAccess, unsigned char)
#0    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7451751c6074, in Ogre::TextureGpu::isDiscardableContent() const
Segmentation fault (core dumped)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions