From e1c370a9a2eb040ae031cc84703a2388ca3736a9 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Fri, 8 May 2015 14:02:44 +0200 Subject: [PATCH] Fix startup hang by removing QSettings lock file. #3175 In some situations the .lock file would stay around and cause subsequent starts of the client to get stuck before showing the ui. --- src/gui/application.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/application.cpp b/src/gui/application.cpp index 2ed510cbe5..911fe7e346 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -110,6 +110,13 @@ Application::Application(int &argc, char **argv) : if (isRunning()) return; + // Workaround for QTBUG-44576: Make sure a stale QSettings lock file + // is deleted. + { + QString lockFilePath = ConfigFile().configFile() + QLatin1String(".lock"); + QLockFile(lockFilePath).removeStaleLockFile(); + } + #if defined(WITH_CRASHREPORTER) if (ConfigFile().crashReporter()) _crashHandler.reset(new CrashReporter::Handler( QDir::tempPath(), true, CRASHREPORTER_EXECUTABLE ));