Skip to content

Closing Gazebo while a modal dialog is open causes Gazebo to crash #2872

@iche033

Description

@iche033

Environment

  • OS Version: Ubuntu 24.04
  • Source or binary build? source, commit a7f35c6, with Qt 6.4

Description

  • Expected behavior: Gazebo shuts down cleanly when a modal dialog window is open
  • Actual behavior: Gazebo crashes, see backtrace in Output section below

A quick search in gz-sim gui src code reveals the following instances of modal dialogs:

$ grep -iR "modal: true" ./src/

./src/gui/plugins/resource_spawner/ResourceSpawner.qml:              modal: true
./src/gui/plugins/resource_spawner/ResourceSpawner.qml:    modal: true
./src/gui/plugins/spawn/Spawn.qml:    modal: true
./src/gui/plugins/video_recorder/VideoRecorder.qml:      modal: true
./src/gui/plugins/transform_control/TransformControl.qml:      modal: true
./src/gui/plugins/component_inspector_editor/ComponentInspectorEditor.qml:    modal: true
./src/gui/plugins/component_inspector_editor/ComponentInspectorEditor.qml:          modal: true
./src/gui/plugins/component_inspector_editor/ComponentInspectorEditor.qml:          modal: true
./src/gui/resources/GazeboDrawer.qml:    modal: true
./src/gui/resources/GazeboDrawer.qml:    modal: true
./src/gui/resources/GazeboDrawer.qml:    modal: true

Steps to reproduce

  1. Launch gz sim
  2. Click on the menu button at top left corner of the Gazebo window
  3. Select About to open the About dialog window
  4. Close the Gazebo main window (while leaving the About dialog window open) -> Gazebo crashes

Output

#31   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x7fed902c6099, in  
#30   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x7fed901ef216, in rb_protect
#29   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x7fed903942c9, in rb_yield
#28   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x7fed9038fb39, in rb_vm_exec
#27   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x7fed9038c5db, in  
#26   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x7fed903880fe, in  
#25   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x7fed903858ef, in  
#24   Object "/usr/lib/x86_64-linux-gnu/ruby/3.2.0/fiddle.so", at 0x7fed8b0b7b13, in  
#23   Object "/lib/x86_64-linux-gnu/libruby-3.2.so.3.2", at 0x7fed9034e3bb, in rb_nogvl
#22   Object "/usr/lib/x86_64-linux-gnu/ruby/3.2.0/fiddle.so", at 0x7fed8b0b743b, in  
#21   Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x7fed8afeb0bd, in ffi_call
#20   Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x7fed8afe83ee, in  
#19   Object "/lib/x86_64-linux-gnu/libffi.so.8", at 0x7fed8afebb15, in  
#18   Object "/home/iche/code/gz_j_ws_noble/install/lib/libgz-sim-gz.so.10.0.0~pre1", at 0x7fed8a4b4ba5, in runGui
#17   Object "/home/iche/code/gz_j_ws_noble/install/lib/libgz-sim-gui.so.10", at 0x7fed8a2f501a, in gz::sim::v10::gui::runGui(int&, char**, char const*, char const*, int, char const*, char const*) 
#16   Object "/home/iche/code/gz_j_ws_noble/install/lib/libgz-gui.so.10", at 0x7fed8997fa6c, in gz::gui::Application::~Application()
#15   Object "/home/iche/code/gz_j_ws_noble/install/lib/libgz-gui.so.10", at 0x7fed8997f739, in gz::gui::Application::~Application()
#14   Object "/lib/x86_64-linux-gnu/libQt6Qml.so.6", at 0x7fed884e3f24, in QQmlApplicationEngine::~QQmlApplicationEngine()
#13   Object "/lib/x86_64-linux-gnu/libQt6Core.so.6", at 0x7fed88f82547, in QObject::~QObject()
#12   Object "/lib/x86_64-linux-gnu/libQt6Core.so.6", at 0x7fed88f7efb6, in QObjectPrivate::deleteChildren()
#11   Object "/lib/x86_64-linux-gnu/libQt6Quick.so.6", at 0x7fed88b56728, in  
#10   Object "/lib/x86_64-linux-gnu/libQt6Quick.so.6", at 0x7fed8894cfdc, in QQuickItem::~QQuickItem()
#9    Object "/lib/x86_64-linux-gnu/libQt6QuickTemplates2.so.6", at 0x7fed66116edf, in QQuickPopup::setParentItem(QQuickItem*)
#8    Object "/lib/x86_64-linux-gnu/libQt6QuickTemplates2.so.6", at 0x7fed66112609, in QQuickPopupTransitionManager::transitionExit()
#7    Object "/lib/x86_64-linux-gnu/libQt6QuickTemplates2.so.6", at 0x7fed661108f0, in QQuickPopupPrivate::prepareExitTransition()
#6    Object "/lib/x86_64-linux-gnu/libQt6QuickTemplates2.so.6", at 0x7fed66110aa1, in QQuickPopupPrivate::hideOverlay()
#5    Object "/lib/x86_64-linux-gnu/libQt6Qml.so.6", at 0x7fed885762dd, in QQmlProperty::write(QObject*, QString const&, QVariant const&)
#4    Object "/lib/x86_64-linux-gnu/libQt6Qml.so.6", at 0x7fed885761a3, in QQmlPropertyPrivate::writeValueProperty(QVariant const&, QFlags<QQmlPropertyData::WriteFlag>)
#3    Object "/lib/x86_64-linux-gnu/libQt6Qml.so.6", at 0x7fed88574e10, in QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>)
#2    Object "/lib/x86_64-linux-gnu/libQt6Qml.so.6", at 0x7fed884d76c8, in  
#1    Object "/lib/x86_64-linux-gnu/libQt6Qml.so.6", at 0x7fed885dd64d, in QQmlVMEMetaObject::metaCall(QObject*, QMetaObject::Call, int, void**)
#0    Object "/lib/x86_64-linux-gnu/libQt6Qml.so.6", at 0x7fed885dbcdc, in QQmlInterceptorMetaObject::doIntercept(QMetaObject::Call, int, void**)
Segmentation fault (Address not mapped to object [0xc])

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUIGazebo's graphical interface (not pure Ignition GUI)bugSomething isn't working

    Type

    No type

    Projects

    Status

    Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions