Ported from https://github.com/bitcoin/bitcoin/issues/13217.
Steps to reproduce:
- Open QT console.
- Run gettxoutsetinfo.
- Exit the debug window (no blocking) -> exit the program (will block).
This is what is shown on Windows (10) for several minutes: https://i.imgur.com/AyexgkC.png