Segmentation fault during creating an executionEngine (caused by boost??)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">Hi,<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>I rebuilded some old code with a new boost version (1.38.0).<br>
When executing the old code I get a segmentation fault which according to gdb (see error below) is caused during creating an executionEngine for my component (when calling AddMethod ....).<br>
Any idea what to do?<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Tinne<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>gdb ./testVBClusters<br>
GNU gdb 6.8-debian<br>
Copyright (C) 2008 Free Software Foundation, Inc.<br>
License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;<br>
This is free software: you are free to change and redistribute it.<br>
There is NO WARRANTY, to the extent permitted by law. Type "show copying"<br>
and "show warranty" for details.<br>
This GDB was configured as "x86_64-linux-gnu"...<br>
(gdb) run<br>
Starting program: /media/disk-1/orocos-apps/MTTL_MPF/build/src/testVBClusters<br>
[Thread debugging using libthread_db enabled]<br>
0.001 [ Info ][main()] /media/disk-1/orocos-apps/MTTL_MPF/build/src/testVBClusters manually raises LogLevel to 'Info' (5). See also file 'orocos.log'.<br>
0.001 [ Debug ][main()] /media/disk-1/orocos-apps/MTTL_MPF/build/src/testVBClusters manually raises LogLevel to 'Debug' . See also file 'orocos.log'.<br>
0.001 [ Info ][main()] **** Creating the 'VBClusters' component ****<br>
0.001 [ Debug ][ExecutionEngine] Creating ExecutionEngine for VBClusters<br>
[New Thread 0x7f11928fb6f0 (LWP 26445)]<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Program received signal SIGSEGV, Segmentation fault.<br>
[Switching to Thread 0x7f11928fb6f0 (LWP 26445)]<br>
0x00007f1190e91d53 in boost::detail::function::functor_manager&lt;boost::_bi::bind_t&lt;boost::_bi::unspecified, boost::_mfi::mf0&lt;bool, RTT::TaskCore&gt;, boost::_bi::list1&lt;boost::_bi::value&lt;RTT::TaskContext*&gt; &gt; &gt;, std::allocator&lt;void&gt; &gt;::manage () from /usr/local/lib/liborocos-rtt-gnulinux.so.1.6<br>
Current language: auto; currently asm<br>
(gdb) bt<br>
#0 0x00007f1190e91d53 in boost::detail::function::functor_manager&lt;boost::_bi::bind_t&lt;boost::_bi::unspecified, boost::_mfi::mf0&lt;bool, RTT::TaskCore&gt;, boost::_bi::list1&lt;boost::_bi::value&lt;RTT::TaskContext*&gt; &gt; &gt;, std::allocator&lt;void&gt; &gt;::manage () from /usr/local/lib/liborocos-rtt-gnulinux.so.1.6<br>
#1 0x000000000047d921 in RTT::MethodRepository::addMethod&lt;RTT::Method&lt;bool ()()&gt; &gt; ()<br>
#2 0x00007f1190e8e51d in RTT::TaskContext::setup () from /usr/local/lib/liborocos-rtt-gnulinux.so.1.6<br>
#3 0x00007f1190e90cf8 in RTT::TaskContext::TaskContext () from /usr/local/lib/liborocos-rtt-gnulinux.so.1.6<br>
#4 0x000000000044f964 in OCL::VBClusters::VBClusters ()<br>
#5 0x0000000000446aba in ORO_main_impl ()<br>
#6 0x0000000000446d78 in main ()<br>
(gdb)<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>gdb ./testVBClusters<br>
GNU gdb 6.8-debian<br>
Copyright (C) 2008 Free Software Foundation, Inc.<br>
License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;<br>
This is free software: you are free to change and redistribute it.<br>
There is NO WARRANTY, to the extent permitted by law. Type "show copying"<br>
and "show warranty" for details.<br>
This GDB was configured as "x86_64-linux-gnu"...<br>
(gdb) run<br>
Starting program: /media/disk-1/orocos-apps/MTTL_MPF/build/src/testVBClusters<br>
[Thread debugging using libthread_db enabled]<br>
0.000 [ Info ][main()] /media/disk-1/orocos-apps/MTTL_MPF/build/src/testVBClusters manually raises LogLevel to 'Info' (5). See also file 'orocos.log'.<br>
0.001 [ Info ][main()] **** Creating the 'VBClusters' component ****<br>
[New Thread 0x7f85200de6f0 (LWP 24526)]<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Program received signal SIGSEGV, Segmentation fault.<br>
[Switching to Thread 0x7f85200de6f0 (LWP 24526)]<br>
0x00007f851e674d53 in boost::detail::function::functor_manager&lt;boost::_bi::bind_t&lt;boost::_bi::unspecified, boost::_mfi::mf0&lt;bool, RTT::TaskCore&gt;, boost::_bi::list1&lt;boost::_bi::value&lt;RTT::TaskContext*&gt; &gt; &gt;, std::allocator&lt;void&gt; &gt;::manage () from /usr/local/lib/liborocos-rtt-gnulinux.so.1.6<br>
Current language: auto; currently asm<br>
(gdb) bt<br>
#0 0x00007f851e674d53 in boost::detail::function::functor_manager&lt;boost::_bi::bind_t&lt;boost::_bi::unspecified, boost::_mfi::mf0&lt;bool, RTT::TaskCore&gt;, boost::_bi::list1&lt;boost::_bi::value&lt;RTT::TaskContext*&gt; &gt; &gt;, std::allocator&lt;void&gt; &gt;::manage () from /usr/local/lib/liborocos-rtt-gnulinux.so.1.6<br>
#1 0x000000000047ea81 in RTT::MethodRepository::addMethod&lt;RTT::Method&lt;bool ()()&gt; &gt; ()<br>
#2 0x00007f851e67151d in RTT::TaskContext::setup () from /usr/local/lib/liborocos-rtt-gnulinux.so.1.6<br>
#3 0x00007f851e673cf8 in RTT::TaskContext::TaskContext () from /usr/local/lib/liborocos-rtt-gnulinux.so.1.6<br>
#4 0x0000000000450161 in OCL::VBClusters::VBClusters ()<br>
#5 0x0000000000449143 in ORO_main_impl ()<br>
#6 0x0000000000449408 in main ()<br>
(gdb) q<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p></body></html>

Segmentation fault during creating an executionEngine (caused by

On Thursday 19 February 2009 15:54:22 Tinne De Laet wrote:
> Hi,
>
> I rebuilded some old code with a new boost version (1.38.0).

Did you also rebuild the RTT and OCL with boost 1.38.0 ?

> When executing the old code I get a segmentation fault which according to
> gdb (see error below) is caused during creating an executionEngine for my
> component (when calling AddMethod ....).
> Any idea what to do?

Make sure you started from a clean build, both of RTT and your application
(such that they use the same version of boost headers). Then run your
application with valgrind and repost the output.

Peter