Expression: vector subscript out of range
I'm running ur_rtde 1.5.1 on Windows 11. When I use the IDE's debugger to debug my c++ application, I often get the following error: "Expression: vector subscript out of range" The call stack for the issue: 1 std::vector<char>::operator[] vector 1958 0x7ff759b28eff 2 ur_rtde::RTDEUtility::getUInt16 rtde_utility.h 185 0x7ff759b2b976 3 ur_rtde::RTDEUtility::readRTDEHeader rtde_utility.h 26 0x7ff759b2d495 4 ur_rtde::RTDE::receiveData rtde.cpp 519 0x7ff759b13dfb 5 ur_rtde::RTDEReceiveInterface::receiveCallback rtde_receive_interface.cpp 163 0x7ff759aa6f76 6 boost::_mfi::mf0<void,ur_rtde::RTDEReceiveInterface>::operator() mem_fn_template.hpp 50 0x7ff759ab169b 7 boost::_bi::list1<boost::_bi::value<ur_rtde::RTDEReceiveInterface *>>::operator()<boost::_mfi::mf0<void,ur_rtde::RTDEReceiveInterface>,boost::_bi::list0> bind.hpp 239 0x7ff759aa97d8 8 boost::_bi::bind_t<void,boost::_mfi::mf0<void,ur_rtde::RTDEReceiveInterface>,boost::_bi::list1<boost::_bi::value<ur_rtde::RTDEReceiveInterface *>>>::operator() bind.hpp 1274 0x7ff759ab15c2 9 boost::detail::thread_data<boost::_bi::bind_t<void,boost::_mfi::mf0<void,ur_rtde::RTDEReceiveInterface>,boost::_bi::list1<boost::_bi::value<ur_rtde::RTDEReceiveInterface *>>>>::run thread.hpp 121 0x7ff759ab33fd 10 boost::`anonymous namespace'::thread_start_function thread.cpp 296 0x7ff759b35c7e 11 register_onexit_function ucrtbased 0x7ff926d22d20 12 BaseThreadInitThunk KERNEL32 0x7ff9f8ba269d 13 RtlUserThreadStart ntdll 0x7ff9f9aaa9f8 The buffer_ in ur_rtde::RTDE::receiveData has size 4, so on the second ur_rtde::RTDEUtility::readRTDEHeader call, the message_offset is 3 and the vector is overrun.
issue