Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory issues in 2025 #64

Open
TheComputer314 opened this issue Dec 7, 2024 · 4 comments
Open

Memory issues in 2025 #64

TheComputer314 opened this issue Dec 7, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@TheComputer314
Copy link

TheComputer314 commented Dec 7, 2024

Describe the bug
A bunch of users in the FRC discord have been reporting OOM crashes when upgrading their projects from 2024 to the 2025 beta. All users reporting this are using RIO 1s.

To Reproduce
TBD. I haven't looked too deeply into this, but it seems to be a common thing.

Expected behavior
To not OOM.

@TheComputer314 TheComputer314 added the bug Something isn't working label Dec 7, 2024
@TheComputer314
Copy link
Author

If a team has code that does OOM on a RIO 1 with the 2025 beta, please link it here.

@chauser
Copy link

chauser commented Dec 7, 2024

https://bitbucket.org/sciborgs4061/robot-2025-beta/branches/ -- main branch
A bit of a caveat: I was testing on a RoboRio 1 that had none of the CAN motor controllers that the code uses and no camera. So there are a lot of warnings spewed out. But after about 45 seconds it runs out of memory just sitting in disabled and I observed that OOM would happen immediately when enabled.

And also, this code (roughly) was clearly on the hairy edge even in 2024 on a RoboRio 1 in that the "Restart Robot Code" button would not work on the DS unless the Rio configuration web server was disabled.

@21-CameronM
Copy link

https://github.com/21-CameronM/ComBBAT21-2025-Beta

Similar issue with OOM errors. Looking at the DS Logs, it's usually around 20 seconds before crashing while idling and disabled. Not very reliably, but when enabling the robot will sometimes crash from OOM.

Not entirely sure if this is related to WPI 2025, as the above comment exhibiting similar behavior also uses YAGSL and the handful of vendordeps that come with it.

@chauser
Copy link

chauser commented Dec 10, 2024

After more poking and prodding I'm pretty convinced that our code (sciborgs4061) is really just at the hairy edge. If anyone is having this problem on a roboRIO 1 I highly recommend disabling the NI system web server (you can use the Team Number Setter tool from the WPI menu in VSCode to do so temporarily -- the setting won't survive a reboot, though). That will make ~10MB more available for the robot program and for us that is enough.
To permanently (until restored or the rio is re-imaged) disable the web server see the instructions in the Disabling the Web Server section of https://docs.wpilib.org/en/latest/docs/software/basic-programming/java-gc.html.
I haven't found any critical need for the system web server so disabling it permanently is the way to go, in my opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants