Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

telemetry_buffer_manager_example segfaults if compiled in release #59

Closed
GiulioRomualdi opened this issue Feb 1, 2021 · 1 comment · Fixed by #55
Closed

telemetry_buffer_manager_example segfaults if compiled in release #59

GiulioRomualdi opened this issue Feb 1, 2021 · 1 comment · Fixed by #55
Assignees
Labels
bug Something isn't working

Comments

@GiulioRomualdi
Copy link
Member

When I run ./bin/telemetry_buffer_manager_example I got the following segmentation fault

File saved correctly!
terminate called after throwing an instance of 'std::out_of_range'
  what():  _Map_base::at
Aborted (core dumped)
gdb$ where
#0  __GI_raise (sig=sig@entry=0x6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff6c51921 in __GI_abort () at abort.c:79
#2  0x00007ffff7a99257 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff7aa4606 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff7aa4671 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff7aa4905 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff7a9bb46 in std::__throw_out_of_range(char const*) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7  0x0000555555558466 in std::__detail::_Map_base<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, yarp::telemetry::Buffer<double> >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, yarp::telemetry::Buffer<double> > >, std::__detail::_Select1st, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true>, true>::at (__k="one", this=0x7fffffffc730) at /usr/include/c++/7/bits/hashtable_policy.h:774
#8  std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, yarp::telemetry::Buffer<double>, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<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, yarp::telemetry::Buffer<double> > > >::at (__k="one", this=0x7fffffffc730) at /usr/include/c++/7/bits/unordered_map.h:990
#9  yarp::telemetry::BufferManager<double>::push_back (var_name="one", elem=..., this=0x7fffffffc700) at /home/gromualdi/robot-code/yarp-telemetry/src/libYARP_telemetry/src/yarp/telemetry/BufferManager.h:85
#10 main () at /home/gromualdi/robot-code/yarp-telemetry/src/examples/telemetry_buffer_manager_example.cpp:75

I think it's related to #57

@Nicogene
Copy link
Member

Nicogene commented Feb 2, 2021

The fix to this particular problem should be carried in #55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants