Boost logo

Boost Users :

Subject: [Boost-users] boost exception question when threading library header is included.
From: Robert Ramey (ramey_at_[hidden])
Date: 2011-06-10 02:25:51


I am building a small ap to test the ASIO library. I run my test ap and
things run as expected.

But when I set my IDE options (MSVC 8.0) to trap when an exception is
thrown, I get
an exception thrown before main(.. is invoked. The call stack looks like:

  msvcr90d.dll!_CxxThrowException(void * pExceptionObject=0x0012fc3c, const
_s__ThrowInfo * pThrowInfo=0x0047f944) Line 161 C++

  time_pair.exe!boost::copy_exception<boost::exception_detail::bad_alloc_>(const
boost::exception_detail::bad_alloc_ & e={...}) Line 47 C++

  time_pair.exe!boost::exception_detail::get_bad_alloc<42>() Line 80 + 0x9f
bytes C++

  time_pair.exe!`dynamic initializer for
'boost::exception_detail::exception_ptr_bad_alloc<42>::e''() Line 94 + 0x28
bytes C++

  msvcr90d.dll!_initterm(void (void)* * pfbegin=0x004743c4, void (void)* *
pfend=0x00474758) Line 903 C

  time_pair.exe!__tmainCRTStartup() Line 497 + 0xf bytes C

  time_pair.exe!mainCRTStartup() Line 399 C

this seems to point an attempt to copy something non_copyable in the
boost.exception library.

Can anyone help me understand what's going on here and what I should do
about it?

Here is a small test which you can use to demonstrate the problem

#include <boost/thread.hpp>
int main(int argc, char * argv[]){
    return 0;
}

Robert Ramey


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net