orocos-toolchain / rtt

Orocos Real-Time Toolkit
http://www.orocos.org
Other
72 stars 79 forks source link

Operation calls from Taskbrowser might evaluate multiple times for complex return values. #108

Open SvenDC opened 9 years ago

SvenDC commented 9 years ago

first call:

0   im_filesystem_interface::getRosMsg  im_filesystem_interface.cpp 116 0x7fb5f4541492  
1   boost::_mfi::mf0<im_pickit_msgs::FolderContent_<std::allocator<void> >, im_filesystem_interface>::operator()    mem_fn_template.hpp 49  0x7fb5f455d6c2  
2   boost::_bi::list1<boost::_bi::value<im_filesystem_interface*> >::operator()<im_pickit_msgs::FolderContent_<std::allocator<void> >, boost::_mfi::mf0<im_pickit_msgs::FolderContent_<std::allocator<void> >, im_filesystem_interface>, boost::_bi::list0> bind.hpp    243 0x7fb5f455cd39  
3   boost::_bi::bind_t<boost::_bi::unspecified, boost::_mfi::mf0<im_pickit_msgs::FolderContent_<std::allocator<void> >, im_filesystem_interface>, boost::_bi::list1<boost::_bi::value<im_filesystem_interface*> > >::operator() bind_template.hpp   20  0x7fb5f455c6a4  
4   boost::detail::function::function_obj_invoker0<boost::_bi::bind_t<boost::_bi::unspecified, boost::_mfi::mf0<im_pickit_msgs::FolderContent_<std::allocator<void> >, im_filesystem_interface>, boost::_bi::list1<boost::_bi::value<im_filesystem_interface*> > >, im_pickit_msgs::FolderContent_<std::allocator<void> > >::invoke function_template.hpp   132 0x7fb5f455bd9a  
5   boost::function0<im_pickit_msgs::FolderContent_<std::allocator<void> > >::operator()() const    /home/intermodalics/pickit_ws_indigo/devel/lib/orocos/gnulinux/rtt_im_pickit_msgs/types/librtt-im_pickit_msgs-typekit-gnulinux.so       0x7fb611cbfdce  
6   im_pickit_msgs::FolderContent_<std::allocator<void> > RTT::internal::LocalOperationCallerImpl<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::call_impl<int>()   /home/intermodalics/pickit_ws_indigo/devel/lib/orocos/gnulinux/rtt_im_pickit_msgs/types/librtt-im_pickit_msgs-typekit-gnulinux.so       0x7fb611cc593d  
7   RTT::internal::InvokerImpl<0, im_pickit_msgs::FolderContent_<std::allocator<void> > (), RTT::internal::LocalOperationCallerImpl<im_pickit_msgs::FolderContent_<std::allocator<void> > ()> >::call() /home/intermodalics/pickit_ws_indigo/devel/lib/orocos/gnulinux/rtt_im_pickit_msgs/types/librtt-im_pickit_msgs-typekit-gnulinux.so       0x7fb611cc59c5  
8   boost::fusion::result_of::invoke<im_pickit_msgs::FolderContent_<std::allocator<void> > (RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::*)(), boost::fusion::cons<RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>*, boost::fusion::vector<boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> > const>::type boost::fusion::invoke<im_pickit_msgs::FolderContent_<std::allocator<void> > (RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::*)(), boost::fusion::cons<RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>*, boost::fusion::vector<boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> > >(im_pickit_msgs::FolderContent_<std::allocator<void> > (RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::*)(), boost::fusion::cons<RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>*, boost::fusion::vector<boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> > const&) /home/intermodalics/pickit_ws_indigo/devel/lib/orocos/gnulinux/rtt_im_pickit_msgs/types/librtt-im_pickit_msgs-typekit-gnulinux.so       0x7fb611cae00d  
9   void RTT::internal::RStore<im_pickit_msgs::FolderContent_<std::allocator<void> > >::exec<boost::_bi::bind_t<im_pickit_msgs::FolderContent_<std::allocator<void> >, im_pickit_msgs::FolderContent_<std::allocator<void> > (*)(im_pickit_msgs::FolderContent_<std::allocator<void> > (RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::*)(), boost::fusion::cons<RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>*, boost::fusion::vector<boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> > const&), boost::_bi::list2<boost::_bi::value<im_pickit_msgs::FolderContent_<std::allocator<void> > (RTT::internal::InvokerBaseImpl<0, im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::*)()>, boost::_bi::value<boost::fusion::cons<RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>*, boost::fusion::vector<boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> > > > > >(boost::_bi::bind_t<im_pickit_msgs::FolderContent_<std::allocator<void> >, im_pickit_msgs::FolderContent_<std::allocator<void> > (*)(im_pickit_msgs::FolderContent_<std::allocator<void> > (RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::*)(), boost::fusion::cons<RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>*, boost::fusion::vector<boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> > const&), boost::_bi::list2<boost::_bi::value<im_pickit_msgs::FolderContent_<std::allocator<void> > (RTT::internal::InvokerBaseImpl<0, im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::*)()>, boost::_bi::value<boost::fusion::cons<RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>*, boost::fusion::vector<boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> > > > >)   /home/intermodalics/pickit_ws_indigo/devel/lib/orocos/gnulinux/rtt_im_pickit_msgs/types/librtt-im_pickit_msgs-typekit-gnulinux.so       0x7fb611cc7ee8  
10  RTT::internal::FusedMCallDataSource<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::evaluate() const /home/intermodalics/pickit_ws_indigo/devel/lib/orocos/gnulinux/rtt_im_pickit_msgs/types/librtt-im_pickit_msgs-typekit-gnulinux.so       0x7fb611cc8001  
11  OCL::TaskBrowser::doPrint(boost::intrusive_ptr<RTT::base::DataSourceBase>, bool)    /opt/ros/indigo/lib/liborocos-ocl-taskbrowser-gnulinux.so.2.8.0     0x7fb64909f774  
12  OCL::TaskBrowser::printResult(RTT::base::DataSourceBase*, bool) /opt/ros/indigo/lib/liborocos-ocl-taskbrowser-gnulinux.so.2.8.0     0x7fb6490a035a  
13  OCL::TaskBrowser::evalCommand(std::string&) /opt/ros/indigo/lib/liborocos-ocl-taskbrowser-gnulinux.so.2.8.0     0x7fb6490a697a  
14  OCL::TaskBrowser::loop()    /opt/ros/indigo/lib/liborocos-ocl-taskbrowser-gnulinux.so.2.8.0     0x7fb6490acf49  
15  main            0x40ee2c    

second call (from RTT::base::DataSourceBase::getMember(std::string const&)):

0   im_filesystem_interface::getRosMsg  im_filesystem_interface.cpp 116 0x7fb5f4541492  
1   boost::_mfi::mf0<im_pickit_msgs::FolderContent_<std::allocator<void> >, im_filesystem_interface>::operator()    mem_fn_template.hpp 49  0x7fb5f455d6c2  
2   boost::_bi::list1<boost::_bi::value<im_filesystem_interface*> >::operator()<im_pickit_msgs::FolderContent_<std::allocator<void> >, boost::_mfi::mf0<im_pickit_msgs::FolderContent_<std::allocator<void> >, im_filesystem_interface>, boost::_bi::list0> bind.hpp    243 0x7fb5f455cd39  
3   boost::_bi::bind_t<boost::_bi::unspecified, boost::_mfi::mf0<im_pickit_msgs::FolderContent_<std::allocator<void> >, im_filesystem_interface>, boost::_bi::list1<boost::_bi::value<im_filesystem_interface*> > >::operator() bind_template.hpp   20  0x7fb5f455c6a4  
4   boost::detail::function::function_obj_invoker0<boost::_bi::bind_t<boost::_bi::unspecified, boost::_mfi::mf0<im_pickit_msgs::FolderContent_<std::allocator<void> >, im_filesystem_interface>, boost::_bi::list1<boost::_bi::value<im_filesystem_interface*> > >, im_pickit_msgs::FolderContent_<std::allocator<void> > >::invoke function_template.hpp   132 0x7fb5f455bd9a  
5   boost::function0<im_pickit_msgs::FolderContent_<std::allocator<void> > >::operator()() const    /home/intermodalics/pickit_ws_indigo/devel/lib/orocos/gnulinux/rtt_im_pickit_msgs/types/librtt-im_pickit_msgs-typekit-gnulinux.so       0x7fb611cbfdce  
6   im_pickit_msgs::FolderContent_<std::allocator<void> > RTT::internal::LocalOperationCallerImpl<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::call_impl<int>()   /home/intermodalics/pickit_ws_indigo/devel/lib/orocos/gnulinux/rtt_im_pickit_msgs/types/librtt-im_pickit_msgs-typekit-gnulinux.so       0x7fb611cc593d  
7   RTT::internal::InvokerImpl<0, im_pickit_msgs::FolderContent_<std::allocator<void> > (), RTT::internal::LocalOperationCallerImpl<im_pickit_msgs::FolderContent_<std::allocator<void> > ()> >::call() /home/intermodalics/pickit_ws_indigo/devel/lib/orocos/gnulinux/rtt_im_pickit_msgs/types/librtt-im_pickit_msgs-typekit-gnulinux.so       0x7fb611cc59c5  
8   boost::fusion::result_of::invoke<im_pickit_msgs::FolderContent_<std::allocator<void> > (RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::*)(), boost::fusion::cons<RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>*, boost::fusion::vector<boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> > const>::type boost::fusion::invoke<im_pickit_msgs::FolderContent_<std::allocator<void> > (RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::*)(), boost::fusion::cons<RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>*, boost::fusion::vector<boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> > >(im_pickit_msgs::FolderContent_<std::allocator<void> > (RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::*)(), boost::fusion::cons<RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>*, boost::fusion::vector<boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> > const&) /home/intermodalics/pickit_ws_indigo/devel/lib/orocos/gnulinux/rtt_im_pickit_msgs/types/librtt-im_pickit_msgs-typekit-gnulinux.so       0x7fb611cae00d  
9   void RTT::internal::RStore<im_pickit_msgs::FolderContent_<std::allocator<void> > >::exec<boost::_bi::bind_t<im_pickit_msgs::FolderContent_<std::allocator<void> >, im_pickit_msgs::FolderContent_<std::allocator<void> > (*)(im_pickit_msgs::FolderContent_<std::allocator<void> > (RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::*)(), boost::fusion::cons<RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>*, boost::fusion::vector<boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> > const&), boost::_bi::list2<boost::_bi::value<im_pickit_msgs::FolderContent_<std::allocator<void> > (RTT::internal::InvokerBaseImpl<0, im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::*)()>, boost::_bi::value<boost::fusion::cons<RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>*, boost::fusion::vector<boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> > > > > >(boost::_bi::bind_t<im_pickit_msgs::FolderContent_<std::allocator<void> >, im_pickit_msgs::FolderContent_<std::allocator<void> > (*)(im_pickit_msgs::FolderContent_<std::allocator<void> > (RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::*)(), boost::fusion::cons<RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>*, boost::fusion::vector<boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> > const&), boost::_bi::list2<boost::_bi::value<im_pickit_msgs::FolderContent_<std::allocator<void> > (RTT::internal::InvokerBaseImpl<0, im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::*)()>, boost::_bi::value<boost::fusion::cons<RTT::base::OperationCallerBase<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>*, boost::fusion::vector<boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_> > > > >)   /home/intermodalics/pickit_ws_indigo/devel/lib/orocos/gnulinux/rtt_im_pickit_msgs/types/librtt-im_pickit_msgs-typekit-gnulinux.so       0x7fb611cc7ee8  
10  RTT::internal::FusedMCallDataSource<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::evaluate() const /home/intermodalics/pickit_ws_indigo/devel/lib/orocos/gnulinux/rtt_im_pickit_msgs/types/librtt-im_pickit_msgs-typekit-gnulinux.so       0x7fb611cc8001  
11  RTT::internal::FusedMCallDataSource<im_pickit_msgs::FolderContent_<std::allocator<void> > ()>::get() const  /home/intermodalics/pickit_ws_indigo/devel/lib/orocos/gnulinux/rtt_im_pickit_msgs/types/librtt-im_pickit_msgs-typekit-gnulinux.so       0x7fb611cb727e  
12  RTT::types::StructTypeInfo<im_pickit_msgs::FolderContent_<std::allocator<void> >, false>::getMember(boost::intrusive_ptr<RTT::base::DataSourceBase>, std::string const&) const  /home/intermodalics/pickit_ws_indigo/devel/lib/orocos/gnulinux/rtt_im_pickit_msgs/types/librtt-im_pickit_msgs-typekit-gnulinux.so       0x7fb611cc6267  
13  RTT::base::DataSourceBase::getMember(std::string const&)    /opt/ros/indigo/lib/liborocos-rtt-gnulinux.so.2.8       0x7fb649669552  
14  OCL::TaskBrowser::doPrint(boost::intrusive_ptr<RTT::base::DataSourceBase>, bool)    /opt/ros/indigo/lib/liborocos-ocl-taskbrowser-gnulinux.so.2.8.0     0x7fb64909ff94  
15  OCL::TaskBrowser::printResult(RTT::base::DataSourceBase*, bool) /opt/ros/indigo/lib/liborocos-ocl-taskbrowser-gnulinux.so.2.8.0     0x7fb6490a035a  
16  OCL::TaskBrowser::evalCommand(std::string&) /opt/ros/indigo/lib/liborocos-ocl-taskbrowser-gnulinux.so.2.8.0     0x7fb6490a697a  
17  OCL::TaskBrowser::loop()    /opt/ros/indigo/lib/liborocos-ocl-taskbrowser-gnulinux.so.2.8.0     0x7fb6490acf49  
18  main            0x40ee2c    
SvenDC commented 9 years ago

ptal @smits @psoetens @meyerj

meyerj commented 8 years ago

The same issue has been reported via the Orocos-users mailing list here: http://www.orocos.org/forum/orocos/orocos-users/orocosusers-operation-returns-vector-string-runs-more-1-time

Test case implemented by @keivanzavari: https://github.com/keivanzavari/operations_test

Output:

Deployer [S]> Test.getOwnerName()
3.337 [ Debug  ][Logger] Hi you just called me!!
3.337 [ Info   ][Test] another log!! 
3.338 [ Debug  ][Logger] Hi you just called me!!
3.338 [ Info   ][Test] another log!! 
3.338 [ Debug  ][Logger] Hi you just called me!!
3.338 [ Info   ][Test] another log!! 
3.338 [ Debug  ][Logger] Hi you just called me!!
3.338 [ Info   ][Test] another log!! 
3.338 [ Debug  ][Logger] Hi you just called me!!
3.338 [ Info   ][Test] another log!! 
3.339 [ Debug  ][Logger] Hi you just called me!!
3.339 [ Info   ][Test] another log!! 
3.339 [ Debug  ][Logger] Hi you just called me!!
3.339 [ Info   ][Test] another log!! 
3.339 [ Debug  ][Logger] Hi you just called me!!
3.339 [ Info   ][Test] another log!! 
3.339 [ Debug  ][Logger] Hi you just called me!!
3.339 [ Info   ][Test] another log!! 
3.339 [ Debug  ][Logger] Hi you just called me!!
3.339 [ Info   ][Test] another log!! 
 = { [Test, Test ], size = 2, capacity = 2 }
Deployer [S]>