id summary reporter owner description type status milestone component version severity resolution keywords cc 11403 exception_ptr.hpp causes crash when .NET tries to unload a DLL that uses boost onkelhotte@… Emil Dotchevski "Hello, I posted this on the gmane board and Emil Dotchevski said I should open a ticket for this. We are working with Visual Studio 2013 and have a plain c++ lib that uses boost. To test it, we wrote a (non clr) console program and a WPF GUI for further use. This WPF GUI contains a clr dll as a wrapper between the .NET world and the plain c++ libs. At startup, both console and WPF call some function pointers in _initterm in crt0dat.c, especially these two: [[BR]] dynamic initializer for 'boost::exception_detail::exception_ptr_static_exception_object::e''(void) [[BR]] dynamic initializer for 'boost::exception_detail::exception_ptr_static_exception_object::e''(void) The console terminates cleanly. But the GUI causes an exception in crtdll.c, _CRT_INIT, line 414: /* call the function, which can eventually change __onexitbegin and __onexitend */ [[BR]] (*function_to_call)(); The debugger says the value of *function_to_call is [[BR]] *function_to_call _t2m@???__Fep@?1???$get_static_exception_object@Ubad_exception_@exception_detail@boost@@@exception_detail@boost@@YA?AVexception_ptr@1@XZ@YAXXZ@?A0xd1be0c67@@YAXXZ and causes an unhandled exception at 0x74c7c42d (KernelBase.dll), The String binding is invalid. However, if I change (remove the static keyword) line 130 in exception_ptr.hpp from [[BR]] static exception_ptr ep(shared_ptr(new exception_detail::clone_impl(c))); to exception_ptr ep(shared_ptr(new exception_detail::clone_impl(c))); the GUI exits cleanly. Best regards,[[BR]] Markus Pieper" Bugs new To Be Determined exception Boost 1.56.0 Problem emildotchevski@…