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

#7283 Fix crash on exit on centos 7. #7287

Merged
merged 1 commit into from
Jan 26, 2021

Conversation

kriben
Copy link
Collaborator

@kriben kriben commented Jan 25, 2021

Occasionally QGuiApplication::lastWindowClosed() signal could be sent
more than once.

Closes #7283.

Occasionally QGuiApplication::lastWindowClosed() signal could be sent
more than once.
@kriben kriben requested a review from lindkvis January 25, 2021 21:14
@kriben
Copy link
Collaborator Author

kriben commented Jan 26, 2021

This stack trace shows the problem before the fix (stack number 7 and 32):

(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x0000000001fec212 in caf::PdmFieldHandle::~PdmFieldHandle (this=0x39bd900, __in_chrg=<optimized out>) at ../Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmFieldHandle.cpp:54
#2  0x00000000007ad9f4 in RimOilField::~RimOilField (this=0x39bd420, __in_chrg=<optimized out>) at ../ApplicationLibCode/ProjectDataModel/RimOilField.cpp:85
#3  0x00000000007adba9 in RimOilField::~RimOilField (this=0x39bd420, __in_chrg=<optimized out>) at ../ApplicationLibCode/ProjectDataModel/RimOilField.cpp:87
#4  0x00000000007c7198 in caf::PdmChildArrayField<RimOilField*>::deleteAllChildObjects (this=this@entry=0x3881ac0) at ../Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildArrayField.inl:164
#5  0x00000000007c23ab in RimProject::close (this=0x38818f0) at ../ApplicationLibCode/ProjectDataModel/RimProject.cpp:251
#6  0x000000000054537f in RiaApplication::closeProject (this=0x37643d0) at ../ApplicationLibCode/Application/RiaApplication.cpp:781
#7  0x0000000000553f0d in RiaGuiApplication::onLastWindowClosed (this=<optimized out>) at ../ApplicationLibCode/Application/RiaGuiApplication.cpp:1622
#8  0x00007ffff5af7bf7 in QMetaObject::activate(QObject*, int, int, void**) () from /lib64/libQt5Core.so.5
#9  0x00007ffff5e31755 in QWindowPrivate::maybeQuitOnLastWindowClosed() () from /lib64/libQt5Gui.so.5
#10 0x00007ffff5e34a81 in QWindowPrivate::destroy() () from /lib64/libQt5Gui.so.5
#11 0x00007ffff636d6a7 in QWidgetPrivate::deleteTLSysExtra() () from /lib64/libQt5Widgets.so.5
#12 0x00007ffff6372438 in QWidget::destroy(bool, bool) () from /lib64/libQt5Widgets.so.5
#13 0x00007ffff637848e in QWidget::~QWidget() () from /lib64/libQt5Widgets.so.5
#14 0x000000000114d112 in RiuViewer::~RiuViewer (this=0x548a0f0, __in_chrg=<optimized out>) at ../ApplicationLibCode/UserInterface/RiuViewer.cpp:226
#15 0x000000000114d309 in RiuViewer::~RiuViewer (this=0x548a0f0, __in_chrg=<optimized out>) at ../ApplicationLibCode/UserInterface/RiuViewer.cpp:242
#16 0x00000000009b1e76 in Rim3dView::~Rim3dView (this=0x44221d0, __in_chrg=<optimized out>) at ../ApplicationLibCode/ProjectDataModel/Rim3dView.cpp:194
#17 0x00000000009c8ce0 in RimGridView::~RimGridView (this=0x44221d0, __in_chrg=<optimized out>) at ../ApplicationLibCode/ProjectDataModel/RimGridView.cpp:124
#18 0x00000000008065c9 in RimEclipseView::~RimEclipseView (this=0x44221d0, __in_chrg=<optimized out>) at ../ApplicationLibCode/ProjectDataModel/RimEclipseView.cpp:237
#19 0x00000000007dee78 in caf::PdmChildArrayField<RimEclipseView*>::deleteAllChildObjects (this=this@entry=0x39b4c50) at ../Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildArrayField.inl:164
#20 0x00000000007fde4e in RimEclipseResultCase::~RimEclipseResultCase (this=0x39b4810, __in_chrg=<optimized out>) at ../ApplicationLibCode/ProjectDataModel/RimEclipseResultCase.cpp:470
#21 0x00000000007fdfb9 in RimEclipseResultCase::~RimEclipseResultCase (this=0x39b4810, __in_chrg=<optimized out>) at ../ApplicationLibCode/ProjectDataModel/RimEclipseResultCase.cpp:472
#22 0x00000000005c2c48 in caf::PdmChildArrayField<RimEclipseCase*>::deleteAllChildObjects (this=this@entry=0x39b68a0) at ../Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildArrayField.inl:164
#23 0x000000000078d4cc in RimEclipseCaseCollection::close (this=this@entry=0x39b6730) at ../ApplicationLibCode/ProjectDataModel/RimEclipseCaseCollection.cpp:70
#24 0x000000000078d52c in RimEclipseCaseCollection::~RimEclipseCaseCollection (this=0x39b6730, __in_chrg=<optimized out>) at ../ApplicationLibCode/ProjectDataModel/RimEclipseCaseCollection.cpp:60
#25 0x000000000078d6b9 in RimEclipseCaseCollection::~RimEclipseCaseCollection (this=0x39b6730, __in_chrg=<optimized out>) at ../ApplicationLibCode/ProjectDataModel/RimEclipseCaseCollection.cpp:61
#26 0x00000000007b11a1 in caf::PdmChildField<RimEclipseCaseCollection*>::~PdmChildField (this=0x39bd590, __in_chrg=<optimized out>) at ../Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildField.inl:79
#27 0x00000000007ada6c in RimOilField::~RimOilField (this=0x39bd420, __in_chrg=<optimized out>) at ../ApplicationLibCode/ProjectDataModel/RimOilField.cpp:85
#28 0x00000000007adba9 in RimOilField::~RimOilField (this=0x39bd420, __in_chrg=<optimized out>) at ../ApplicationLibCode/ProjectDataModel/RimOilField.cpp:87
#29 0x00000000007c7198 in caf::PdmChildArrayField<RimOilField*>::deleteAllChildObjects (this=this@entry=0x3881ac0) at ../Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafPdmChildArrayField.inl:164
#30 0x00000000007c23ab in RimProject::close (this=0x38818f0) at ../ApplicationLibCode/ProjectDataModel/RimProject.cpp:251
#31 0x000000000054537f in RiaApplication::closeProject (this=0x37643d0) at ../ApplicationLibCode/Application/RiaApplication.cpp:781
#32 0x0000000000553f0d in RiaGuiApplication::onLastWindowClosed (this=<optimized out>) at ../ApplicationLibCode/Application/RiaGuiApplication.cpp:1622
#33 0x00007ffff5af7bf7 in QMetaObject::activate(QObject*, int, int, void**) () from /lib64/libQt5Core.so.5
#34 0x00007ffff6378060 in QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) () from /lib64/libQt5Widgets.so.5
#35 0x00000000014629b1 in RicExitApplicationFeature::onActionTriggered (this=<optimized out>, isChecked=<optimized out>) at ../ApplicationLibCode/Commands/ApplicationCommands/RicExitApplicationFeature.cpp:64
#36 0x000000000205a6ee in caf::CmdFeature::actionTriggered (this=0x3aed460, isChecked=<optimized out>) at ../Fwk/AppFwk/cafCommand/cafCmdFeature.cpp:178
#37 0x00007ffff5af7bf7 in QMetaObject::activate(QObject*, int, int, void**) () from /lib64/libQt5Core.so.5
#38 0x00007ffff6338452 in QAction::triggered(bool) () from /lib64/libQt5Widgets.so.5
#39 0x00007ffff633ae2d in QAction::activate(QAction::ActionEvent) () from /lib64/libQt5Widgets.so.5
#40 0x00007ffff64b86f2 in QMenuPrivate::activateCausedStack(QVector<QPointer<QWidget> > const&, QAction*, QAction::ActionEvent, bool) () from /lib64/libQt5Widgets.so.5
#41 0x00007ffff64bf527 in QMenuPrivate::activateAction(QAction*, QAction::ActionEvent, bool) () from /lib64/libQt5Widgets.so.5
#42 0x00007ffff64c045b in QMenu::mouseReleaseEvent(QMouseEvent*) () from /lib64/libQt5Widgets.so.5
#43 0x00007ffff637d1c5 in QWidget::event(QEvent*) () from /lib64/libQt5Widgets.so.5
#44 0x00007ffff64c2893 in QMenu::event(QEvent*) () from /lib64/libQt5Widgets.so.5
#45 0x000000000114ba81 in RiuToolTipMenu::event (this=0x3ae27f0, e=0x7fffffffcfa0) at ../ApplicationLibCode/UserInterface/RiuToolTipMenu.cpp:56
#46 0x00007ffff633ed8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#47 0x00007ffff6346579 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#48 0x000000000055a8d4 in RiaGuiApplication::notify (this=0x37643c0, receiver=0x3ae27f0, event=0x7fffffffcfa0) at ../ApplicationLibCode/Application/RiaGuiApplication.cpp:1678
#49 0x00007ffff5acfbe6 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#50 0x00007ffff634541c in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /lib64/libQt5Widgets.so.5
#51 0x00007ffff6396444 in QWidgetWindow::handleMouseEvent(QMouseEvent*) () from /lib64/libQt5Widgets.so.5
#52 0x00007ffff6398d65 in QWidgetWindow::event(QEvent*) () from /lib64/libQt5Widgets.so.5
#53 0x00007ffff633ed8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#54 0x00007ffff6345f68 in QApplication::notify(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#55 0x000000000055a8d4 in RiaGuiApplication::notify (this=0x37643c0, receiver=0x4050d50, event=0x7fffffffd460) at ../ApplicationLibCode/Application/RiaGuiApplication.cpp:1678
#56 0x00007ffff5acfbe6 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#57 0x00007ffff5e2a1ed in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /lib64/libQt5Gui.so.5
#58 0x00007ffff5e2bf25 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /lib64/libQt5Gui.so.5
#59 0x00007ffff5e098db in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Gui.so.5
#60 0x00007fffd5c58950 in userEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib64/libQt5XcbQpa.so.5
#61 0x00007fffe9e3e099 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#62 0x00007fffe9e3e3f8 in g_main_context_iterate.isra.19 () from /lib64/libglib-2.0.so.0
#63 0x00007fffe9e3e4ac in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#64 0x00007ffff5b1e45c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#65 0x00007ffff5ace6db in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#66 0x00007ffff5ad6c04 in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#67 0x00000000004bc30f in main (argc=<optimized out>, argv=<optimized out>) at ../ApplicationExeCode/RiaMain.cpp:130

@kriben kriben merged commit d5b24f1 into dev Jan 26, 2021
@kriben kriben deleted the 7283-fix-crash-when-closing-last-window branch January 26, 2021 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when closing
2 participants