Skip to content

Open SaR node button action does not work as expected #3681

@rosstitmarsh

Description

@rosstitmarsh

I have a button using the "Open SaR node" action with a valid composite snapshot node id specified. The node is nested inside two folders in SaR.

  • When I click the button it opens Save and Restore with no node opened.
    Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.control.TreeItem.getValue()" because "node" is null
            at org.phoebus.applications.saveandrestore.ui.SaveAndRestoreController.recursiveSearch(SaveAndRestoreController.java:816)
            at org.phoebus.applications.saveandrestore.ui.SaveAndRestoreController.locateNode(SaveAndRestoreController.java:832)
            at org.phoebus.applications.saveandrestore.ui.SaveAndRestoreController.lambda$openNode$48(SaveAndRestoreController.java:1354)
            at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
            at java.base/java.security.AccessController.doPrivileged(Unknown Source)
            at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
            at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
            ...
    
  • Click the button a second time and it uncollapses the first level folder in the sidebar
    Exception in thread "JavaFX Application Thread" java.lang.IndexOutOfBoundsException: 0 >= 0
            at javafx.scene.control.MultipleSelectionModelBase$SelectedIndicesList.get(MultipleSelectionModelBase.java:684)
            at javafx.scene.control.MultipleSelectionModelBase$SelectedIndicesList.get(MultipleSelectionModelBase.java:638)
            at com.sun.javafx.scene.control.SelectedItemsReadOnlyObservableList.get(SelectedItemsReadOnlyObservableList.java:99)
            at org.phoebus.applications.saveandrestore.ui.SaveAndRestoreController.nodeDoubleClicked(SaveAndRestoreController.java:591)
            at org.phoebus.applications.saveandrestore.ui.SaveAndRestoreController.lambda$openNode$48(SaveAndRestoreController.java:1355)
            at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
            ...
    
  • Click the button a third time and it uncollapses the second level folder that contains the node but does not open it
    Exception in thread "JavaFX Application Thread" java.lang.IndexOutOfBoundsException: 0 >= 0
            at javafx.scene.control.MultipleSelectionModelBase$SelectedIndicesList.get(MultipleSelectionModelBase.java:684)
            at javafx.scene.control.MultipleSelectionModelBase$SelectedIndicesList.get(MultipleSelectionModelBase.java:638)
            at com.sun.javafx.scene.control.SelectedItemsReadOnlyObservableList.get(SelectedItemsReadOnlyObservableList.java:99)
            at org.phoebus.applications.saveandrestore.ui.SaveAndRestoreController.nodeDoubleClicked(SaveAndRestoreController.java:591)
            at org.phoebus.applications.saveandrestore.ui.SaveAndRestoreController.lambda$openNode$48(SaveAndRestoreController.java:1355)
            at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
            ...
    
  • Clicking the button further times does not do anything, repeating the error above.

Trying it with a regular snapshot behaves differently, it does open the snapshot but after two clicks. The first opens SaR, the second uncollapses the first level folder and opens the snapshot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions