You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When loading a bag which contains messages with INT64 fields whose values are bigger than std::numerical_limits<double>::max, a "Floating point truncated" execption is thrown:
Steps to reproduce (important)
OS Ubuntu 22.04
Plotjuggler 3.8.3
plotjuggler_msgs 0.2.2
plotjuggler-ros-plugins 3.8.3
Reproduction
Create bag with message which has INT64 field with value bigger than std::numerical_limits<double>::max
Open plotjuggler .
File -> Data -> Load the bag
Root Cause Analysis
When loading the bag, the function member function convert() is called for a Variant object which contains the too big INT64 value in _storage.raw_data[0]. In LOC 359, this value is converted to double using the convert_impl function with template arguments SRC equal to int64_t and DST as double.
This function is implemented in converstion_impl.hpp and checks if the conversion can be done exactly and throws a RangeException otherwise in LOC 334
Since the max value of INT64 is bigger than the max value of double, this can happen for messages with INT64 field with too big values.
that will take me considerable more time than simply remove the exception.
I will do it once I have time. Feel free of course to create a PR to fix this
Problem description
When loading a bag which contains messages with INT64 fields whose values are bigger than
std::numerical_limits<double>::max
, a "Floating point truncated" execption is thrown:Steps to reproduce (important)
std::numerical_limits<double>::max
Root Cause Analysis
When loading the bag, the function member function
convert()
is called for aVariant
object which contains the too bigINT64
value in_storage.raw_data[0]
. In LOC 359, this value is converted to double using theconvert_impl
function with template argumentsSRC
equal toint64_t
andDST
asdouble
.This function is implemented in converstion_impl.hpp and checks if the conversion can be done exactly and throws a RangeException otherwise in LOC 334
Since the max value of INT64 is bigger than the max value of double, this can happen for messages with INT64 field with too big values.
Problem cannot be reproduced with dummy data
Minimal bag to reproduce problem: fake_int64_data.zip
The text was updated successfully, but these errors were encountered: