Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
This will crash the application when false:
~CCheckQueue()
{
assert(m_worker_threads.empty());
}
Expected behaviour
Possibly do something more like this?
~CCheckQueue() {
try {
if (!m_worker_threads.empty()) {
// Attempt to stop worker threads if they haven't been stopped yet.
StopWorkerThreads();
}
} catch (const std::exception& e) {
LogPrint(BCLog::UTIL, "Exception in ~CCheckQueue: %s\n", e.what());
}
}
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