Closed karagenit closed 7 years ago
Started Robot, opened Camera stream on Smart Dashboard, did not enable teleop/auton. SSH'd to RIO and ran top
command to monitor memory usage.
At 4:35: 75k RAM free At 4:43: 28k RAM free
Crashed shortly after hitting 28k free.
Second test confirms this issue, 46k free after only 4 minutes. Crashed at ~29k free after 6 minutes.
Java JRE - 174m NIwebserver - 61k MainAppThread - 47k SystemWebServer - 26k FRC Net Comm Daemon - 24k
After crash, JRE was at 177m, others seem unchanged.
The CameraSubsystem patch that frees up used MATs didn't fix it. Interesting though, one time it actually appeared to correct itself: it jumped from ~40k free to ~55k free while I wasn't paying attention (without crashing the code).
Also, when the code crashes because of excessive memory usage it appears to not automatically restart itself like it usually does when an exception is thrown. Additionally, even after a re-deploy you must manually reboot the RIO to get it to work again. Maybe the JVM itself is dying?
Free MATs: Did not fix
Power Manager Thread: Did not fix (though robot code did restart itself)
Camera Thread: Did not fix
Pixy Dump & SmartDashboard: Somewhat helped?
Just Pixy Dump: Seems to be declining
Simple Robot Project: Fine
Try teleop running Disable updatesmartdashboard empty project
Based on the above, it seems like it may be the UpdateSmartDashboard command that is causing this issue (though we need further testing to confirm this). In the meantime, I'm going to try to write some fixes for the UpdateSmartDashboard command.
See Issue #104