rospack segmentation fault
Hi guys,
I am using ros::package::getPath to resolve the path to a config file I am loading within my program. When I am starting the node using
rosrun node_pkg node
everything works just fine, but when I directly launch the generated executable in the devel directory, I immediately get a segmentation fault
#0 0x00007ffff33056ad in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x00007ffff18511f3 in rospack::Stackage::~Stackage() () from /opt/ros/jade/lib/librospack.so
#2 0x00007ffff1847ecf in rospack::Rosstackage::addStackage(std::string const&) ()
from /opt/ros/jade/lib/librospack.so
#3 0x00007ffff184bfad in rospack::Rosstackage::crawlDetail(std::string const&, bool, int, bool, std::vector<rospack::DirectoryCrawlRecord*, std::allocator<rospack::DirectoryCrawlRecord*> >&, boost::unordered::unordered_set<std::string, boost::hash<std::string>, std::equal_to<std::string>, std::allocator<std::string> >&) ()
from /opt/ros/jade/lib/librospack.so
#4 0x00007ffff184bef3 in rospack::Rosstackage::crawlDetail(std::string const&, bool, int, bool, std::vector<rospack::DirectoryCrawlRecord*, std::allocator<rospack::DirectoryCrawlRecord*> >&, boost::unordered::unordered_set<std::string, boost::hash<std::string>, std::equal_to<std::string>, std::allocator<std::string> >&) ()
from /opt/ros/jade/lib/librospack.so
#5 0x00007ffff184cbe5 in rospack::Rosstackage::crawl(std::vector<std::string, std::allocator<std::string> >, bool) () from /opt/ros/jade/lib/librospack.so
#6 0x00007ffff185b2d1 in rospack::rospack_run(int, char**, rospack::Rosstackage&, std::string&) ()
from /opt/ros/jade/lib/librospack.so
#7 0x00007ffff1857e3c in rospack::ROSPack::run(int, char**) () from /opt/ros/jade/lib/librospack.so
#8 0x00007ffff1858169 in rospack::ROSPack::run(std::string const&) () from /opt/ros/jade/lib/librospack.so
#9 0x00007ffff597bf01 in ros::package::command(std::string const&) () from /opt/ros/jade/lib/libroslib.so
#10 0x00007ffff597c0cd in ros::package::getPath(std::string const&) () from /opt/ros/jade/lib/libroslib.so
can anybody explain this behavior?
#include <ros/package.h>
std::string path = ros::package::getPath("x_common");
Thank you for your time!