11-12-2013, 06:25 AM
Deadlocks are easy. They mostly get detected in the cDeadlockDetect class, which breaks into the debugger, and then you can examine each thread whether it's waiting for a critical section (has EnterCriticalSection in its call stack); then you can switch to that stack level and examine the critical section, you can then see which other thread currently owns the critical section, through cCriticalSection's m_OwningThreadID. This way you can trace what is holding what.
Your problem is that you're calling m_OwnerObject->IsDestroyed() although you haven't checked if it's not NULL - if the name is (non-)empty but the object is NULL, the function is called on a NULL object.
Your problem is that you're calling m_OwnerObject->IsDestroyed() although you haven't checked if it's not NULL - if the name is (non-)empty but the object is NULL, the function is called on a NULL object.