For vision processing, we have two VisionThreads running, one for each camera, running. The threads pull frames from the camera and push the modified frames to mjpg servers. They also store results as a volitale reference to a VisionResult (an immutable object which stores the co-ordinates of targets, for use by other parts of the code). This part of the code is very simple and I’m confident that it contains no race conditions, but I may be wrong.
Ever since we started (with only one camera), we’ve had random segfaults that crash the whole JVM, or sometimes only crash the single vision thread. They’ve become much more frequent as we started using two cameras. The errors have been a bit varied, and some give incomplete information. Most of them seem to happen in libc. I managed to trace one memory address to somewhere in seekoff for an i/o stream. We’ve also had it that it crashes in free() or other places complaining about corrupted memory. This seems like it indicates some error in cscore, or some other native code.
I’m going to spend the rest of tonight trying to pin-point exactly what parts of our code are necessary for the error, and I’ll post that info here and on an issue in cscore when I figure it out. Has anyone else had this issue?