Maybe the problem is something like what was described here - https://stackoverflow.com/questions/30741114/stdmutexlock-fails-on-windows-error-code-3
I am getting a debug abort when I try to use std::lock_guard
Friesen, Stanley
21
Reputation points
I am unable to determine the cause of a debug abort in the std::lock_guard constructor. _Mtx_lock() is returning a value of 3. I have no idea what that means.
In the class definition I have a member declared:
std::mutex _mutex;
In a member function I have:
std::lock_guard lck(_mutex);
I have verified that the constructor for my class is being called, so the mutex should have been initialized.
How do I determine how to fix my code?
Developer technologies | C++
3,973 questions