
2010/10/5 Yana A Kireyonok (aka Iron Bug)
Greetings, ppl. I've got strange problems with the latest stable boost (1.44.0) and MSVS studios 2005 and 2010.
The first problem I got (it seems being not dependent on boost version) was the heap allocation exception when using mutex::scoped_lock to guard references to std::deque from different threads in multithreaded application.
According to your description, it seems that the issue you encountered is only a symptom of some memory-management issue in your code: you've got a damaged heap at the point where scoped_lock tries to allocate memory. You can use MSVC heap debugging facilities to try and spot the problem: http://msdn.microsoft.com/en-us/library/974tc9t1.aspx . Besides, it worth checking that you never delete objects through a pointer to base-case (directly or using smart-ptrs), if they don't have virtual d-tor. This kind of bug ruins the heap immediately, but it's quite hard to locate it using the above heap-debugging techniques.