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

gzclient crashes with assertion failed when using XFCE after restoring minimized window #2003

Closed
osrf-migration opened this issue Jul 6, 2016 · 16 comments
Labels
all bug Something isn't working critical gui

Comments

@osrf-migration
Copy link

Original report (archived issue) by Tobias Fischer (Bitbucket: TobiasFischer).


Hi,
When using Gazebo 7.2.0-1~trusty using the XFCE window manager, I can start gazebo nicely and play around with it. However when minimizing the window and bringing it back to focus, I get the following error:

Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'Ogre::ItemIdentityException'
  what():  OGRE EXCEPTION(4:ItemIdentityException): A camera with the name default::gzclient_camera(1)_selection_buffer already exists in OctreeSceneManager::createCamera at /build/buildd/ogre-1.8-1.8.1+dfsg/PlugIns/OctreeSceneManager/src/OgreOctreeSceneManager.cpp (line 372)

The backtrace is as follows:

(gdb) bt
#0  0x00007ffff6592c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff6596028 in __GI_abort () at abort.c:89
#2  0x00007ffff6b97535 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff6b956d6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff6b95703 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff6b95976 in __cxa_rethrow () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff71bb596 in QEventLoop::exec (this=this@entry=0x7fffffffc690, flags=...) at kernel/qeventloop.cpp:218
#7  0x00007ffff71c0b79 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225
#8  0x00007ffff277e37c in QApplication::exec () at kernel/qapplication.cpp:3828
#9  0x00007ffff7655e5b in gazebo::gui::run (_argc=_argc@entry=1, _argv=_argv@entry=0x7fffffffc8b8) at /var/lib/jenkins/workspace/gazebo7-debbuilder/build/gazebo-7.2.0/gazebo/gui/GuiIface.cc:315
#10 0x000000000040152a in main (_argc=1, _argv=0x7fffffffc8b8) at /var/lib/jenkins/workspace/gazebo7-debbuilder/build/gazebo-7.2.0/gazebo/gui/main.cc:25

I couldn't find any related issues yet. My system is pretty standard (I think), Ubuntu 14.04, using XFCE. It does not happen when using the standard Ubuntu window manager.

Please let me know if you need any further information.

Best, Tobias

@osrf-migration
Copy link
Author

Original comment by Tobias Fischer (Bitbucket: TobiasFischer).


I was trying to debug this. When compiling by hand, I can't even start gzclient due to the following error:

gzclient: /usr/include/boost/smart_ptr/shared_ptr.hpp:653: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = gazebo::rendering::Camera; typename boost::detail::sp_member_access<T>::type = gazebo::rendering::Camera*]: Assertion `px != 0' failed.

Backtrace:

#0  0x00007ffff6577c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff657b028 in __GI_abort () at abort.c:89
#2  0x00007ffff6570bf6 in __assert_fail_base (fmt=0x7ffff66c13b8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7ffff5b671b4 "px != 0", file=file@entry=0x7ffff5b66fe0 "/usr/include/boost/smart_ptr/shared_ptr.hpp", line=line@entry=653, 
    function=function@entry=0x7ffff5b8d8e0 <_ZZNK5boost10shared_ptrIN6gazebo9rendering6CameraEEptEvE19__PRETTY_FUNCTION__> "typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = gazebo::rendering::Camera; typename boost::detail::sp_member_access<T>::type = gazebo::rendering::C"...) at assert.c:92
#3  0x00007ffff6570ca2 in __GI___assert_fail (assertion=0x7ffff5b671b4 "px != 0", file=0x7ffff5b66fe0 "/usr/include/boost/smart_ptr/shared_ptr.hpp", line=653, 
    function=0x7ffff5b8d8e0 <_ZZNK5boost10shared_ptrIN6gazebo9rendering6CameraEEptEvE19__PRETTY_FUNCTION__> "typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = gazebo::rendering::Camera; typename boost::detail::sp_member_access<T>::type = gazebo::rendering::C"...) at assert.c:101
#4  0x00007ffff5b423fe in operator-> (this=0x7fffffffb9a0) at /usr/include/boost/smart_ptr/shared_ptr.hpp:653
#5  gazebo::rendering::WindowManager::SetCamera (this=0x9c2270, _windowId=_windowId@entry=1, _camera=...) at /home/tobias/robot/tools/gazebo/gazebo/rendering/WindowManager.cc:75
#6  0x00007ffff7635401 in gazebo::gui::GLWidget::showEvent (this=0x11cc5a0, _event=0x7fffffffbcc0) at /home/tobias/robot/tools/gazebo/gazebo/gui/GLWidget.cc:242
#7  0x00007ffff27b72b5 in QWidget::event (this=0x11cc5a0, event=0x7fffffffbcc0) at kernel/qwidget.cpp:8594
#8  0x00007ffff2767e2c in QApplicationPrivate::notify_helper (this=this@entry=0xeda810, receiver=receiver@entry=0x11cc5a0, e=e@entry=0x7fffffffbcc0) at kernel/qapplication.cpp:4567
#9  0x00007ffff276e4a0 in QApplication::notify (this=0xec2eb0, receiver=0x11cc5a0, e=0x7fffffffbcc0) at kernel/qapplication.cpp:4353
#10 0x00007ffff71a14dd in QCoreApplication::notifyInternal (this=0xec2eb0, receiver=receiver@entry=0x11cc5a0, event=event@entry=0x7fffffffbcc0) at kernel/qcoreapplication.cpp:953
#11 0x00007ffff27b4a1f in sendEvent (event=0x7fffffffbcc0, receiver=0x11cc5a0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#12 QWidgetPrivate::show_helper (this=this@entry=0x181af30) at kernel/qwidget.cpp:7556
#13 0x00007ffff27b66c4 in QWidget::setVisible (this=0x11cc5a0, visible=<optimised out>) at kernel/qwidget.cpp:7778
#14 0x00007ffff27b489e in show (this=0x11cc5a0) at ../../include/QtGui/../../src/gui/kernel/qwidget.h:497
#15 QWidgetPrivate::showChildren (this=this@entry=0x18cb400, spontaneous=spontaneous@entry=false) at kernel/qwidget.cpp:7866
#16 0x00007ffff27b491f in QWidgetPrivate::show_helper (this=this@entry=0x18cb400) at kernel/qwidget.cpp:7503
#17 0x00007ffff27b66c4 in QWidget::setVisible (this=0x18cae80, visible=<optimised out>) at kernel/qwidget.cpp:7778
#18 0x00007ffff27b489e in show (this=0x18cae80) at ../../include/QtGui/../../src/gui/kernel/qwidget.h:497
#19 QWidgetPrivate::showChildren (this=this@entry=0x18cdc70, spontaneous=spontaneous@entry=false) at kernel/qwidget.cpp:7866
#20 0x00007ffff27b491f in QWidgetPrivate::show_helper (this=this@entry=0x18cdc70) at kernel/qwidget.cpp:7503
#21 0x00007ffff27b66c4 in QWidget::setVisible (this=0x11ce660, visible=<optimised out>) at kernel/qwidget.cpp:7778
#22 0x00007ffff71b9c1e in QObject::event (this=this@entry=0x11ce660, e=e@entry=0x18dd850) at kernel/qobject.cpp:1194
#23 0x00007ffff27b756b in QWidget::event (this=0x11ce660, event=0x18dd850) at kernel/qwidget.cpp:8846
#24 0x00007ffff2767e2c in QApplicationPrivate::notify_helper (this=this@entry=0xeda810, receiver=receiver@entry=0x11ce660, e=e@entry=0x18dd850) at kernel/qapplication.cpp:4567
#25 0x00007ffff276e4a0 in QApplication::notify (this=0xec2eb0, receiver=0x11ce660, e=0x18dd850) at kernel/qapplication.cpp:4353
#26 0x00007ffff71a14dd in QCoreApplication::notifyInternal (this=0xec2eb0, receiver=receiver@entry=0x11ce660, event=event@entry=0x18dd850) at kernel/qcoreapplication.cpp:953
#27 0x00007ffff71a4b3d in sendEvent (event=0x18dd850, receiver=0x11ce660) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#28 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x9bd7f0) at kernel/qcoreapplication.cpp:1577
#29 0x00007ffff71a4fe3 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1470
#30 0x00007ffff71cef83 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#31 postEventSourceDispatch (s=0xedaf60) at kernel/qeventdispatcher_glib.cpp:287
#32 0x00007fffef92ee04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007fffef92f048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007fffef92f0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007ffff71ce7a1 in QEventDispatcherGlib::processEvents (this=0xedac40, flags=...) at kernel/qeventdispatcher_glib.cpp:434
#36 0x00007ffff2809be6 in QGuiEventDispatcherGlib::processEvents (this=<optimised out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#37 0x00007ffff71a00af in QEventLoop::processEvents (this=this@entry=0x7fffffffc620, flags=...) at kernel/qeventloop.cpp:149
#38 0x00007ffff71a03a5 in QEventLoop::exec (this=this@entry=0x7fffffffc620, flags=...) at kernel/qeventloop.cpp:204
#39 0x00007ffff71a5b79 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1225
#40 0x00007ffff276637c in QApplication::exec () at kernel/qapplication.cpp:3828
#41 0x00007ffff76427fb in gazebo::gui::run (_argc=_argc@entry=1, _argv=_argv@entry=0x7fffffffc848) at /home/tobias/robot/tools/gazebo/gazebo/gui/GuiIface.cc:315
#42 0x000000000040138a in main (_argc=1, _argv=0x7fffffffc848) at /home/tobias/robot/tools/gazebo/gazebo/gui/main.cc:25

I am not sure whether the two errors are somehow related. Please let me know if you want me to open a second issue instead.

@osrf-migration
Copy link
Author

Original comment by Tobias Fischer (Bitbucket: TobiasFischer).


  • changed priority from "minor" to "major"

@osrf-migration
Copy link
Author

Original comment by Tobias Fischer (Bitbucket: TobiasFischer).


  • changed title from "gzclient crashes with assertion failed" to "gzclient crashes with assertion failed when using XFCE"

@osrf-migration
Copy link
Author

Original comment by Tobias Fischer (Bitbucket: TobiasFischer).


  • Edited issue description

@osrf-migration
Copy link
Author

Original comment by Tobias Fischer (Bitbucket: TobiasFischer).


Please mind that the second error (gzclient: /usr/include/boost/smart_ptr/shared_ptr.hpp:653: typename boost::detail::sp_member_access<T>::type boost::shared_ptr<T>::operator->() const [with T = gazebo::rendering::Camera; typename boost::detail::sp_member_access<T>::type = gazebo::rendering::Camera*]: Assertion px != 0' failed.`) also happens in the normal Ubuntu window manager.

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


  • changed title from "gzclient crashes with assertion failed when using XFCE" to "gzclient crashes with assertion failed when using XFCE after restoring minimized window"

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


Can you describe which xfce packages you are using to help with reproducing this error? I'm currently using gnome-session-fallback since Unity's 3d acceleration has caused intermittent gzclient seg-faults for my in the past.

@osrf-migration
Copy link
Author

Original comment by Tobias Fischer (Bitbucket: TobiasFischer).


Sure. The easiest way is to sudo apt-get install xubuntu-desktop. The full list is as follows:

sudo apt-get install plymouth-theme-xubuntu-logo plymouth-theme-xubuntu-text xubuntu-artwork xubuntu-community-wallpapers xubuntu-default-settings xubuntu-desktop xubuntu-docs xubuntu-icon-theme xubuntu-wallpapers gtk2-engines-xfce gtk3-engines-xfce libxfce4ui-1-0 libxfce4ui-2-0 libxfce4ui-common libxfce4ui-utils libxfce4util-bin libxfce4util-common libxfce4util6 libxfce4util7 libxfcegui4-4 xfce4-appfinder xfce4-artwork xfce4-battery-plugin xfce4-clipman xfce4-clipman-plugin xfce4-cpufreq-plugin xfce4-cpugraph-plugin xfce4-datetime-plugin xfce4-dict xfce4-diskperf-plugin xfce4-fsguard-plugin xfce4-genmon-plugin xfce4-goodies xfce4-mailwatch-plugin xfce4-mixer xfce4-mount-plugin xfce4-netload-plugin xfce4-notes xfce4-notes-plugin xfce4-notifyd xfce4-panel xfce4-panel-dbg xfce4-places-plugin xfce4-power-manager xfce4-power-manager-data xfce4-power-manager-plugins xfce4-quicklauncher-plugin xfce4-screenshooter xfce4-sensors-plugin xfce4-session xfce4-settings xfce4-smartbookmark-plugin xfce4-systemload-plugin xfce4-taskmanager xfce4-terminal xfce4-timer-plugin xfce4-verve-plugin xfce4-volumed xfce4-wavelan-plugin xfce4-weather-plugin xfce4-whiskermenu-plugin xfce4-xkb-plugin

Thanks a lot for looking into this!

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


Sorry I just ran into this myself using gnome-session-fallback. I was waiting to install xfce somewhere, but I should have just tried reproducing it when you reported the issue.

I noticed it when switching virtual desktops, but it also occurs when restoring a minimized window.

I noticed it using the 7.3.0 debian. @iche033 is currently testing to see if the problem is present on 7.2

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


Oh, but you just said that you observe it on 7.2.0

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


The following is enough to reproduce this bug:

diff -r 668a19c7b88a8884441a806b6d631dde6c4c875d gazebo/gui/MainWindow_TEST.cc
--- a/gazebo/gui/MainWindow_TEST.cc	Mon Jul 11 10:09:58 2016 -0700
+++ b/gazebo/gui/MainWindow_TEST.cc	Tue Jul 12 15:16:40 2016 -0700
@@ -83,6 +83,11 @@
   QVERIFY(mainWindow->IsPaused());
   QVERIFY(gazebo::gui::g_stepAct->isEnabled());
 
+  mainWindow->showMinimized();
+  this->ProcessEventsAndDraw(mainWindow);
+  mainWindow->showMaximized();
+  this->ProcessEventsAndDraw(mainWindow);
+
   mainWindow->close();
   delete mainWindow;
 }

it would be cleaner to put it in a separate test case, but this is enough for testing at least

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


  • changed priority from "major" to "critical"

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


  • changed state from "new" to "resolved"

fixed by pull request #2392, to be released in gazebo 7.3.1

@osrf-migration
Copy link
Author

Original comment by Tobias Fischer (Bitbucket: TobiasFischer).


Thanks for the fix!

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


  • set version to "all"

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


  • changed state from "resolved" to "closed"

@osrf-migration osrf-migration added critical gui bug Something isn't working all labels Apr 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
all bug Something isn't working critical gui
Projects
None yet
Development

No branches or pull requests

1 participant