boost exception related to controller manager

asked 2017-02-13 07:09:54 -0500

yangtfu gravatar image

updated 2017-02-13 07:38:47 -0500

gvdhoorn gravatar image

Hi, I'm writing a ROS program with galil DMC4060 controller.

When I add gclib and gclibo into the CMakelists.txt file, a run-time exception is thrown:

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::logic_error> >'
what(): character conversion failed

The build progress has no error. If gclib and gclibo library is not included the program is totally fine. I think there is something wrong with the Boost library. The Boost version with this error is 1.54, and boost 1.63 is totally fine. But it is inconvenient to compile all the rospacks with the newest version.

Does anybody have the similar problem? Please help me. Thank you!

The gdb debugging information is attached below:
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::logic_error> >'
  what():  character conversion failed

Program received signal SIGABRT, Aborted.
0x00007ffff6b42c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.

(gdb) bt
#0  0x00007ffff6b42c37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff6b46028 in __GI_abort () at abort.c:89
#2  0x00007ffff7147535 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff71456d6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff7145703 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff7145922 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff65a95e6 in ?? () from /usr/lib/libgclib.so.0
#7  0x00007ffff665d190 in std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > boost::detail::convert<wchar_t, char, boost::_bi::bind_t<std::codecvt_base::result, boost::_mfi::cmf7<std::codecvt_base::result, std::__codecvt_abstract_base<wchar_t, char, __mbstate_t>, __mbstate_t&, char const*, char const*, char const*&, wchar_t*, wchar_t*, wchar_t*&>, boost::_bi::list8<boost::_bi::value<std::codecvt<wchar_t, char, __mbstate_t> const*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4>, boost::arg<5>, boost::arg<6>, boost::arg<7> > > >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::_bi::bind_t<std::codecvt_base::result, boost::_mfi::cmf7<std::codecvt_base::result, std::__codecvt_abstract_base<wchar_t, char, __mbstate_t>, __mbstate_t&, char const*, char const*, char const*&, wchar_t*, wchar_t*, wchar_t*&>, boost::_bi::list8<boost::_bi::value<std::codecvt<wchar_t, char, __mbstate_t> const*>, boost::arg<1>, boost::arg<2>, boost::arg<3>, boost::arg<4>, boost::arg<5>, boost::arg<6>, boost::arg<7> > >) () from /usr/lib/libgclib.so.0
#8  0x00007ffff665cde6 in boost::from_8_bit(std::string const&, std::codecvt<wchar_t, char, __mbstate_t> const&) ()
   from /usr/lib/libgclib.so.0
#9  0x00007ffff665ce00 in boost::from_utf8(std::string const&) () from /usr/lib/libgclib.so.0
#10 0x00007ffff66546bf in boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::string, std::allocator<std::string> > const&, bool) const () from /usr/lib/libgclib.so.0
#11 0x00007ffff665088e in boost::program_options::store(boost::program_options::basic_parsed_options<char> const&, boost::program_options::variables_map&, bool) () from /usr/lib/libgclib.so.0
#12 0x00007ffff281a0b0 in rospack::parse_args(int, char**, rospack::Rosstackage ...
(more)
edit retag flag offensive close merge delete

Comments

I'm not entirely sure, but if you are mixing (binary packages of different) Boost versions, then strange things can happen. Are your galil libraries linked against a different Boost version than your ROS nodes are using? That could be a problem.

gvdhoorn gravatar image gvdhoorn  ( 2017-02-14 05:38:08 -0500 )edit

I have to install and compile all the ros packages I used with boost version 1.63, and it is totally OK. But the apt-get packages are built with version 1.54. Compiling my package with these packages is fine, but the exception above appears at runtime.

yangtfu gravatar image yangtfu  ( 2017-02-14 09:32:50 -0500 )edit

I'm having the same issue, were you able to resolve it? Did you build ros with the new boost version?

dgregorich gravatar image dgregorich  ( 2017-05-03 16:14:20 -0500 )edit