Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shiboken error #267

Merged
merged 1 commit into from
Mar 1, 2023

Conversation

hellantos
Copy link
Contributor

When running rqt with PySide2 it does not shutdown cleanly.

PluginHandler.shutdown_plugin() plugin "rqt_topic/TopicPlugin#1" raised an exception:
Traceback (most recent call last):
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/plugin_handler.py", line 136, in shutdown_plugin
    self._shutdown_plugin()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/plugin_handler_direct.py", line 92, in _shutdown_plugin
    self.emit_shutdown_plugin_completed()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/plugin_handler.py", line 150, in emit_shutdown_plugin_completed
    callback(self._instance_id)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/plugin_manager.py", line 480, in _close_application_shutdown_callback
    self._close_application_signal()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/plugin_manager.py", line 483, in _close_application_signal
    self._plugin_provider.shutdown()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/composite_plugin_provider.py", line 87, in shutdown
    plugin_provider.shutdown()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/composite_plugin_provider.py", line 87, in shutdown
    plugin_provider.shutdown()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/qt_gui/composite_plugin_provider.py", line 87, in shutdown
    plugin_provider.shutdown()
  File "/home/christoph/ws_ros2/install/qt_gui_cpp/local/lib/python3.10/dist-packages/qt_gui_cpp/ros_pluginlib_plugin_provider.py", line 95, in shutdown
    self._plugin_provider.shutdown()
AttributeError: 'libqt_gui_cpp_shiboken.qt_gui_cpp.RosPluginlibPlug' object has no attribute 'shutdown

Shiboken2 does not generate or optimizes the shutdown function away. This fix adds it manually - it is an empty function anyway.

@mjcarroll mjcarroll merged commit cabbbc7 into ros-visualization:rolling Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants