ros2cs icon indicating copy to clipboard operation
ros2cs copied to clipboard

Unity hangs when client is waiting for service being debugged

Open moccij opened this issue 4 months ago • 0 comments

Hi,

By calling the desired service with Call(request) from a Unity client, the service implemented on another C++ process executes its callback and builds the response, so that Unity can receive and process it. Under normal conditions the Unity client is always able to process the response, even when the C++ service callback takes time to complete the callback.

If the C++ service callback hits a debugger breakpoint and then gets resumed after some time (20secs), then the Unity client never receives the response and hangs, unable to recover. If the callback gets resumed very early then the Unity client is more likely to receive the response.

This behavior is not observed when calling the service from a C++ or Python client (ex. with rqt).

All ROS2 binaries are built for Windows x64 from ROS2 Humble sources. The connector binaries are also compiled in the same way. Debugging is done with cdb.

This problem is reproduced on multiple machines, with both Windows 10 and Windows 11.

moccij avatar Mar 13 '24 15:03 moccij