This can happen when LogHandler::flushRepetedMessages is called on
the main thread, while the application is printing messages on
a separate thread. The access to the _lastRepeatedMessage QHash was
not guarded.
I've added two mutexes to guard access to both the repeatedMessage
hashes/regexes and the onlyOnceMessages/regexes. This will unfortunately
incur a performance hit for frequent debug logging, but that's better
then crashing.
Also, I've added the ability to print threadIDs as well as Process ids.
This is helpful when debugging multi-threaded access to shared variables.