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

Sometimes the GUI segfault when we delete nodes #1654

Closed
julien-duponchelle opened this issue Nov 11, 2016 · 4 comments
Closed

Sometimes the GUI segfault when we delete nodes #1654

julien-duponchelle opened this issue Nov 11, 2016 · 4 comments
Labels
Milestone

Comments

@julien-duponchelle
Copy link
Contributor

I open the issue for trying to track down the issue.

@julien-duponchelle julien-duponchelle added this to the 2.0 milestone Nov 11, 2016
@julien-duponchelle
Copy link
Contributor Author

I suspect this arrive when you delete a lot of nodes heavy linked together. But I don't easily reproduce.

@julien-duponchelle
Copy link
Contributor Author

I suggest that we wrote a script using the GNS3 api adding and removing nodes randomly.

julien-duponchelle added a commit to GNS3/gns3-server that referenced this issue Nov 14, 2016
The purpose of this script is to replicate weird
issues by sending a large number of queries.

* Ref GNS3/gns3-gui#1654
* Ref GNS3/gns3-gui#1659
@julien-duponchelle
Copy link
Contributor Author

I think I start to better isolate the issue.

The best scenario for reproducing the issue:

  • Create a big topology with multiple nodes and link .
  • Select a large number of nodes and link
  • Delete them

But not warranty

I finally got a GDB stack trace:

Thread 1 received signal SIGSEGV, Segmentation fault.
0x0000000104e3069e in QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem*, QPainter*, QTransform const*, QRegion*, QWidget*, double, QTransform const*) () from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets

(gdb) where
#0  0x0000000104e3069e in QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem*, QPainter*, QTransform const*, QRegion*, QWidget*, double, QTransform const*) () from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#1  0x0000000104e30472 in QGraphicsScenePrivate::drawItems(QPainter*, QTransform const*, QRegion*, QWidget*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#2  0x0000000104e518af in QGraphicsView::paintEvent(QPaintEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#3  0x00000001045c4122 in sipQGraphicsView::paintEvent(QPaintEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/QtWidgets.so
#4  0x0000000104b38291 in QWidget::event(QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#5  0x0000000104c29ffd in QFrame::event(QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#6  0x0000000104cb58f3 in QAbstractScrollArea::viewportEvent(QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#7  0x0000000104e4f419 in QGraphicsView::viewportEvent(QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#8  0x00000001045c4af8 in sipQGraphicsView::viewportEvent(QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/QtWidgets.so
#9  0x0000000104cb64a5 in QAbstractScrollAreaFilter::eventFilter(QObject*, QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#10 0x00000001034c068a in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore
#11 0x0000000104af8b61 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#12 0x0000000104afb4c0 in QApplication::notify(QObject*, QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#13 0x000000010463b653 in sipQApplication::notify(QObject*, QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/QtWidgets.so
#14 0x00000001034c03f4 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore
#15 0x0000000104b31d84 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#16 0x0000000104b32558 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#17 0x0000000104b32023 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#18 0x0000000104b32558 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#19 0x0000000104b32023 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#20 0x0000000104b32558 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#21 0x0000000104b32023 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#22 0x0000000104b06511 in QWidgetBackingStore::doSync() ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#23 0x0000000104b384bd in QWidget::event(QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#24 0x0000000104c4107f in QMainWindow::event(QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#25 0x000000010459f428 in sipQMainWindow::event(QEvent*) () from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/QtWidgets.so
#26 0x0000000104af8b76 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#27 0x0000000104afb4c0 in QApplication::notify(QObject*, QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#28 0x000000010463b653 in sipQApplication::notify(QObject*, QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/QtWidgets.so
#29 0x00000001034c03f4 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore
#30 0x00000001034c1014 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore
#31 0x0000000104e1c652 in QGraphicsScenePrivate::_q_processDirtyItems() ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#32 0x00000001034ec6dc in QObject::event(QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore
#33 0x0000000104e283e3 in QGraphicsScene::event(QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#34 0x00000001045c87b8 in sipQGraphicsScene::event(QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/QtWidgets.so
#35 0x0000000104af8b76 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#36 0x0000000104afb4c0 in QApplication::notify(QObject*, QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtWidgets.framework/Versions/5/QtWidgets
#37 0x000000010463b653 in sipQApplication::notify(QObject*, QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/QtWidgets.so
#38 0x00000001034c03f4 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore
#39 0x00000001034c1014 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore
#40 0x0000000112335bae in QCocoaEventDispatcherPrivate::processPostedEvents() ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/plugins/platforms/libqcocoa.dylib
#41 0x0000000112336481 in QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) ()
   from /Users/noplay/.virtualenvs/gns3-gui/lib/python3.5/site-packages/PyQt5/Qt/plugins/platforms/libqcocoa.dylib
#42 0x00007fff8ff08881 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
   from /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
#43 0x00007fff8fee7fbc in __CFRunLoopDoSources0 () from /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
#44 0x00007fff8fee74df in __CFRunLoopRun () from /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
#45 0x00007fff8fee6ed8 in CFRunLoopRunSpecific () from /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
#46 0x00007fff8d2e8935 in RunCurrentEventLoopInMode ()
   from /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
#47 0x00007fff8d2e876f in ReceiveNextEventCommon ()
   from /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
#48 0x00007fff8d2e85af in _BlockUntilNextEventMatchingListInModeWithFilter ()
   from /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
#49 0x00007fff93522df6 in ?? () from /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
#50 0x00007fff5fbfe56c in ?? ()
#51 0x000000010f269110 in ?? ()

julien-duponchelle added a commit that referenced this issue Nov 14, 2016
@julien-duponchelle
Copy link
Contributor Author

The segfault is fixed

Instead of:
cf63b49#diff-e09b6c9303969eb087cd84e64f0a3822L120

We use a signal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant