[signal,bind] upgrade problem from 1.33 to 1.34
Hi folks, I have a problem with upgrading from boost version 1.33 to 1.34. My code runs fine with 1.33, but when compiling and linking againt 1.34 I get the following runtime error (backtrace): <backtrace> #0 0x81d4c9b2 in void boost::function1<void, float, std::allocator<void>
::ass ign_to<boost::_bi::bind_t<void, boost::_mfi::mf1<void, fpCTPart, float>, boost:: _bi::list2<boost::_bi::value <fpCTPart*>, boost::arg<1> (*)()> > (boost::_bi::bi nd_t<void, boost::_mfi::mf1<void, fpCTPart, float>, boost::_bi::list2<boost::_bi ::value<fpCTPart*>, boost::arg<1> (*)()> >)::stored_vtable () from /home/david/eclipseM6/toolManagement/lib/libfpCTToolPack.so
#1 0xb4438841 in boost::function0<void, std::allocator<void> >::clear ( this=0xa1a03fc) at /usr/include/boost/function/function_template.hpp:388 #2 0xb4438879 in ~function0 (this=0xa1a03fc) at /usr/include/boost/function/function_template.hpp:313 #3 0xb443889d in ~function (this=0xa1a03fc) at /usr/include/boost/function/function_base.hpp:92 #4 0x81a34c39 in ~holder (this=0xa1a03f8) at /home/david/apps/boost_1_34_1/include/boost-1_34_1/boost/any.hpp:106 #5 0x81137b41 in boost::signals::detail::named_slot_map::insert () from /home/david/apps/boost_1_34_1/lib/libboost_signals-gcc41-1_34_1.so.1.34. 1 #6 0x8113b562 in boost::signals::detail::signal_base_impl::connect_slot () from /home/david/apps/boost_1_34_1/lib/libboost_signals-gcc41-1_34_1.so.1.34. 1 #7 0x81a36e58 in boost::signal0<void, boost::last_value<void>, int, std::less<i nt>, boost::function<void ()(), std::allocator<void> > >::connect ( this=0x82eac060, in_slot=@0xbfe145f0, at=boost::signals::at_back) ---Type <return> to continue, or q <return> to quit---bt at /home/david/apps/boost_1_34_1/include/boost-1_34_1/boost/signals/signal_template.hpp:286 #8 0x81b359f6 in fpCTPart::initPart (this=0x82eaa7f0) at /home/david/eclipseM6/toolManagement/extensions/fpCTToolPack/parts/src/fpCTPart.cpp:173 </backtrace> Line 173 in fpCTPart.cpp is: geomNode->sigPreLoad.connect(boost::bind(&fpCTPart::slotFilePreLoaded, this)); Are there any changes between these to versions in the bind/signal library? (Are they not backward compatible?) Thanks in advance. Regards, David
David Angelo:
Hi folks,
I have a problem with upgrading from boost version 1.33 to 1.34. My code runs fine with 1.33, but when compiling and linking againt 1.34 I get the following runtime error (backtrace):
<backtrace> #0 0x81d4c9b2 in void boost::function1<void, float, std::allocator<void>
::ass ign_to<boost::_bi::bind_t<void, boost::_mfi::mf1<void, fpCTPart, float>, boost:: _bi::list2<boost::_bi::value <fpCTPart*>, boost::arg<1> (*)()> > (boost::_bi::bi nd_t<void, boost::_mfi::mf1<void, fpCTPart, float>, boost::_bi::list2<boost::_bi ::value<fpCTPart*>, boost::arg<1> (*)()> >)::stored_vtable () from /home/david/eclipseM6/toolManagement/lib/libfpCTToolPack.so
Is your program multithreaded? The problem occurs in the initialization of the static variable 'stored_vtable' in function::assign_to. I don't see the same code in 1.33, so this has indeed been introduced with 1.34. This appears to be fixed in the current SVN trunk version, but the fix has not been officially released yet as far as I can see. You might try replacing function_template.hpp and function_base.hpp with their latest versions from http://svn.boost.org/trac/boost/browser/trunk/boost/function and see if it helps.
Hi Peter, On 10/14/07, Peter Dimov <pdimov@pdimov.com> wrote:
Is your program multithreaded? The problem occurs in the initialization of the static variable 'stored_vtable' in function::assign_to. I don't see the same code in 1.33, so this has indeed been introduced with 1.34. This appears to be fixed in the current SVN trunk version, but the fix has not been officially released yet as far as I can see.
You might try replacing function_template.hpp and function_base.hpp with their latest versions from
http://svn.boost.org/trac/boost/browser/trunk/boost/function
and see if it helps.
I used the boost svn trunk version, but unfortunately the problem remains. Are you aware of any other solution for this problem, or do I have to stick to version boost version 1.33? Thanks in advance. David
David Angelo:
You might try replacing function_template.hpp and function_base.hpp with their latest versions from
http://svn.boost.org/trac/boost/browser/trunk/boost/function
and see if it helps.
I used the boost svn trunk version, but unfortunately the problem remains. Are you aware of any other solution for this problem, or do I have to stick to version boost version 1.33?
I'm out of ideas, sorry. Doug Gregor, the author of boost::function, will need to look at this.
On Oct 14, 2007, at 7:29 AM, David Angelo wrote:
I have a problem with upgrading from boost version 1.33 to 1.34. My code runs fine with 1.33, but when compiling and linking againt 1.34 I get the following runtime error (backtrace):
<backtrace> #0 0x81d4c9b2 in void boost::function1<void, float, std::allocator<void> >::ass ign_to<boost::_bi::bind_t<void, boost::_mfi::mf1<void, fpCTPart, float>, boost:: _bi::list2<boost::_bi::value <fpCTPart*>, boost::arg<1> (*)()> > >(boost::_bi::bi nd_t<void, boost::_mfi::mf1<void, fpCTPart, float>, boost::_bi::list2<boost::_bi ::value<fpCTPart*>, boost::arg<1> (*)()> >)::stored_vtable () from /home/david/eclipseM6/toolManagement/lib/libfpCTToolPack.so
#1 0xb4438841 in boost::function0<void, std::allocator<void>
::clear ( this=0xa1a03fc) at /usr/include/boost/function/ function_template.hpp:388 [snip] </backtrace>
How odd. If you trap this, what does the boost::function1 object contain? Is the vtable pointer NULL, for example? A few more questions: - Which compiler/platform? - Is this multi-threaded code? - Is there any way for me to reproduce this?
Are there any changes between these to versions in the bind/signal library? (Are they not backward compatible?)
There were changes to Function (which Signals relies on), but they should be backward-compatible. This definitely looks like a bug in Function. - Doug
participants (3)
-
David Angelo
-
Doug Gregor
-
Peter Dimov