segfault using rtt_dot_service

Hi,

I wanted to use the rtt_dot_service to take a picture of my setup, but
it decided to die:

$ rosrun ocl deployer-gnulinux
0.218 [ Warning][DeploymentComponent::import] The ROS package 'ocl' in
'/home/mk/src/stacks/orocos_toolchain/ocl' nor its dependencies
contained a lib/orocos directory. I'll look in the RTT_COMPONENT_PATH
next.
Switched to : Deployer

This console reader allows you to browse and manipulate
TaskContexts.
You can type in an operation, expression, create or change
variables.
(type 'help' for instructions and 'ls' for context info)

TAB completion and HISTORY is available ('bash' like)

Use 'Ctrl-D' or type 'quit' to exit this program.

Deployer [S]> import("rtt_dot_service")
= true

Deployer [S]> loadService ("Deployer", "dot")
deployer-gnulinux: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T*
boost::shared_ptr< <template-parameter-1-1> >::operator->() const [with T = RTT::internal::LocalOperationCaller<std::basic_string Aborted (core dumped)

Fireing up gdb yields the following:

Core was generated by `/home/mk/src/stacks/orocos_toolchain/ocl/bin/deployer-gnulinux'.
Program terminated with signal 6, Aborted.
#0 0x00007f0c56d68ba5 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
in ../nptl/sysdeps/unix/sysv/linux/raise.c
(gdb) where
#0 0x00007f0c56d68ba5 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007f0c56d6c6b0 in abort () at abort.c:92
#2 0x00007f0c56d61a71 in __assert_fail (assertion=0x7f0c54ecbcd0 "px != 0", file=<value optimized out>, line=418,
function=0x7f0c54efcc80 "T* boost::shared_ptr< <template-parameter-1-1> >::operator->() const [with T = RTT::internal::LocalOperationCaller<std::basic_string #3 0x00007f0c54e364b0 in operator-> (this=0x0) at /usr/include/boost/smart_ptr/shared_ptr.hpp:418
#4 RTT::Operation<std::basic_string #5 0x00007f0c5a284c27 in setOwner (this=0xf02e70, op=...) at /home/mk/src/stacks/orocos_toolchain/rtt/rtt/internal/../base/OperationBase.hpp:118
#6 RTT::Service::addLocalOperation (this=0xf02e70, op=...) at /home/mk/src/stacks/orocos_toolchain/rtt/rtt/Service.cpp:184
#7 0x00007f0c4f7b228e in RTT::Service::addOperation<std::basic_string op=...) at /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/include/rtt/plugin/../Service.hpp:299
#8 0x00007f0c4f7b12d5 in RTT::Service::addOperation<std::string (Dot::*)(), Dot> (this=0xf02e70, name=..., func=(std::string (Dot::*)(Dot *)) 0x7f0c4f7acf7a <Dot::getOwnerName()>, serv=0xf02e70, et=RTT::ClientThread)
at /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/include/rtt/plugin/../Service.hpp:342
#9 0x00007f0c4f7ac71f in Dot::Dot (this=0xf02e70, owner=0x7fff3272dec0) at /home/mk/src/stacks/rtt_dot_service/src/rtt_dot_service.cpp:49
#10 0x00007f0c4f7afbb1 in loadRTTPlugin (tc=0x7fff3272dec0) at /home/mk/src/stacks/rtt_dot_service/src/rtt_dot_service.cpp:217
#11 0x00007f0c5a2dfb5c in RTT::plugin::PluginLoader::loadService (this=0xe888c0, servicename=..., tc=0x7fff3272dec0) at /home/mk/src/stacks/orocos_toolchain/rtt/rtt/plugin/PluginLoader.cpp:323
#12 0x00007f0c59a03adb in OCL::DeploymentComponent::loadService (this=<value optimized out>, name=<value optimized out>, type=...) at /home/mk/src/stacks/orocos_toolchain/ocl/deployment/DeploymentComponent.cpp:1509
#13 0x00007f0c59a41df4 in operator() (this=<value optimized out>, t1=..., t2=...) at /usr/include/boost/function/function_template.hpp:1013
#14 call_impl<std::string const&, std::string const&> (this=<value optimized out>, t1=..., t2=...) at /home/mk/src/stacks/orocos_toolchain/install/include/rtt/internal/../internal/LocalOperationCaller.hpp:386
#15 RTT::internal::InvokerImpl<2, bool(const std::string&, const std::string&), RTT::internal::LocalOperationCallerImpl<bool(const std::string&, const std::string&)> >::call(const std::string &, const std::string &) (
this=<value optimized out>, t1=..., t2=...) at /home/mk/src/stacks/orocos_toolchain/install/include/rtt/internal/../internal/Invoker.hpp:125
#16 0x00007f0c59a46571 in operator()<bool, RTT::internal::FusedMCallDataSource::evaluate::iret (*)(bool (RTT::base::OperationCallerBase #17 operator() (this=0xf02a90) at /usr/include/boost/bind/bind_template.hpp:20
#18 exec<boost::_bi::bind_t #19 RTT::internal::FusedMCallDataSource<bool(const std::string&, const std::string&)>::evaluate(void) const (this=0xf02a90) at /home/mk/src/stacks/orocos_toolchain/install/include/rtt/internal/FusedFunctorDataSource.hpp:298
#20 0x00007f0c59d03c5f in OCL::TaskBrowser::doPrint (this=0x7fff3272db20, ds=<value optimized out>, recurse=true) at /home/mk/src/stacks/orocos_toolchain/ocl/taskbrowser/TaskBrowser.cpp:1539
#21 0x00007f0c59d047ca in OCL::TaskBrowser::printResult (this=0x7fff3272db20, ds=0xf02a90, recurse=<value optimized out>) at /home/mk/src/stacks/orocos_toolchain/ocl/taskbrowser/TaskBrowser.cpp:1497
#22 0x00007f0c59d14cfb in OCL::TaskBrowser::evalCommand (this=0x7fff3272db20, comm=...) at /home/mk/src/stacks/orocos_toolchain/ocl/taskbrowser/TaskBrowser.cpp:1457
#23 0x00007f0c59d16747 in OCL::TaskBrowser::loop (this=<value optimized out>) at /home/mk/src/stacks/orocos_toolchain/ocl/taskbrowser/TaskBrowser.cpp:858
#24 0x000000000040c28b in main (argc=<value optimized out>, argv=<value optimized out>) at /home/mk/src/stacks/orocos_toolchain/ocl/bin/deployer.cpp:168
(gdb)

All top of git, compiled by myself.
Ubuntu. Boost 1.42.0-3ubuntu1.

Any ideas?
Markus

segfault using rtt_dot_service

On Tuesday 18 October 2011 22:11:05 Markus Klotzbuecher wrote:
> Hi,
>
> I wanted to use the rtt_dot_service to take a picture of my setup, but
> it decided to die:
>
> $ rosrun ocl deployer-gnulinux
> 0.218 [ Warning][DeploymentComponent::import] The ROS package 'ocl' in
> '/home/mk/src/stacks/orocos_toolchain/ocl' nor its dependencies
> contained a lib/orocos directory. I'll look in the RTT_COMPONENT_PATH
> next.
> Switched to : Deployer
>
> This console reader allows you to browse and manipulate
> TaskContexts.
> You can type in an operation, expression, create or change
> variables.
> (type 'help' for instructions and 'ls' for context info)
>
> TAB completion and HISTORY is available ('bash' like)
>
> Use 'Ctrl-D' or type 'quit' to exit this program.
>
> Deployer [S]> import("rtt_dot_service")
> = true
>
> Deployer [S]> loadService ("Deployer", "dot")
> deployer-gnulinux: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T*
> boost::shared_ptr< <template-parameter-1-1> >::operator->() const [with T =
> RTT::internal::LocalOperationCaller<std::basic_string > std::char_traits<char>, std::allocator<char> >()>]: Assertion `px != 0'
> failed. Aborted (core dumped)
>
> Fireing up gdb yields the following:
>
>
> Core was generated by
> `/home/mk/src/stacks/orocos_toolchain/ocl/bin/deployer-gnulinux'. Program
> terminated with signal 6, Aborted.
> #0 0x00007f0c56d68ba5 in raise (sig=<value optimized out>) at
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64
> ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. in
> ../nptl/sysdeps/unix/sysv/linux/raise.c
> (gdb) where
> #0 0x00007f0c56d68ba5 in raise (sig=<value optimized out>) at
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00007f0c56d6c6b0 in abort
> () at abort.c:92
> #2 0x00007f0c56d61a71 in __assert_fail (assertion=0x7f0c54ecbcd0 "px !=
> 0", file=<value optimized out>, line=418, function=0x7f0c54efcc80 "T*
> boost::shared_ptr< <template-parameter-1-1> >::operator->() const [with T
> = RTT::internal::LocalOperationCaller<std::basic_string > std::char_traits<char>, std::allocator<char> >()>]") at assert.c:81 #3
> 0x00007f0c54e364b0 in operator-> (this=0x0) at
> /usr/include/boost/smart_ptr/shared_ptr.hpp:418 #4
> RTT::Operation<std::basic_string > std::allocator<char> >()>::ownerUpdated(void) (this=0x0) at
> /home/mk/src/stacks/orocos_toolchain/rtt/rtt/typekit/../types/../internal/
> ../Operation.hpp:221 #5 0x00007f0c5a284c27 in setOwner (this=0xf02e70,
> op=...) at
> /home/mk/src/stacks/orocos_toolchain/rtt/rtt/internal/../base/OperationBas
> e.hpp:118 #6 RTT::Service::addLocalOperation (this=0xf02e70, op=...) at
> /home/mk/src/stacks/orocos_toolchain/rtt/rtt/Service.cpp:184 #7
> 0x00007f0c4f7b228e in RTT::Service::addOperation<std::basic_string > std::char_traits<char>, std::allocator<char>
> >()>(RTT::Operation<std::basic_string > std::allocator<char> >()> &) (this=0xf02e70, op=...) at
> /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/include/rtt/p
> lugin/../Service.hpp:299 #8 0x00007f0c4f7b12d5 in
> RTT::Service::addOperation<std::string (Dot::*)(), Dot> (this=0xf02e70,
> name=..., func=(std::string (Dot::*)(Dot *)) 0x7f0c4f7acf7a
> <Dot::getOwnerName()>, serv=0xf02e70, et=RTT::ClientThread) at
> /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/include/rtt/p
> lugin/../Service.hpp:342 #9 0x00007f0c4f7ac71f in Dot::Dot (this=0xf02e70,
> owner=0x7fff3272dec0) at
> /home/mk/src/stacks/rtt_dot_service/src/rtt_dot_service.cpp:49 #10
> 0x00007f0c4f7afbb1 in loadRTTPlugin (tc=0x7fff3272dec0) at
> /home/mk/src/stacks/rtt_dot_service/src/rtt_dot_service.cpp:217 #11
> 0x00007f0c5a2dfb5c in RTT::plugin::PluginLoader::loadService
> (this=0xe888c0, servicename=..., tc=0x7fff3272dec0) at
> /home/mk/src/stacks/orocos_toolchain/rtt/rtt/plugin/PluginLoader.cpp:323
> #12 0x00007f0c59a03adb in OCL::DeploymentComponent::loadService
> (this=<value optimized out>, name=<value optimized out>, type=...) at
> /home/mk/src/stacks/orocos_toolchain/ocl/deployment/DeploymentComponent.cp
> p:1509 #13 0x00007f0c59a41df4 in operator() (this=<value optimized out>,
> t1=..., t2=...) at /usr/include/boost/function/function_template.hpp:1013
> #14 call_impl<std::string const&, std::string const&> (this=<value
> optimized out>, t1=..., t2=...) at
> /home/mk/src/stacks/orocos_toolchain/install/include/rtt/internal/../inter
> nal/LocalOperationCaller.hpp:386 #15 RTT::internal::InvokerImpl<2,
> bool(const std::string&, const std::string&),
> RTT::internal::LocalOperationCallerImpl<bool(const std::string&, const
> std::string&)> >::call(const std::string &, const std::string &) (
> this=<value optimized out>, t1=..., t2=...) at
> /home/mk/src/stacks/orocos_toolchain/install/include/rtt/internal/../inter
> nal/Invoker.hpp:125 #16 0x00007f0c59a46571 in operator()<bool,
> RTT::internal::FusedMCallDataSource::evaluate::iret (*)(bool
> (RTT::base::OperationCallerBase<bool(const std::string&, const
> std::string&)>::*)(const std::string&, const std::string&), const
> RTT::internal::FusedMCallDataSource<Signature>::evaluate() const [with
> Signature = bool(const std::string&, const std::string&)]::arg_type&),
> boost::_bi::list0> (this=0xf02a90) at /usr/include/boost/bind/bind.hpp:303
> #17 operator() (this=0xf02a90) at
> /usr/include/boost/bind/bind_template.hpp:20 #18
> exec<boost::_bi::bind_t > RTT::internal::FusedMCallDataSource::evaluate::iret (*)(bool
> (RTT::base::OperationCallerBase<bool(const std::string&, const
> std::string&)>::*)(const std::string&, const std::string&), const
> RTT::internal::FusedMCallDataSource<Signature>::evaluate() const [with
> Signature = bool(const std::string&, const std::string&)]::arg_type&),
> boost::_bi::list2<boost::_bi::value > (RTT::internal::InvokerBaseImpl<2, bool(const std::string&, const
> std::string&)>::*)(const std::string&, const std::string&)>,
> boost::_bi::value<boost::fusion::cons > const std::string&, const std::string&)>*, boost::fusion::cons<const
> std::string&, boost::fusion::cons<const std::string&, boost::fusion::nil>
> > > > > > > (this=0xf02a90) at
> /home/mk/src/stacks/orocos_toolchain/install/include/rtt/internal/BindStor
> age.hpp:123 #19 RTT::internal::FusedMCallDataSource<bool(const
> std::string&, const std::string&)>::evaluate(void) const (this=0xf02a90)
> at
> /home/mk/src/stacks/orocos_toolchain/install/include/rtt/internal/FusedFun
> ctorDataSource.hpp:298 #20 0x00007f0c59d03c5f in OCL::TaskBrowser::doPrint
> (this=0x7fff3272db20, ds=<value optimized out>, recurse=true) at
> /home/mk/src/stacks/orocos_toolchain/ocl/taskbrowser/TaskBrowser.cpp:1539
> #21 0x00007f0c59d047ca in OCL::TaskBrowser::printResult
> (this=0x7fff3272db20, ds=0xf02a90, recurse=<value optimized out>) at
> /home/mk/src/stacks/orocos_toolchain/ocl/taskbrowser/TaskBrowser.cpp:1497
> #22 0x00007f0c59d14cfb in OCL::TaskBrowser::evalCommand
> (this=0x7fff3272db20, comm=...) at
> /home/mk/src/stacks/orocos_toolchain/ocl/taskbrowser/TaskBrowser.cpp:1457
> #23 0x00007f0c59d16747 in OCL::TaskBrowser::loop (this=<value optimized
> out>) at
> /home/mk/src/stacks/orocos_toolchain/ocl/taskbrowser/TaskBrowser.cpp:858
> #24 0x000000000040c28b in main (argc=<value optimized out>, argv=<value
> optimized out>) at
> /home/mk/src/stacks/orocos_toolchain/ocl/bin/deployer.cpp:168 (gdb)
>

Thanks for the back-trace. It seems dot service is trying to add an operation
which has not been initialized. I have pushed a patch to master/2.5 to detect
this and refuse to add it with an error message.

> All top of git, compiled by myself.
> Ubuntu. Boost 1.42.0-3ubuntu1.
>
> Any ideas?
> Markus

Peter

segfault using rtt_dot_service

On Tuesday 18 October 2011 22:11:05 Markus Klotzbuecher wrote:
> Hi,
>
> I wanted to use the rtt_dot_service to take a picture of my setup, but
> it decided to die:
>
> $ rosrun ocl deployer-gnulinux
> 0.218 [ Warning][DeploymentComponent::import] The ROS package 'ocl' in
> '/home/mk/src/stacks/orocos_toolchain/ocl' nor its dependencies
> contained a lib/orocos directory. I'll look in the RTT_COMPONENT_PATH
> next.
> Switched to : Deployer
>
> This console reader allows you to browse and manipulate
> TaskContexts.
> You can type in an operation, expression, create or change
> variables.
> (type 'help' for instructions and 'ls' for context info)
>
> TAB completion and HISTORY is available ('bash' like)
>
> Use 'Ctrl-D' or type 'quit' to exit this program.
>
> Deployer [S]> import("rtt_dot_service")
> = true
>
> Deployer [S]> loadService ("Deployer", "dot")
> deployer-gnulinux: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T*
> boost::shared_ptr< <template-parameter-1-1> >::operator->() const [with T =
> RTT::internal::LocalOperationCaller<std::basic_string > std::char_traits<char>, std::allocator<char> >()>]: Assertion `px != 0'
> failed. Aborted (core dumped)
>
> Fireing up gdb yields the following:
>
>
> Core was generated by
> `/home/mk/src/stacks/orocos_toolchain/ocl/bin/deployer-gnulinux'. Program
> terminated with signal 6, Aborted.
> #0 0x00007f0c56d68ba5 in raise (sig=<value optimized out>) at
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64
> ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. in
> ../nptl/sysdeps/unix/sysv/linux/raise.c
> (gdb) where
> #0 0x00007f0c56d68ba5 in raise (sig=<value optimized out>) at
> ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00007f0c56d6c6b0 in abort
> () at abort.c:92
> #2 0x00007f0c56d61a71 in __assert_fail (assertion=0x7f0c54ecbcd0 "px !=
> 0", file=<value optimized out>, line=418, function=0x7f0c54efcc80 "T*
> boost::shared_ptr< <template-parameter-1-1> >::operator->() const [with T
> = RTT::internal::LocalOperationCaller<std::basic_string > std::char_traits<char>, std::allocator<char> >()>]") at assert.c:81 #3
> 0x00007f0c54e364b0 in operator-> (this=0x0) at
> /usr/include/boost/smart_ptr/shared_ptr.hpp:418 #4
> RTT::Operation<std::basic_string > std::allocator<char> >()>::ownerUpdated(void) (this=0x0) at
> /home/mk/src/stacks/orocos_toolchain/rtt/rtt/typekit/../types/../internal/
> ../Operation.hpp:221 #5 0x00007f0c5a284c27 in setOwner (this=0xf02e70,
> op=...) at
> /home/mk/src/stacks/orocos_toolchain/rtt/rtt/internal/../base/OperationBas
> e.hpp:118 #6 RTT::Service::addLocalOperation (this=0xf02e70, op=...) at
> /home/mk/src/stacks/orocos_toolchain/rtt/rtt/Service.cpp:184 #7
> 0x00007f0c4f7b228e in RTT::Service::addOperation<std::basic_string > std::char_traits<char>, std::allocator<char>
> >()>(RTT::Operation<std::basic_string > std::allocator<char> >()> &) (this=0xf02e70, op=...) at
> /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/include/rtt/p
> lugin/../Service.hpp:299 #8 0x00007f0c4f7b12d5 in
> RTT::Service::addOperation<std::string (Dot::*)(), Dot> (this=0xf02e70,
> name=..., func=(std::string (Dot::*)(Dot *)) 0x7f0c4f7acf7a
> <Dot::getOwnerName()>, serv=0xf02e70, et=RTT::ClientThread) at
> /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/include/rtt/p
> lugin/../Service.hpp:342 #9 0x00007f0c4f7ac71f in Dot::Dot (this=0xf02e70,
> owner=0x7fff3272dec0) at
> /home/mk/src/stacks/rtt_dot_service/src/rtt_dot_service.cpp:49 #10
> 0x00007f0c4f7afbb1 in loadRTTPlugin (tc=0x7fff3272dec0) at
> /home/mk/src/stacks/rtt_dot_service/src/rtt_dot_service.cpp:217 #11
> 0x00007f0c5a2dfb5c in RTT::plugin::PluginLoader::loadService
> (this=0xe888c0, servicename=..., tc=0x7fff3272dec0) at
> /home/mk/src/stacks/orocos_toolchain/rtt/rtt/plugin/PluginLoader.cpp:323
> #12 0x00007f0c59a03adb in OCL::DeploymentComponent::loadService
> (this=<value optimized out>, name=<value optimized out>, type=...) at
> /home/mk/src/stacks/orocos_toolchain/ocl/deployment/DeploymentComponent.cp
> p:1509 #13 0x00007f0c59a41df4 in operator() (this=<value optimized out>,
> t1=..., t2=...) at /usr/include/boost/function/function_template.hpp:1013
> #14 call_impl<std::string const&, std::string const&> (this=<value
> optimized out>, t1=..., t2=...) at
> /home/mk/src/stacks/orocos_toolchain/install/include/rtt/internal/../inter
> nal/LocalOperationCaller.hpp:386 #15 RTT::internal::InvokerImpl<2,
> bool(const std::string&, const std::string&),
> RTT::internal::LocalOperationCallerImpl<bool(const std::string&, const
> std::string&)> >::call(const std::string &, const std::string &) (
> this=<value optimized out>, t1=..., t2=...) at
> /home/mk/src/stacks/orocos_toolchain/install/include/rtt/internal/../inter
> nal/Invoker.hpp:125 #16 0x00007f0c59a46571 in operator()<bool,
> RTT::internal::FusedMCallDataSource::evaluate::iret (*)(bool
> (RTT::base::OperationCallerBase<bool(const std::string&, const
> std::string&)>::*)(const std::string&, const std::string&), const
> RTT::internal::FusedMCallDataSource<Signature>::evaluate() const [with
> Signature = bool(const std::string&, const std::string&)]::arg_type&),
> boost::_bi::list0> (this=0xf02a90) at /usr/include/boost/bind/bind.hpp:303
> #17 operator() (this=0xf02a90) at
> /usr/include/boost/bind/bind_template.hpp:20 #18
> exec<boost::_bi::bind_t > RTT::internal::FusedMCallDataSource::evaluate::iret (*)(bool
> (RTT::base::OperationCallerBase<bool(const std::string&, const
> std::string&)>::*)(const std::string&, const std::string&), const
> RTT::internal::FusedMCallDataSource<Signature>::evaluate() const [with
> Signature = bool(const std::string&, const std::string&)]::arg_type&),
> boost::_bi::list2<boost::_bi::value > (RTT::internal::InvokerBaseImpl<2, bool(const std::string&, const
> std::string&)>::*)(const std::string&, const std::string&)>,
> boost::_bi::value<boost::fusion::cons > const std::string&, const std::string&)>*, boost::fusion::cons<const
> std::string&, boost::fusion::cons<const std::string&, boost::fusion::nil>
> > > > > > > (this=0xf02a90) at
> /home/mk/src/stacks/orocos_toolchain/install/include/rtt/internal/BindStor
> age.hpp:123 #19 RTT::internal::FusedMCallDataSource<bool(const
> std::string&, const std::string&)>::evaluate(void) const (this=0xf02a90)
> at
> /home/mk/src/stacks/orocos_toolchain/install/include/rtt/internal/FusedFun
> ctorDataSource.hpp:298 #20 0x00007f0c59d03c5f in OCL::TaskBrowser::doPrint
> (this=0x7fff3272db20, ds=<value optimized out>, recurse=true) at
> /home/mk/src/stacks/orocos_toolchain/ocl/taskbrowser/TaskBrowser.cpp:1539
> #21 0x00007f0c59d047ca in OCL::TaskBrowser::printResult
> (this=0x7fff3272db20, ds=0xf02a90, recurse=<value optimized out>) at
> /home/mk/src/stacks/orocos_toolchain/ocl/taskbrowser/TaskBrowser.cpp:1497
> #22 0x00007f0c59d14cfb in OCL::TaskBrowser::evalCommand
> (this=0x7fff3272db20, comm=...) at
> /home/mk/src/stacks/orocos_toolchain/ocl/taskbrowser/TaskBrowser.cpp:1457
> #23 0x00007f0c59d16747 in OCL::TaskBrowser::loop (this=<value optimized
> out>) at
> /home/mk/src/stacks/orocos_toolchain/ocl/taskbrowser/TaskBrowser.cpp:858
> #24 0x000000000040c28b in main (argc=<value optimized out>, argv=<value
> optimized out>) at
> /home/mk/src/stacks/orocos_toolchain/ocl/bin/deployer.cpp:168 (gdb)
>
> All top of git, compiled by myself.
> Ubuntu. Boost 1.42.0-3ubuntu1.

top of git of the orocos_toolchain_ros or top of git of the rtt repos ? Please
post the rtt git hash to be sure...

Peter

segfault using rtt_dot_service

On Tue, Oct 18, 2011 at 10:19:13PM +0200, Peter Soetens wrote:
> On Tuesday 18 October 2011 22:11:05 Markus Klotzbuecher wrote:
> > Hi,
> >
> > I wanted to use the rtt_dot_service to take a picture of my setup, but
> > it decided to die:
> >
> > $ rosrun ocl deployer-gnulinux
> > 0.218 [ Warning][DeploymentComponent::import] The ROS package 'ocl' in
> > '/home/mk/src/stacks/orocos_toolchain/ocl' nor its dependencies
> > contained a lib/orocos directory. I'll look in the RTT_COMPONENT_PATH
> > next.
> > Switched to : Deployer
> >
> > This console reader allows you to browse and manipulate
> > TaskContexts.
> > You can type in an operation, expression, create or change
> > variables.
> > (type 'help' for instructions and 'ls' for context info)
> >
> > TAB completion and HISTORY is available ('bash' like)
> >
> > Use 'Ctrl-D' or type 'quit' to exit this program.
> >
> > Deployer [S]> import("rtt_dot_service")
> > = true
> >
> > Deployer [S]> loadService ("Deployer", "dot")
> > deployer-gnulinux: /usr/include/boost/smart_ptr/shared_ptr.hpp:418: T*
> > boost::shared_ptr< <template-parameter-1-1> >::operator->() const [with T =
> > RTT::internal::LocalOperationCaller<std::basic_string > > std::char_traits<char>, std::allocator<char> >()>]: Assertion `px != 0'
> > failed. Aborted (core dumped)
> >
> > Fireing up gdb yields the following:
> >
> >
> > Core was generated by
> > `/home/mk/src/stacks/orocos_toolchain/ocl/bin/deployer-gnulinux'. Program
> > terminated with signal 6, Aborted.
> > #0 0x00007f0c56d68ba5 in raise (sig=<value optimized out>) at
> > ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64
> > ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. in
> > ../nptl/sysdeps/unix/sysv/linux/raise.c
> > (gdb) where
> > #0 0x00007f0c56d68ba5 in raise (sig=<value optimized out>) at
> > ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00007f0c56d6c6b0 in abort
> > () at abort.c:92
> > #2 0x00007f0c56d61a71 in __assert_fail (assertion=0x7f0c54ecbcd0 "px !=
> > 0", file=<value optimized out>, line=418, function=0x7f0c54efcc80 "T*
> > boost::shared_ptr< <template-parameter-1-1> >::operator->() const [with T
> > = RTT::internal::LocalOperationCaller<std::basic_string > > std::char_traits<char>, std::allocator<char> >()>]") at assert.c:81 #3
> > 0x00007f0c54e364b0 in operator-> (this=0x0) at
> > /usr/include/boost/smart_ptr/shared_ptr.hpp:418 #4
> > RTT::Operation<std::basic_string > > std::allocator<char> >()>::ownerUpdated(void) (this=0x0) at
> > /home/mk/src/stacks/orocos_toolchain/rtt/rtt/typekit/../types/../internal/
> > ../Operation.hpp:221 #5 0x00007f0c5a284c27 in setOwner (this=0xf02e70,
> > op=...) at
> > /home/mk/src/stacks/orocos_toolchain/rtt/rtt/internal/../base/OperationBas
> > e.hpp:118 #6 RTT::Service::addLocalOperation (this=0xf02e70, op=...) at
> > /home/mk/src/stacks/orocos_toolchain/rtt/rtt/Service.cpp:184 #7
> > 0x00007f0c4f7b228e in RTT::Service::addOperation<std::basic_string > > std::char_traits<char>, std::allocator<char>
> > >()>(RTT::Operation<std::basic_string > > std::allocator<char> >()> &) (this=0xf02e70, op=...) at
> > /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/include/rtt/p
> > lugin/../Service.hpp:299 #8 0x00007f0c4f7b12d5 in
> > RTT::Service::addOperation<std::string (Dot::*)(), Dot> (this=0xf02e70,
> > name=..., func=(std::string (Dot::*)(Dot *)) 0x7f0c4f7acf7a
> > <Dot::getOwnerName()>, serv=0xf02e70, et=RTT::ClientThread) at
> > /opt/ros/diamondback/stacks/orocos_toolchain_ros/rtt/install/include/rtt/p
> > lugin/../Service.hpp:342 #9 0x00007f0c4f7ac71f in Dot::Dot (this=0xf02e70,
> > owner=0x7fff3272dec0) at
> > /home/mk/src/stacks/rtt_dot_service/src/rtt_dot_service.cpp:49 #10
> > 0x00007f0c4f7afbb1 in loadRTTPlugin (tc=0x7fff3272dec0) at
> > /home/mk/src/stacks/rtt_dot_service/src/rtt_dot_service.cpp:217 #11
> > 0x00007f0c5a2dfb5c in RTT::plugin::PluginLoader::loadService
> > (this=0xe888c0, servicename=..., tc=0x7fff3272dec0) at
> > /home/mk/src/stacks/orocos_toolchain/rtt/rtt/plugin/PluginLoader.cpp:323
> > #12 0x00007f0c59a03adb in OCL::DeploymentComponent::loadService
> > (this=<value optimized out>, name=<value optimized out>, type=...) at
> > /home/mk/src/stacks/orocos_toolchain/ocl/deployment/DeploymentComponent.cp
> > p:1509 #13 0x00007f0c59a41df4 in operator() (this=<value optimized out>,
> > t1=..., t2=...) at /usr/include/boost/function/function_template.hpp:1013
> > #14 call_impl<std::string const&, std::string const&> (this=<value
> > optimized out>, t1=..., t2=...) at
> > /home/mk/src/stacks/orocos_toolchain/install/include/rtt/internal/../inter
> > nal/LocalOperationCaller.hpp:386 #15 RTT::internal::InvokerImpl<2,
> > bool(const std::string&, const std::string&),
> > RTT::internal::LocalOperationCallerImpl<bool(const std::string&, const
> > std::string&)> >::call(const std::string &, const std::string &) (
> > this=<value optimized out>, t1=..., t2=...) at
> > /home/mk/src/stacks/orocos_toolchain/install/include/rtt/internal/../inter
> > nal/Invoker.hpp:125 #16 0x00007f0c59a46571 in operator()<bool,
> > RTT::internal::FusedMCallDataSource::evaluate::iret (*)(bool
> > (RTT::base::OperationCallerBase<bool(const std::string&, const
> > std::string&)>::*)(const std::string&, const std::string&), const
> > RTT::internal::FusedMCallDataSource<Signature>::evaluate() const [with
> > Signature = bool(const std::string&, const std::string&)]::arg_type&),
> > boost::_bi::list0> (this=0xf02a90) at /usr/include/boost/bind/bind.hpp:303
> > #17 operator() (this=0xf02a90) at
> > /usr/include/boost/bind/bind_template.hpp:20 #18
> > exec<boost::_bi::bind_t > > RTT::internal::FusedMCallDataSource::evaluate::iret (*)(bool
> > (RTT::base::OperationCallerBase<bool(const std::string&, const
> > std::string&)>::*)(const std::string&, const std::string&), const
> > RTT::internal::FusedMCallDataSource<Signature>::evaluate() const [with
> > Signature = bool(const std::string&, const std::string&)]::arg_type&),
> > boost::_bi::list2<boost::_bi::value > > (RTT::internal::InvokerBaseImpl<2, bool(const std::string&, const
> > std::string&)>::*)(const std::string&, const std::string&)>,
> > boost::_bi::value<boost::fusion::cons > > const std::string&, const std::string&)>*, boost::fusion::cons<const
> > std::string&, boost::fusion::cons<const std::string&, boost::fusion::nil>
> > > > > > > > (this=0xf02a90) at
> > /home/mk/src/stacks/orocos_toolchain/install/include/rtt/internal/BindStor
> > age.hpp:123 #19 RTT::internal::FusedMCallDataSource<bool(const
> > std::string&, const std::string&)>::evaluate(void) const (this=0xf02a90)
> > at
> > /home/mk/src/stacks/orocos_toolchain/install/include/rtt/internal/FusedFun
> > ctorDataSource.hpp:298 #20 0x00007f0c59d03c5f in OCL::TaskBrowser::doPrint
> > (this=0x7fff3272db20, ds=<value optimized out>, recurse=true) at
> > /home/mk/src/stacks/orocos_toolchain/ocl/taskbrowser/TaskBrowser.cpp:1539
> > #21 0x00007f0c59d047ca in OCL::TaskBrowser::printResult
> > (this=0x7fff3272db20, ds=0xf02a90, recurse=<value optimized out>) at
> > /home/mk/src/stacks/orocos_toolchain/ocl/taskbrowser/TaskBrowser.cpp:1497
> > #22 0x00007f0c59d14cfb in OCL::TaskBrowser::evalCommand
> > (this=0x7fff3272db20, comm=...) at
> > /home/mk/src/stacks/orocos_toolchain/ocl/taskbrowser/TaskBrowser.cpp:1457
> > #23 0x00007f0c59d16747 in OCL::TaskBrowser::loop (this=<value optimized
> > out>) at
> > /home/mk/src/stacks/orocos_toolchain/ocl/taskbrowser/TaskBrowser.cpp:858
> > #24 0x000000000040c28b in main (argc=<value optimized out>, argv=<value
> > optimized out>) at
> > /home/mk/src/stacks/orocos_toolchain/ocl/bin/deployer.cpp:168 (gdb)
> >
> > All top of git, compiled by myself.
> > Ubuntu. Boost 1.42.0-3ubuntu1.
>
> top of git of the orocos_toolchain_ros or top of git of the rtt repos ? Please
> post the rtt git hash to be sure...

orocos_toolchainros: 42a55ebf5f84b240132391ef7b486b7f7b4d52c8
rtt_dot_service: d26a2dc6b0e7060da1cecd7f3b760217b94b5271
rtt: v2.5.0-3-g80441b0
ocl: v2.5.0-15-geec372a

Best regards
Markus