Closed ciandonovan closed 1 year ago
This only happens with Python and not C++ plugins, and only when the Python plugin is loaded in RQT. With RQT running and no plugin loaded, it responds to a SIGINT correctly.
However, RQT alone, or with either Python or C++ plugins loaded, will never respond to a SIGTERM, but will log it.
[INFO] [1662406460.729305639] [rclcpp]: signal_handler(signum=15)
I think it has already been fixed in #291.
Yes, you are right. I'm going to go ahead and close this one out, thanks!
System Information
ROS2 Humble on Ubuntu 22.04
Xorg
Python 3.10.4
Problem Description
All RQT Python plugins throw an exception on receipt of an interrupt signal (SIGINT).
This behavior can not be reproduced on ROS2 Foxy, and seems to be a regression introduced in either Galactic or Humble.
Seemingly the code handling the RQT plugin calls
rclpy.shutdown()
, despite the fact that this function will also always be called later by RQT, where it then complains that the function has already been called.rclpy.shutdown() was called before QThread.quit()
The above line also suggests that the order in which the node is torn down is incorrect when handling signals in respect to QT. Interestingly that warning isn't thrown when an RQT plugin is closed through its desktop window close button.
https://github.com/ros-visualization/rqt/blob/6cf57076b8501264497fd7355997335b3d05d511/rqt_gui_py/src/rqt_gui_py/ros_py_plugin_provider.py#L89
Removing this line prevents
rclpy.shutdown()
from being called twice and crashing, however it stills complains about being called beforeQThread.quit()