From d9e2349f50e580a31006829b7a3af159d239ed7d Mon Sep 17 00:00:00 2001 From: Stefan Hundhammer Date: Mon, 8 Jan 2018 18:06:13 +0100 Subject: [PATCH 1/3] Prevent segfault upon exit if dialogs left over (bsc#1074596) --- src/YQUI.cc | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/YQUI.cc b/src/YQUI.cc index a34ff465..d20ffa97 100644 --- a/src/YQUI.cc +++ b/src/YQUI.cc @@ -339,7 +339,7 @@ void YQUI::processCommandLineArgs( int argc, char **argv ) YQUI::~YQUI() { - yuiDebug() <<"Closing down Qt UI." << std::endl; + yuiMilestone() <<"Closing down Qt UI." << std::endl; // Intentionally NOT calling dlclose() to libqt-mt // (see constructor for explanation) @@ -356,10 +356,20 @@ YQUI::~YQUI() void YQUI::uiThreadDestructor() { + yuiMilestone() <<"Destroying UI thread" << std::endl; + if ( qApp ) // might already be reset to 0 internally from Qt { - qApp->exit(); - delete qApp; + if ( YDialog::openDialogsCount() > 0 ) + { + yuiError() << YDialog::openDialogsCount() << " open dialogs left over" << endl; + yuiError() << "Topmost dialog:" << endl; + YDialog::topmostDialog()->dumpWidgetTree(); + } + + YDialog::deleteAllDialogs(); + qApp->exit(); + qApp->deleteLater(); } } From 0361c359010395dd924e8b9b5c03f5daa45b792b Mon Sep 17 00:00:00 2001 From: Stefan Hundhammer Date: Thu, 1 Feb 2018 14:00:42 +0100 Subject: [PATCH 2/3] Version bump and change log --- VERSION.cmake | 3 ++- package/libyui-qt-doc.spec | 2 +- package/libyui-qt.changes | 10 ++++++++++ package/libyui-qt.spec | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/VERSION.cmake b/VERSION.cmake index 117a1415..9d8ecb53 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -1,7 +1,8 @@ SET(VERSION_MAJOR "2") SET(VERSION_MINOR "46") SET(VERSION_PATCH "24") -SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${GIT_SHA1_VERSION}" ) +SET(VERSION_TWEAK "1") +SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_TWEAK}${GIT_SHA1_VERSION}" ) ##### This is need for the libyui core, ONLY. ##### These will be overridden from exports in LibyuiConfig.cmake diff --git a/package/libyui-qt-doc.spec b/package/libyui-qt-doc.spec index bfc6c11f..5b1f7ae6 100644 --- a/package/libyui-qt-doc.spec +++ b/package/libyui-qt-doc.spec @@ -20,7 +20,7 @@ %define so_version 7 Name: %{parent}-doc -Version: 2.46.24 +Version: 2.46.24.1 Release: 0 Source: %{parent}-%{version}.tar.bz2 diff --git a/package/libyui-qt.changes b/package/libyui-qt.changes index ffb70114..918341a2 100644 --- a/package/libyui-qt.changes +++ b/package/libyui-qt.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Feb 1 12:49:24 UTC 2018 - shundhammer@suse.com + +- Prevent segfault if an open dialog is left over: + Don't do anything widget related after the QApplication is + destroyed, in particular not deleting other widgets, even if + indirectly via YDialog::deleteAllDialogs() in YUI. + (bsc#1074596, bsc#1074596) +- 2.46.24.1 + ------------------------------------------------------------------- Mon Aug 22 12:47:32 UTC 2016 - jreidinger@suse.com diff --git a/package/libyui-qt.spec b/package/libyui-qt.spec index 7093a665..d8792b43 100644 --- a/package/libyui-qt.spec +++ b/package/libyui-qt.spec @@ -17,7 +17,7 @@ Name: libyui-qt -Version: 2.46.24 +Version: 2.46.24.1 Release: 0 Source: %{name}-%{version}.tar.bz2 From f883a028592b8380345a42e2882b0e4a7fbadf79 Mon Sep 17 00:00:00 2001 From: Stefan Hundhammer Date: Tue, 6 Feb 2018 14:17:50 +0100 Subject: [PATCH 3/3] Fixed duplicate bug no. in change log --- package/libyui-qt.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/libyui-qt.changes b/package/libyui-qt.changes index 918341a2..621e2491 100644 --- a/package/libyui-qt.changes +++ b/package/libyui-qt.changes @@ -5,7 +5,7 @@ Thu Feb 1 12:49:24 UTC 2018 - shundhammer@suse.com Don't do anything widget related after the QApplication is destroyed, in particular not deleting other widgets, even if indirectly via YDialog::deleteAllDialogs() in YUI. - (bsc#1074596, bsc#1074596) + (bsc#1074596, bsc#1077991) - 2.46.24.1 -------------------------------------------------------------------