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

Trying to delete sun causes gzclient seg-fault #1133

Closed
osrf-migration opened this issue Mar 26, 2014 · 5 comments
Closed

Trying to delete sun causes gzclient seg-fault #1133

osrf-migration opened this issue Mar 26, 2014 · 5 comments
Labels
all bug Something isn't working gui major

Comments

@osrf-migration
Copy link

Original report (archived issue) by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


I've demonstrated this with the gazebo_3.0 branch on quantal. I'm not sure how to write a test for it exactly since it involves the gui GLWidget.

To replicate:

$ gzserver &
$ gdb gzclient
...
(gdb) r

Then select the Lights in the ModelListWidget, right click on the sun and delete it. Scene.cc will
immediately delete the light
when it receives the entity_delete request message. This apparently causes the GLWidget to seg-fault.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7632faf in gazebo::rendering::Visual::Update (this=0x34dc110)
    at /home/scpeters/ws/gazebo/src/gazebo/gazebo/rendering/Visual.cc:576
576	  if (!this->dataPtr->visible)
(gdb) bt
Thread 1 (Thread 0x7ffff7fb7840 (LWP 13838)):
#0  0x00007ffff7632faf in gazebo::rendering::Visual::Update (this=0x34dc110)
    at /home/scpeters/ws/gazebo/src/gazebo/gazebo/rendering/Visual.cc:576
#1  0x0000000000458be7 in operator() (this=<optimized out>)
    at /usr/include/boost/function/function_template.hpp:760
#2  gazebo::event::EventT<void ()>::Signal() (
    this=0x7ffff7dd95c0 <gazebo::event::Events::preRender>)
    at /home/scpeters/ws/gazebo/src/gazebo/gazebo/common/Event.hh:199
#3  0x000000000045d6a0 in operator() (this=<optimized out>)
    at /home/scpeters/ws/gazebo/src/gazebo/gazebo/common/Event.hh:188
#4  gazebo::gui::GLWidget::paintEvent (this=<optimized out>, _e=0x7fffffffd050)
    at /home/scpeters/ws/gazebo/src/gazebo/gazebo/gui/GLWidget.cc:209
#5  0x00007ffff5ab4802 in QWidget::event(QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#6  0x00007ffff5a64e9c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#7  0x00007ffff5a6930a in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#8  0x00007ffff554056e in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007ffff5ab0524 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#10 0x00007ffff5c7968c in QWidgetPrivate::repaint_sys(QRegion const&) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#11 0x00007ffff5aa5794 in QWidgetPrivate::syncBackingStore() ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#12 0x00007ffff5ab4e4c in QWidget::event(QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#13 0x00007ffff5a64e9c in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#14 0x00007ffff5a6930a in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#15 0x00007ffff554056e in QCoreApplication::notifyInternal(QObject*, QEvent*)
    () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#16 0x00007ffff55443f1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#17 0x00007ffff556ea63 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#18 0x00007ffff0ed2ab5 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007ffff0ed2de8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007ffff0ed2ea4 in g_main_context_iteration ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007ffff556ebf6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#22 0x00007ffff5b09c1e in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#23 0x00007ffff553f2bf in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#24 0x00007ffff553f548 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#25 0x00007ffff5544708 in QCoreApplication::exec() ()
   from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#26 0x0000000000467071 in gazebo::gui::run (_argc=1, _argv=0x7fffffffdc98)
    at /home/scpeters/ws/gazebo/src/gazebo/gazebo/gui/GuiIface.cc:270
#27 0x0000000000446e99 in main (_argc=<optimized out>, _argv=<optimized out>)
    at /home/scpeters/ws/gazebo/src/gazebo/gazebo/gui/main.cc:23
(gdb) 
@osrf-migration
Copy link
Author

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


looks like when processing the preRender event, one of its callbacks (Scene::PreRender) deletes the light's visual object, but another connection tries to invoke the callback of this deleted object (Visual::Update), causing a crash.

@osrf-migration
Copy link
Author

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


pull request #1088

@osrf-migration
Copy link
Author

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


  • changed state from "new" to "resolved"

@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 major 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 gui major
Projects
None yet
Development

No branches or pull requests

1 participant