summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/packagemanagercore.cpp
diff options
context:
space:
mode:
authorFrerich Raabe <raabe@froglogic.com>2015-11-23 14:37:29 +0100
committerKarsten Heimrich <karsten.heimrich@theqtcompany.com>2015-12-08 13:06:08 +0000
commit85ce71449b9ec80f636054ef447a21716cf5ab7a (patch)
tree5e7c4560b906c1d8871120433cb991d74c806afb /src/libs/installer/packagemanagercore.cpp
parentf36065651341dcde8296135e020de9279f90f3ec (diff)
Fixed occasional crash on Windows when terminating installer
The static RemoteClient object (defined in RemoteClient::instance()) which gets destroyed at the very end of the process lifetime would -- as part of its constructor -- execute the RemoteClientPrivate destructor. The RemoteClientPrivate destructor did non-trivial work though, trying to shut down the connection which involves accessing the LocalServer instance. Executing this code at the very end of the process lifetime would sometimes cause a crash on Windows with a back trace into the QMutex guts. Let's fix this by getting more control over the destruction order; the RemoteClient instance is no longer a static object but allocated dynamically. Callers can explicitly call 'destroy' to dispose of the instance as part of their shutdown routine. Change-Id: Ie6773ccc0276ad6285919e57e9ed190bab02be3f Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/packagemanagercore.cpp')
-rw-r--r--src/libs/installer/packagemanagercore.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp
index 89a90d343..8066ff308 100644
--- a/src/libs/installer/packagemanagercore.cpp
+++ b/src/libs/installer/packagemanagercore.cpp
@@ -867,7 +867,7 @@ PackageManagerCore::~PackageManagerCore()
delete d;
RemoteClient::instance().setActive(false);
- RemoteClient::instance().shutdown();
+ RemoteClient::instance().destroy();
QMutexLocker _(globalVirtualComponentsFontMutex());
delete sVirtualComponentsFont;