Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
This will crash the application when false:
0 ~CCheckQueue()
1 {
2 assert(m_worker_threads.empty());
3 }
Expected behaviour
Possibly do something more like this?
0
1 ~CCheckQueue() {
2 try {
3 if (!m_worker_threads.empty()) {
4 // Attempt to stop worker threads if they haven't been stopped yet.
5 StopWorkerThreads();
6 }
7 } catch (const std::exception& e) {
8 LogPrint(BCLog::UTIL, "Exception in ~CCheckQueue: %s\n", e.what());
9 }
10 }
I am not very familiar with the code base. This just looked weird to me.
Steps to reproduce
Open settings in bitcoin-qt, adjust and save.
Relevant log output
Crash with:
assertion failure in the file checkqueue.h at line 198. The assertion that failed is m_worker_threads.empty()
How did you obtain Bitcoin Core
Compiled from source
What version of Bitcoin Core are you using?
26.1
Operating system and version
Windows, MinGW64 (using portable_endian.h)
Machine specifications
No response