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

Integer array updates do not appear in Shuffleboard #756

Closed
fovea1959 opened this issue Feb 6, 2023 · 0 comments · Fixed by #757
Closed

Integer array updates do not appear in Shuffleboard #756

fovea1959 opened this issue Feb 6, 2023 · 0 comments · Fixed by #757

Comments

@fovea1959
Copy link
Contributor

Describe the bug
Shuffleboard displays the initial value of an integer array, but does not update on subsequent .set() calls. This is occurring with 2023.3.2; untested on earlier versions.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy a Java robot project with the attached Main.java and Robot.java. robot.zip
  2. Start Shuffleboard from the command line so you can see it's logs in real time. Open the left pane so you can see data. Note that Shuffleboard logged several of these.
WARNING: Uncaught exception on JavaFX Application Thread
java.lang.NullPointerException: Cannot invoke "Object.getClass()" because the return value of "edu.wpi.first.networktables.NetworkTableValue.getValue()" is null
        at edu.wpi.first.shuffleboard.plugin.networktables.util.NetworkTableUtils.dataTypeForEntry(NetworkTableUtils.java:55)
...
  1. Enable teleop on the robot. Shuffleboard shows the correct values for SmartDashboard/tick and datatable/iat.
  2. Disable and reenable teleop on the robot (thus incrementing tick). Shuffleboard shows the incremented value in SmartDashboard/tick, but not datatable/iat. Shuffleboard additionally throws this log message:
Feb 06, 2023 12:03:59 PM edu.wpi.first.shuffleboard.app.Shuffleboard uncaughtException
WARNING: Uncaught exception on JavaFX Application Thread
java.lang.UnsupportedOperationException: Cannot compare primitive arrays of type long
        at edu.wpi.first.shuffleboard.api.util.EqualityUtils.isEqual(EqualityUtils.java:78)
        at edu.wpi.first.shuffleboard.api.util.EqualityUtils.isDifferent(EqualityUtils.java:21)
        at edu.wpi.first.shuffleboard.api.components.SourceTreeTable.makeBranches(SourceTreeTable.java:147)
        at edu.wpi.first.shuffleboard.api.components.SourceTreeTable.updateEntry(SourceTreeTable.java:72)
        at edu.wpi.first.shuffleboard.app.components.InteractiveSourceTree.lambda$new$5(InteractiveSourceTree.java:92)
        at com.sun.javafx.collections.MapListenerHelper$SingleChange.fireValueChangedEvent(MapListenerHelper.java:163)
        at com.sun.javafx.collections.MapListenerHelper.fireValueChangedEvent(MapListenerHelper.java:72)
        at com.sun.javafx.collections.ObservableMapWrapper.callObservers(ObservableMapWrapper.java:115)
        at com.sun.javafx.collections.ObservableMapWrapper.put(ObservableMapWrapper.java:169)
        at edu.wpi.first.shuffleboard.plugin.networktables.sources.NetworkTableSourceType.lambda$new$5(NetworkTableSourceType.java:87)
        at edu.wpi.first.shuffleboard.api.util.FxUtils.lambda$runOnFxThread$0(FxUtils.java:64)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
        at java.base/java.lang.Thread.run(Thread.java:833)
  1. Get into OutlineViewer and note that the networktable entries have indeed been udpated.

Expected behavior
I expect Shuffleboard to show the updates to the integer array.

Screenshots

Desktop (please complete the following information):

  • OS: Windows 10
  • Java version:
openjdk version "17.0.6" 2023-01-17
OpenJDK Runtime Environment Temurin-17.0.6+10 (build 17.0.6+10)
OpenJDK 64-Bit Server VM Temurin-17.0.6+10 (build 17.0.6+10, mixed mode, sharing)
  • Version 2023.3.2

Additional context

  • none -
fovea1959 added a commit to fovea1959/shuffleboard_fovea1959_widgets that referenced this issue Feb 6, 2023
@PeterJohnson PeterJohnson linked a pull request Feb 6, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant