Peter Dimov wrote:
the program hangs. Turning on CodeGuard shows a similar problem to that above. The object was allocated with a size of 12 bytes, but code is trying to access byte 16 in the object (I guess this is a similar alignment problem). The callstack is
0041E44E boost::counted_base::dispose(this=:00C04360)
counted_base::dispose() is an empty function, so this looks like a CodeGuard false alarm.
One possible reason for the real problem is runtime library mismatch between the signals library and your executable. counted_base contains a mutex in multithreaded builds.
You may well be correct here. Stepping through the code with the debug version of the built library, shows that in slot.cpp line 44 scoped_connection safe_connection(watch_bound_objects); This creates a shared_count. The shared_count doesn't create a mutex object (so I assume the library is being built without BOOST_HAS_THREADS. When releasing the safe_connection, releasing the shared_count shows it to have a mutex (I guess because my program has multi-threading enabled. Question is: How do I force BOOST_HAS_THREADS with bjam to build the library with multi-threading? I currently build the libraries using bjam -sTOOLS=borland Hope someone can help with this? Thanks Russell