Robot Occasionally Becomes Completely Unresponsive

Hey! Throughout my team’s programming of this year’s robot, we’ve ended up coming across a very big problem several times that we don’t know how to resolve. It seems that, pretty much randomly, the robot stops responding to all inputs. The DriverStation still shows our joysticks connected and working, but it seems as though all periodic robot functions stop being called. There is no error in the console to explain this, however there are several 0.2s loop time overrun warnings and occasionally a “HAL: CAN Receive has Timed Out” error. The full code for the robot can be seen on GitHub, I’m not really sure where the problem is actually occurring. https://github.com/team61/frc-2022-robot/tree/master/src/main/java/frc/robot

I’m able to provide additional information such as logs if needed.

There’s a known issue where joystick input will no longer take effect. I believe the issue was a JVM bug that caused a kernel crash (don’t quote me on that last part). It was resolved in wpilib 2022.2.1. I see you’re still on 2022.1.1 (kickoff release), rules have since been updated to REQUIRE 2022.3.1 or later (2022.4.1 exists as well) and the 4.0 roborio image, so you’ll need to update anyway.

If that doesn’t solve your issues, do some more testing and let us know what else is wrong

We had this same issue about a week ago now. Our problem was that we had a while loop infinitely run in one of our commands, so as soon as that command was scheduled (which was a controller button), the code would get stuck executing that one loop forever, and never reach the parts of the code which poll controllers or update motor speeds or anything. When this happened, we also had several loop time overruns, but I don’t remember if there were any CAN Receive timeouts. I couldn’t find any infinite loops with a preliminary search of your code so I can’t say for sure if it’s the same issue, but I hope my story can be of some use to you.

See WPILib 2022.4.1 Release - Technical / Programming - Chief Delphi

Might or might not be your issue, but worth a read regardless.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.