ros-visualization / rqt_reconfigure

http://wiki.ros.org/rqt_reconfigure
Other
23 stars 50 forks source link

Crashes when displaying node contains param type=int, min=-1, max=None #104

Open furushchev opened 3 years ago

furushchev commented 3 years ago

Description

rqt_reconfigure node crashes when clicking a node that contains a parameter of type int, minimum value is -1 and maximum value is None (= INT_MAX). I confirmed the error occurs on ROS noetic.

How to reproduce

For instance, if the parameter definition like below is contained, rqt_reconfigure crashes.

gen.add("param_key", int_t, 0, "description", -1, -1, None)
$ rqt_reconfigure
Floating point exception (core dumped)

I investigated using gdb and it looks there may be a bug in Qt.

$ gdb -ex run --args /usr/bin/python -v /opt/ros/noetic/lib/rqt_reconfigure/rqt_reconfigure
Thread 1 "python" received signal SIGFPE, Arithmetic exception.
0x00007ffff001f0b7 in QStyle::sliderPositionFromValue(int, int, int, int, bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
bmegli commented 1 year ago

For me it happens at rqt_reconfigure startup (not clicking a node, but maybe it remembers node path)

The same problem happens when setting explicitly to INT_MAX (2147483647)

The highest value that doesn't lead to crash is INT_MAX -1 (2147483646)