Open devrite opened 4 years ago
Using lldb (the container needs to be started with --privileged
as it needs special kernel features for debugging otherwise running of the program fails using lldb):
lldb devel/lib/ueye_cam/check_ueye_api
(lldb) break set --name ros::init
(lldb) run
(lldb) break delete 1
(lldb) break set -r . -s libueye_api.so.1
(lldb) c
(lldb) bt
It looks like ros::init jumps into the ueye implementations of boost stuff (especially filesystem stuff). So there might be a version conflict in the used boost versions, which are exported by ueye (static linked exported boost).
Output:
* thread #1, name = 'check_ueye_api', stop reason = breakpoint 4.191
* frame #0: 0x00007ffff715d270 libueye_api.so.1`boost::filesystem::detail::create_directory(boost::filesystem::path const&, boost::system::error_code*)
frame #1: 0x00007ffff793dc58 libroscpp.so`ros::file_log::init(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&) + 3656
frame #2: 0x00007ffff7965821 libroscpp.so`ros::init(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int) + 145
frame #3: 0x00007ffff796816c libroscpp.so`ros::init(int&, char**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int) + 940
frame #4: 0x0000555555555345 check_ueye_api`main(argc=1, argv=0x00007fffffffe418) at check_ueye_api.cpp:45
frame #5: 0x00007ffff5f9fb97 libc.so.6`__libc_start_main(main=(check_ueye_api`main at check_ueye_api.cpp:37), argc=1, argv=0x00007fffffffe418, init=<unavailable>, fini=<unavailable>, rtld_fini=<unavailable>, stack_end=0x00007fffffffe408) at libc-start.c:310
frame #6: 0x0000555555554fda check_ueye_api`_start + 42
Might be late but i had the same issue and have resolved it in #77 .
Sorry, I checked today. It was being linked. The issue still remains in other context where the library is not being loaded at runtime dynamically (in the nodelet context it will be, hence it works, right now ...).
For check_ueye_api the issue is solved by not linking it as you suggest. But for any node that uses the library via build time linking will fail as check_ueye_api.
It will only be resolvable if ueye_api is being rebuilt by IDS so that it does not export any thirdparty symbols if they are not used in the interface.
Hi everyone,
I'm having the same troubles with ROS Kinetic on Ubuntu 16.04 LTS with IDS SDK version 4.91.1. Same behaviour as above, a munmap_chunk() : invalid pointer crash as soon as a build time link with the ueye_api exists, even if no call to any ueye function is made in the executable. Every executable using ueye without libroscpp.so works flawlessly.
Chris
Perhaps we could use Implib.so to hide the unnecessary boost symbols. I haven't tested this myself though.
Hi everyone!
We used a
ros:melodic-perception-bionic
the docker image (with the necessary dependencies installed):Using gdb and catch throw you may print a backtrace (error in ros::init -> file log).
Best regards,
Markus