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

It is possible to hang Shuffleboard by setting Graph Update Rate too high #730

Open
fixermark opened this issue May 2, 2022 · 1 comment

Comments

@fixermark
Copy link
Contributor

Describe the bug
If the Graph Update Rate is set too high in the Base Plugin, Shuffleboard hangs and the preferences tab cannot be accessed again. The resulting error is persistent because the Graph Update Rate ends up stored in the Java Preferences API backing store.

To Reproduce

  1. Run Shuffleboard
  2. Open Preferences (ctrl-,)
  3. Select Plugins -> Base
  4. Change Graph Update Rate to 10000
  5. Hit OK

Expected behavior
Graph updates with a period of 10,000

Observed behavior
Application hangs. Upon restarting application, it continues to hang.

Desktop (please complete the following information):

  • OS: Linux 5.4.0-107-generic amd64 (Ubuntu 20.04.2 LTS)
  • Java version 11.0.13+8 -- Eclipse Adoptium
  • Version 2022.1.1

Workaround
Delete the stored preference file. On my system, it is at ~/.java/userPrefs/edu/api/first/shuffleboard/plugin/base/prefs.xml

@sciencewhiz
Copy link
Contributor

sciencewhiz commented Nov 29, 2022

This appears to be due to the garbage collector thrashing and not able to keep up with the addition of new data. Since network tables limits data to 100 hz, that seems like a reasonable limit for the graph update rate. At 200hz, I could watch the memory grow, and the GC kick into effect during which shuffleboard got choppy, but after a few seconds it recovered, memory dropped, and then started to grow again.

It also seemed to be slightly better with JDK 17 which is used for 2023, but not enough to keep it from being an issue at 10k.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants