Universal_Robots_Client_Library icon indicating copy to clipboard operation
Universal_Robots_Client_Library copied to clipboard

Rtde consumer thread in ExampleRobotWrapper throws exception when terminated.

Open urmahp opened this issue 9 months ago • 1 comments

If you call startConsumingRTDEData(), from the ExampleRobotWrapper class, within your program and forget to call stopConsumingRTDEData(), before your program terminates it will throw an exception, because the class is destroyed while the thread is still running.

This should be handled properly in the destructor of the class by stopping the thread if it is running.

urmahp avatar May 27 '25 10:05 urmahp

I was a little too quick, there is a destructor destroying the consumer thread. The problem is that in many of the examples declare the ExampleRobotWrapper outside the main function, which does that the destructor wont be called and therefore it throws an exception if you forget to call stopConsumeRTDEDdata().

urmahp avatar Jun 02 '25 06:06 urmahp