ros-visualization / rqt_bag

http://wiki.ros.org/rqt_bag
31 stars 55 forks source link

Running rqt_bag against PyQt 5.15.6 can still crash #111

Open clalancette opened 2 years ago

clalancette commented 2 years ago

The version of PyQt on Ubuntu 22.04 is 5.15.6, and it is a lot more picky about the types being passed into API calls. In particular, trying to pass in float values to API calls like setPointSize(self, int) result in an exception now. We've fixed some of these, but more need to be fixed. See #108 for more information.

geoeo commented 2 years ago

Is there an ETA on this? This is a big problem for image based workflows

ijnek commented 2 years ago

@geoeo

The runtime errors are hard to find (and time consuming), I believe the maintainers (or myself) aren't going to get around to this soon.

I think the quickest way to solve this would be to squash one error at a time as they arise. I'm going to post the stacktrace you posted in #108 below for reference. Would you be able to post any other python stack traces that arise too?

Traceback (most recent call last):
  File "/opt/ros/rolling/local/lib/python3.10/dist-packages/qt_gui/plugin_handler.py", line 102, in load
    self._load()
  File "/opt/ros/rolling/local/lib/python3.10/dist-packages/qt_gui/plugin_handler_direct.py", line 55, in _load
    self._plugin = self._plugin_provider.load(self._instance_id.plugin_id, self._context)
  File "/opt/ros/rolling/local/lib/python3.10/dist-packages/qt_gui/composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/rolling/local/lib/python3.10/dist-packages/qt_gui/composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/rolling/lib/python3.10/site-packages/rqt_gui_py/ros_py_plugin_provider.py", line 69, in load
    return super(RosPyPluginProvider, self).load(plugin_id, ros_plugin_context)
  File "/opt/ros/rolling/local/lib/python3.10/dist-packages/qt_gui/composite_plugin_provider.py", line 72, in load
    instance = plugin_provider.load(plugin_id, plugin_context)
  File "/opt/ros/rolling/lib/python3.10/site-packages/rqt_gui/ros_plugin_provider.py", line 107, in load
    return class_ref(plugin_context)
  File "/opt/ros/rolling/lib/python3.10/site-packages/rqt_bag/bag.py", line 58, in __init__
    self._widget = BagWidget(context, args.clock)
  File "/opt/ros/rolling/lib/python3.10/site-packages/rqt_bag/bag_widget.py", line 84, in __init__
    self._timeline = BagTimeline(context, publish_clock)
  File "/opt/ros/rolling/lib/python3.10/site-packages/rqt_bag/bag_timeline.py", line 111, in __init__
    self._timeline_frame = TimelineFrame(self)
  File "/opt/ros/rolling/lib/python3.10/site-packages/rqt_bag/timeline_frame.py", line 131, in __init__
    self._topic_font.setPointSize(self._topic_font_size)
TypeError: setPointSize(self, int): argument 1 has unexpected type 'float'
ijnek commented 2 years ago

@geoeo That exact error you posted earlier should have been resolved in this rolling sync a while back. Do you have some other errors that you could post here?

geoeo commented 2 years ago

@ijnek Is this part of humble as well or is it planned to be?

geoeo commented 2 years ago

I just updated my rolling and humble via ubuntu software updater. And now I get a different error

  File "/opt/ros/humble/lib/python3.10/site-packages/rqt_bag/timeline_frame.py", line 297, in paint
    self._draw_time_divisions(painter)
  File "/opt/ros/humble/lib/python3.10/site-packages/rqt_bag/timeline_frame.py", line 651, in _draw_time_divisions
    self._draw_major_divisions(painter, major_stamps, start_stamp, major_division)
  File "/opt/ros/humble/lib/python3.10/site-packages/rqt_bag/timeline_frame.py", line 673, in _draw_major_divisions
    painter.drawText(label_x, label_y, label)
TypeError: arguments did not match any overloaded call:
  drawText(self, Union[QPointF, QPoint], str): argument 1 has unexpected type 'float'
  drawText(self, QRectF, int, str): argument 1 has unexpected type 'float'
  drawText(self, QRect, int, str): argument 1 has unexpected type 'float'
  drawText(self, QRectF, str, option: QTextOption = QTextOption()): argument 1 has unexpected type 'float'
  drawText(self, QPoint, str): argument 1 has unexpected type 'float'
  drawText(self, int, int, int, int, int, str): argument 1 has unexpected type 'float'
  drawText(self, int, int, str): argument 1 has unexpected type 'float'
Traceback (most recent call last):
  File "/opt/ros/humble/lib/python3.10/site-packages/rqt_bag/timeline_frame.py", line 297, in paint
    self._draw_time_divisions(painter)
  File "/opt/ros/humble/lib/python3.10/site-packages/rqt_bag/timeline_frame.py", line 651, in _draw_time_divisions
    self._draw_major_divisions(painter, major_stamps, start_stamp, major_division)
  File "/opt/ros/humble/lib/python3.10/site-packages/rqt_bag/timeline_frame.py", line 673, in _draw_major_divisions
    painter.drawText(label_x, label_y, label)
TypeError: arguments did not match any overloaded call:
  drawText(self, Union[QPointF, QPoint], str): argument 1 has unexpected type 'float'
  drawText(self, QRectF, int, str): argument 1 has unexpected type 'float'
  drawText(self, QRect, int, str): argument 1 has unexpected type 'float'
  drawText(self, QRectF, str, option: QTextOption = QTextOption()): argument 1 has unexpected type 'float'
  drawText(self, QPoint, str): argument 1 has unexpected type 'float'
  drawText(self, int, int, int, int, int, str): argument 1 has unexpected type 'float'
  drawText(self, int, int, str): argument 1 has unexpected type 'float'

The error is the same in both humble and rolling

ijnek commented 2 years ago

@ijnek Is this part of humble as well or is it planned to be?

Yes, such bug ports are/will be backported to humble. In regards to your last error, i have some fixes in #118. Please post more errors as you encounter them.

geoeo commented 2 years ago

Do you know when that pull request will be released on humble? Are they monthly/quarterly releases?

ijnek commented 2 years ago

Once this PR is merged, the package maintainer would have to backport the changes to the humble branch, make a new release, and then the releases will get synced to the distros when a sync happens. There is no specific schedule for the syncs, but they happen usually once every 1-2 months.

If you want to get notified about the releases, you could enable notifications for the release tag on ROS Discourse.

In the meantime, there's nothing stopping you from building this repo from source (once the PR is merged and backported to Humble) and using it in your projects!

ros-discourse commented 2 years ago

This issue has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/when-will-rqt-bag-be-synced-on-humble/27168/1