Skip to content

Crash when switching Debug Visualization Mode while GI is disabled #3058

@XINJIANGMO

Description

@XINJIANGMO

Environment

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

Description

  • Expected behavior: if I switch debug visualization mode while gi is disabled , gazebo would reminds me to enable gi.
  • Actual behavior: gazebo crashes

Steps to reproduce

  1. gz sim shapes.sdf
  2. from the plugin dropdown, select the Global Illumination VCT plugin
  3. switch debug visualization mode while gi is disabled
  4. crash

Output

Stack trace (most recent call last) in thread 1307014:
#25   Object "", at 0xffffffffffffffff, in 
#24   Source "../sysdeps/unix/sysv/linux/x86_64/clone3.S", line 78, in clone3 [0x7b4b4ad29c3b]
#23   Source "./nptl/pthread_create.c", line 447, in start_thread [0x7b4b4ac9caa3]
#22   Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7b4b4b67c48c, in 
#21   Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7b4b4b610682, in QThread::exec()
#20   Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7b4b4b5429a2, in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
#19   Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7b4b4b7315ee, in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
#18   Source "../../../glib/gmain.c", line 4282, in g_main_context_iteration [0x7b4b48d13a52]
#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 [0x7b4b48d73716]
#16   Source "../../../glib/gmain.c", line 3344, in g_main_dispatch [0x7b4b48d145b4]
#15   Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7b4b4b733a8e, in 
#14   Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7b4b4b538634, in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
#13   Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7b4b4b538447, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#12   Object "/usr/lib/x86_64-linux-gnu/libQt6Widgets.so.6.4.2", at 0x7b4b4978b3af, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#11   Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7b4b4b576682, in QObject::event(QEvent*)
#10   Source "/home/momo/gz_jetty/src/gz-gui/src/plugins/minimal_scene/MinimalScene.cc", line 929, in RenderNext [0x7b4b3505a2f8]
        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 [0x7b4b3506c307]
        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 [0x7b4b35063ee9]
        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 0x7b4b4b538447, in QCoreApplication::notifyInternal2(QObject*, QEvent*)
#6    Object "/usr/lib/x86_64-linux-gnu/libQt6Widgets.so.6.4.2", at 0x7b4b4978b39f, in QApplicationPrivate::notify_helper(QObject*, QEvent*)
#5    Object "/usr/lib/x86_64-linux-gnu/libQt6Core.so.6.4.2", at 0x7b4b4b535f09, in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*)
#4    Source "/home/momo/gz_jetty/src/gz-sim/src/gui/plugins/global_illumination_vct/GlobalIlluminationVct.cc", line 502, in eventFilter [0x7b4b05fe87ec]
        499:       }
        500:       else if (this->dataPtr->debugVisualizationDirty)
        501:       {
      > 502:         this->dataPtr->gi->SetDebugVisualization(
        503:           static_cast<rendering::GlobalIlluminationVct::DebugVisualizationMode>(
        504:             this->dataPtr->debugVisMode));
        505:         this->dataPtr->debugVisualizationDirty = false;
#3    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextHlmsPbs.so.2.3.1", at 0x7b4b053df7d6, 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 0x7b4b053de7f6, in Ogre::VctVoxelizerSourceBase::setTextureToDebugVisualizer()
#1    Object "/usr/lib/x86_64-linux-gnu/OGRE-2.3/libOgreNextMain.so.2.3.1", at 0x7b4ac79123f7, 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 0x7b4ac79c6074, 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