From 7e5c5d40d1da52db393c3783578dd92dba24647c Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 8 Feb 2018 08:50:47 +0100 Subject: [PATCH] Merge #12377: qt: Poll ShutdownTimer after init is done 2222bf0 qt: Poll ShutdownTimer after init is done (MarcoFalke) Pull request description: The shutdown process has started in `requestShutdown`, but initialize will happily continue with `initializeResult` and start threads late in the shutdown progess. Deleting this running thread will crash the application according to the qt docs: https://github.com/qt/qtbase/blob/e5033a5c9b769815112e922d0b224af860afd219/src/corelib/thread/qthread.cpp#L412-L415 Potential fix for https://github.com/bitcoin/bitcoin/issues/12372#issuecomment-363642332 This reverts #11831 for now and hopefully restores the previous behaviour. Tree-SHA512: 8e1706afe90ddf2d972aca12c12d4cb2a9a4f38646c59c5466fe5a1a67361896b93c43917d5ac283841ee2bcc62e6bb8dc2bc81dea9129c899b354e9a4ef241b --- src/qt/dash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/dash.cpp b/src/qt/dash.cpp index 41be48a1cf..bc420921cc 100644 --- a/src/qt/dash.cpp +++ b/src/qt/dash.cpp @@ -424,7 +424,6 @@ void BitcoinApplication::createWindow(const NetworkStyle *networkStyle) pollShutdownTimer = new QTimer(window); connect(pollShutdownTimer, SIGNAL(timeout()), window, SLOT(detectShutdown())); - pollShutdownTimer->start(200); } void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle) @@ -552,6 +551,7 @@ void BitcoinApplication::initializeResult(bool success) window, SLOT(message(QString,QString,unsigned int))); QTimer::singleShot(100, paymentServer, SLOT(uiReady())); #endif + pollShutdownTimer->start(200); } else { quit(); // Exit main loop }