Boost.Thread throws bad_alloc exception in VS2010

Posted by the_drow on Stack Overflow See other posts from Stack Overflow or by the_drow
Published on 2010-05-26T16:01:21Z Indexed on 2010/05/27 1:41 UTC
Read the original article Hit count: 554

Filed under:
|
|
|

Upon including <boost/thread.hpp> I get this exception:

First-chance exception at 0x7c812afb in CSF.exe: Microsoft C++ exception: 
boost::exception_detail::clone_impl<boost::exception_detail::bad_alloc_> at memory location 0x0012fc3c..
First-chance exception at 0x7c812afb in CSF.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000..

I can't catch it, breaking at the memory location brings me to kernel32.dll and at this point I cannot say what's going on but it appears that the exception is thrown after the program ends and VS is capable of catching it.

The testcase:

#include <boost/thread.hpp>

int main()
{
   return 0;
}

© Stack Overflow or respective owner

Related posts about c++

Related posts about boost