We’ve been having a few issues getting our kinect code (in Java) and cRIO to work properly this year. The first issue we had was when our code accidentally called the cancel() method of a command that had not yet been instantiated. Before we got the usual NullPointerException and “Robots don’t quit”, the robot locked up and continued to leave all outputs in the state they were in when the error happened. As the robot uncontrollably drove forward for about 2 seconds, it printed the cryptic error message “RetVal: 3” several hundred times, then stopped and printed the stack trace. All motor control outputs were disabled, but relays remained on.
After fixing the mistake, we thought we resolved the problem, but we again experienced the RetVal: 3 message again, which appeared in netconsole about 10 times, and lost communication with the robot. This happened several more times throughout the night, and the cRIO boot time began to increase after each code change. Reimaging did not solve the problem.
Our kinect code creates a kinect stick, then calls the getY() method on that KinectStick. The only time we read values from the Kinect are during the disabledPeriodic method, but all crashes happened when the robot was teleop enabled.