Yesterday when running our code on the robot, we were randomly getting a SEGV fault on the roborio.
It also seemed to occur randomly, happening when a SmartDashboard line was added, or even when a function call was removed. The stack trace that preceded it always pointed to the line where the vision measurement is added to the pose estimation.
var vposeOpt = poseSupplier.getEstimatedGlobalPose(getPose()); if(vposeOpt.isEmpty()) return; var vpose = vposeOpt.get(); SmartDashboard.putString("vpose", vpose.estimatedPose.toString()); //this line is what the stack trace points to \/ poseEstimator.addVisionMeasurement(vpose.estimatedPose.toPose2d(), vpose.timestampSeconds); visionPose= vpose.estimatedPose.toPose2d();
Surrounding that line with try/catch with Exception in the catch statement did not solve it.
The code is at code
Right now the code does not segfault but uncommenting this line
causes it to segfault.
We are also using the following software/libs
hs_err_pid1682.txt (59.0 KB)