It looks like you have a threading problem or a wild dot somewhere else in your program. Try typing the value of the mutex pointer. Try another thread that simply locks the mutex and then prints the time to the log file and that the lock is successful and then unlocks the mutex. I suspect that the problem is not what you are looking for.
Also, as others have said, itβs best to create a very small test program that demonstrates the problem and publishes it here. Most likely, you will not be able to get this small program to demonstrate this error. Then slowly add all your source code to the small program until the error returns. If he returns, you now know what caused the problem. If he does not return, you are done.
source share