Skip to content

Process exit, rclpy._rclpy_pybind11.InvalidHandle: cannot use Destroyable because destruction was requested  #148

@conby

Description

@conby

Describe the bug
Endpoint process exit with error:
rclpy._rclpy_pybind11.InvalidHandle: cannot use Destroyable because destruction was requested

To Reproduce

  1. boot ROS-TCP-Endpoint node (ROS2)
  2. try to connect and disconnect from unity client several times
  3. Endpoint process exited with error
  4. See error

Console logs / stack traces
[INFO] [1652075356.407162168] [UnityEndpoint]: Disconnected from 192.168.8.166
[INFO] [1652076762.672048998] [UnityEndpoint]: Connection from 192.168.8.166
[INFO] [1652076763.037987192] [UnityEndpoint]: RegisterSubscriber(/image2, <class 'sensor_msgs.msg._compressed_image.CompressedImage'>) OK
[INFO] [1652076763.106981882] [UnityEndpoint]: RegisterSubscriber(/imagez, <class 'sensor_msgs.msg._compressed_image.CompressedImage'>) OK
The following exception was never retrieved: 'NoneType' object has no attribute 'put'
[INFO] [1652076763.602603903] [UnityEndpoint]: RegisterSubscriber(/tf, <class 'tf2_msgs.msg._tf_message.TFMessage'>) OK
Traceback (most recent call last):
File "/home/hee/ros2_galactic/install/ros_tcp_endpoint/lib/ros_tcp_endpoint/default_server_endpoint", line 33, in
sys.exit(load_entry_point('ros-tcp-endpoint', 'console_scripts', 'default_server_endpoint')())
File "/home/hee/ros2_galactic/build/ros_tcp_endpoint/ros_tcp_endpoint/default_server_endpoint.py", line 14, in main
tcp_server.setup_executor()
File "/home/hee/ros2_galactic/build/ros_tcp_endpoint/ros_tcp_endpoint/server.py", line 177, in setup_executor
executor.spin()
File "/home/hee//ros2_galactic/install/rclpy/lib/python3.6/site-packages/rclpy/executors.py", line 279, in spin
self.spin_once()
File "/home/hee/ros2_galactic/install/rclpy/lib/python3.6/site-packages/rclpy/executors.py", line 757, in spin_once
self._spin_once_impl(timeout_sec)
File "/home/hee/ros2_galactic/install/rclpy/lib/python3.6/site-packages/rclpy/executors.py", line 744, in _spin_once_impl
timeout_sec, None, wait_condition)
File "/home/hee/ros2_galactic/install/rclpy/lib/python3.6/site-packages/rclpy/executors.py", line 690, in wait_for_ready_callbacks
return next(self._cb_iter)
File "/home/hee/ros2_galactic/install/rclpy/lib/python3.6/site-packages/rclpy/executors.py", line 585, in _wait_for_ready_callbacks
waitable.add_to_wait_set(wait_set)
File "/home/hee/ros2_galactic/install/rclpy/lib/python3.6/site-packages/rclpy/qos_event.py", line 114, in add_to_wait_set
with self.__event:
rclpy._rclpy_pybind11.InvalidHandle: cannot use Destroyable because destruction was requested

Expected behavior
Endpoint process should not exit

Environment (please complete the following information, where applicable):

  • Unity Version: [e.g. Unity 2022.1]
  • Unity machine OS + version: [Windows 10]
  • Unity machine OS + version: [Android 11]
  • ROS machine OS + version: [Ubuntu 18.04, ROS2 galactic]
  • ROS–Unity communication: [TCP, public internet]
  • Branch or version: [e.g. v0.7.0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions