Skip to content

Commit 36a927c

Browse files
committed
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 bitcoin/bitcoin#12372 (comment) This reverts #11831 for now and hopefully restores the previous behaviour. Tree-SHA512: 8e1706afe90ddf2d972aca12c12d4cb2a9a4f38646c59c5466fe5a1a67361896b93c43917d5ac283841ee2bcc62e6bb8dc2bc81dea9129c899b354e9a4ef241b
2 parents 7217ea2 + 2222bf0 commit 36a927c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qt/bitcoin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,6 @@ void BitcoinApplication::createWindow(const NetworkStyle *networkStyle)
388388

389389
pollShutdownTimer = new QTimer(window);
390390
connect(pollShutdownTimer, SIGNAL(timeout()), window, SLOT(detectShutdown()));
391-
pollShutdownTimer->start(200);
392391
}
393392

394393
void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle)
@@ -515,6 +514,7 @@ void BitcoinApplication::initializeResult(bool success)
515514
window, SLOT(message(QString,QString,unsigned int)));
516515
QTimer::singleShot(100, paymentServer, SLOT(uiReady()));
517516
#endif
517+
pollShutdownTimer->start(200);
518518
} else {
519519
quit(); // Exit main loop
520520
}

0 commit comments

Comments
 (0)