Segmentation Fault in tf::MessageFilter
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6536f2b in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
line:
laser_notifier_ = new tf::MessageFilter<sensor_msgs::LaserScan>(laser_sub_,listener_, target_frame_, 10);
Backtrace
---------
0 0x00007ffff6536f2b in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
1 0x0000000000442f60 in getTFPrefix (this=<optimized out>)
at /opt/ros/fuerte/stacks/geometry/tf/include/tf/tf.h:329
2 tf::MessageFilter<sensor_msgs::LaserScan_<std::allocator<void> > >::setTargetFrames (this=0x7fffffffc998,
target_frames=...) at /opt/ros/fuerte/stacks/geometry/tf/include/tf/message_filter.h:211
3 0x0000000000451c91 in setTargetFrame (target_frame=..., this=0x7fffffffc998)
at /opt/ros/fuerte/stacks/geometry/tf/include/tf/message_filter.h:195
4 MessageFilter<message_filters::Subscriber<sensor_msgs::LaserScan_<std::allocator<void> > > > (max_rate=...,
nh=<error reading variable: access outside bounds of object referenced via synthetic pointer>, queue_size=10,
target_frame=..., tf=..., f=..., this=0x7fffffffc998)
at /opt/ros/fuerte/stacks/geometry/tf/include/tf/message_filter.h:156
5 LaserLineExtractor::LaserLineExtractor (this=0x7fffffffc3b0, n=..., base_link=..., odom_link=...)
at src/lines.cpp:148
6 0x0000000000430b87 in main (argc=1, argv=<optimized out>)
at src/lines.cpp:885
It seems as though tf_prefix_ is not initialized properly which is causing this segfault.
Ros version - fuerte
Distributor ID: Ubuntu
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Codename: precise
uname -a:
Linux desktop 3.0.0-32-generic #50-Ubuntu SMP Thu Feb 28 22:32:30 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
add a comment