Open Bvasilchikov opened 6 months ago
Related to this, Thunderscope
uses many network listeners, and based on usage, some never actually get instantiated as an optimization depending on the use case. However, there are .close()
methods called inside shutdown hooks, which throw runtime errors and this actually improperly shuts down thunderscope!! This can potentially having some side-effects we don't even know about yet, where stuff is left running in the background...
One particular case of the error being thrown is when clicking the "x" button on thunderscope - the following runtime error is logged:
An unknown network error occurred when attempting to shutdown UDP socket for TbotsProto::RobotLog. The boost system error is: Transport endpoint is not connected
The above occurs in RobotCommunication::__exit__()
, and when the --disable_communication
flag is used.
Swapping the order of self.receive_robot_log.close()
and receive_robot_status.close()
results in the error message also changing the type of proto, which confirms the issue.
Description of the task
There's some odd behaviour on using the flag
--disable_communication
and not specifying an interface -robot_communication.py
throws an error that interface cannot beNoneType
and crashes thunderscope completely. this occurs in during context set-up, inside__enter__()
methodAcceptance criteria
--disable_communication
needs better handling, similar to--run_blue/yellow
inthundersope_main.py:217
Blocked By