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

Prevent segfault upon exit when a dialog remains open (SLE-12 SP2) #79

Merged
merged 3 commits into from
Feb 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion VERSION.cmake
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion package/libyui-qt-doc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 10 additions & 0 deletions package/libyui-qt.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Thu Feb 1 12:49:24 UTC 2018 - [email protected]

- 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#1077991)
- 2.46.24.1

-------------------------------------------------------------------
Mon Aug 22 12:47:32 UTC 2016 - [email protected]

Expand Down
2 changes: 1 addition & 1 deletion package/libyui-qt.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: libyui-qt
Version: 2.46.24
Version: 2.46.24.1
Release: 0
Source: %{name}-%{version}.tar.bz2

Expand Down
16 changes: 13 additions & 3 deletions src/YQUI.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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();
}
}

Expand Down