transform_listener crash [closed]

asked 2013-09-24 22:39:39 -0500

Gaitt gravatar image

updated 2013-09-25 06:25:54 -0500

Hello guy's,

I'm working in integrating ROS in a software. So far, everything works fine. The soft is not design for multithreading.

So, i'm using the transform_listener in a monothread way. Like so:

boost::shared_ptr<tf::TransformListener> m_tfPtr;
...
m_tfPtr = boost::shared_ptr<tf::TransformListener>(new tf::TransformListener(ros::Duration(tf::Transformer::DEFAULT_CACHE_TIME), false));

Like this, it shouln'd spawn it's own thread and it's own messages queue. But instead listening to tf messages in the node messages queue when node spin. My node spin using spinOnce() method.

Anyhow, sometime the sotf crash. Two type of crash happen:

First one:

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> 'what(): boost::lock_error Abandon (core dumped)

second:

[ WARN] [1380036327.679722992]: Message recieved without callerid
[ WARN] [1380036327.679812142]: Message recieved without callerid
[ WARN] [1380036327.679899799]: Message recieved without callerid
[ WARN] [1380036327.679988639]: Message recieved without callerid
[ WARN] [1380036327.680155338]: Message recieved without callerid
[ WARN] [1380036327.680246096]: Message recieved without callerid
Erreur de segmentation (core dumped)

If i comment all use of transform_listener, then the soft run for hours without any crash. I have not clue of what is wrong here.

Any help will be much appreciate. Thx


Backtraces:

Case 1:

#0  0xb7fdd424 in __kernel_vsyscall ()
#1  0xb76e11df in __GI_raise (sig=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0xb76e4825 in __GI_abort () at abort.c:91
#3  0xb792713d in __gnu_cxx::__verbose_terminate_handler() ()
   from /usr/lib/i386-linux-gnu/libstdc++.so.6
#4  0xb7924ed3 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#5  0xb7924f0f in std::terminate() () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#6  0xb792505e in __cxa_throw () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#7  0xa8dd47bd in boost::throw_exception<boost::lock_error> (e=...)
    at /usr/include/boost/throw_exception.hpp:61
#8  0xa8b7c629 in ros::SubscriptionQueue::push(boost::shared_ptr<ros::SubscriptionCallbackHelper> const&, boost::shared_ptr<ros::MessageDeserializer> const&, bool, boost::weak_ptr<void const> const&, bool, ros::Time, bool*) ()
   from /opt/ros/fuerte/lib/libroscpp.so
#9  0xa8b762d1 in ros::Subscription::handleMessage(ros::SerializedMessage const&, bool, bool, boost::shared_ptr<std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > > const&, boost::shared_ptr<ros::PublisherLink> const&) ()
   from /opt/ros/fuerte/lib/libroscpp.so
#10 0xa8b52b30 in ros::TransportPublisherLink::handleMessage(ros::SerializedMessage const&, bool, bool) () from /opt/ros/fuerte/lib/libroscpp.so
#11 0xa8b526bc in ros::TransportPublisherLink::onMessage(boost::shared_ptr<ros::Connection> const&, boost::shared_array<unsigned char> const&, unsigned int, bool)
    () from /opt/ros/fuerte/lib/libroscpp.so
#12 0xa8b555f3 in boost::detail::function::void_function_obj_invoker4<boost::_bi::---Type <return> to continue, or q <return> to quit--- 
bind_t<void, boost::_mfi::mf4<void, ros::TransportPublisherLink, boost::shared_ptr<ros::Connection> const&, boost::shared_array<unsigned char> const&, unsigned int, bool>, boost::_bi::list5<boost::_bi::value<ros::TransportPublisherLink*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4> > >, void, boost::shared_ptr<ros::Connection> const&, boost::shared_array<unsigned char> const&, unsigned int, bool>::invoke(boost::detail::function::function_buffer&, boost::shared_ptr<ros::Connection> const&, boost ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2015-10-26 13:48:06.081199