So we are using a USB camera with GRIP generated code in Java in order to find retro-reflective tape targets. We are able to see these targets, and return their X positions, but sometimes when we run our robot, the numbers that are returned simply stop changing. This prevents us from getting new values from the camera until we redeploy code, and this only fixes the issue until the bug randomly occurs again. The issue can be replicated by using visionThread.stop(), it has the exact same effect. If we try to use visionThread.start() in TeleopPeriodic to restart the vision program, it crashes: we lose code and comms for a second or two before it returns.
The code is a slightly modified version of the code found in the WPILIB documentation for vision processing, in addition to some NavX stuff. The class that it is calling, VisionPipelinew(), is just the code generated from GRIP.
Code here: https://github.com/NeutralIntel/3826code2017/blob/master/2017COAD