HomePhabricator

qt: Fix random segfault when closing "Choose data directory" dialog

Description

qt: Fix random segfault when closing "Choose data directory" dialog

The pickDataDirectory() function was calling exit(0) to quit
the application when the user closes the dialog without choosing
a data directory.

This is a bad idea because a background thread is created (to
check free space on the drive of the currently selected datadir).
The thread is not stopped and unwound properly, resulting in a potential
race condition somewhere deep in Qt.

So replace the exit() by a boolean return value, and let the
stack unwind normally.

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Aug 18 2016, 14:58
deadalnixPushed on May 14 2017, 22:04
Parents
rABC8250de13587e: Merge #8453: Bring secp256k1 subtree up to date with master
Branches
Unknown
Tags
Unknown

Event Timeline

Wladimir J. van der Laan <laanwj@gmail.com> committed rABCb4a9aa511c95: qt: Fix random segfault when closing "Choose data directory" dialog (authored by Wladimir J. van der Laan <laanwj@gmail.com>).Aug 18 2016, 14:58