I added a CMutex object to some code I was writing. Occasionaly I get a Debug assertion on the
ASSERT(!m_bAcquired) in the CSingleLock::Lock() m_bAcquired is 0 when the error occurs and the class looks like everything is in order.
This happens intermittantly and sometimes clears up after a full rebuild. The assertion does not crash the program, if I click "ignore" it seems to function fine. The assertion always occers when called from the same function. The calls to Lock from other functions in the class work fine.
I HAVE verified that I am not forgetting to Unlock the Mutex.
A basic idea of what I'm doing...
cmutex = new CMutex();
singlelock = new CSingleLock(cmutex);
//this call to Lock always works
/// do some stuff
//if it fails, it is always from this function
/// do some other stuff
any help is appreciated