Fuse IDE
  1. Fuse IDE
  2. ECLIPSE-545

NPE in Fabric Explorer Tree when selecting Refresh when you are disconnected

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2.1.0
    • Component/s: None
    • Labels:
      None
    • Similar Issues:
      Show 9 results 

      Description

      To reproduce

      1. Connect to a local fabric
      2. Expand the tree, so you can see containers etc
      3. Disconnect from local fabric
      4. Select the Containers node (see screenshot)
      5. Right click -> Refresh

      You get the NPE below.

      java.lang.NullPointerException
      	at com.fusesource.ide.fabric.navigator.VersionsNode.loadChildren(VersionsNode.java:40)
      	at com.fusesource.rider.commons.tree.RefreshableNode.checkLoaded(RefreshableNode.java:79)
      	at com.fusesource.ide.fabric.navigator.VersionsNode.getDefaultVersionNode(VersionsNode.java:55)
      	at com.fusesource.ide.fabric.navigator.Fabric.getDefaultVersionNode(Fabric.java:163)
      	at com.fusesource.ide.fabric.actions.CreateSshAgentAction.<init>(CreateSshAgentAction.java:31)
      	at com.fusesource.ide.fabric.navigator.Fabric.provideContextMenu(Fabric.java:159)
      	at com.fusesource.ide.jmx.ui.internal.views.navigator.ActionProvider.fillContextMenu(ActionProvider.java:74)
      	at org.eclipse.ui.navigator.NavigatorActionService$2.run(NavigatorActionService.java:221)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      	at org.eclipse.ui.navigator.NavigatorActionService.addCommonActionProviderMenu(NavigatorActionService.java:216)
      	at org.eclipse.ui.navigator.NavigatorActionService.fillContextMenu(NavigatorActionService.java:173)
      	at org.eclipse.ui.navigator.CommonNavigatorManager.fillContextMenu(CommonNavigatorManager.java:260)
      	at org.eclipse.ui.navigator.CommonNavigatorManager$4.menuAboutToShow(CommonNavigatorManager.java:275)
      	at org.eclipse.jface.action.MenuManager.fireAboutToShow(MenuManager.java:342)
      	at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:473)
      	at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:469)
      	at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:495)
      	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:247)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1461)
      	at org.eclipse.swt.widgets.Menu.menuWillOpen(Menu.java:805)
      	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5525)
      	at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
      	at org.eclipse.swt.internal.cocoa.NSMenu.popUpContextMenu(NSMenu.java:73)
      	at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:277)
      	at org.eclipse.swt.widgets.Display.runPopups(Display.java:4051)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3606)
      	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
      	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
      	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
      	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
      	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
      	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
      	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
      	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
      	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
      

        Activity

        Hide
        Claus Ibsen
        added a comment -

        It appears that if you are disconnected, then the "Refresh" menu item is still active. I guess it should be non-active. As you would need to Connect first, before it can work.

        The same NPE appears if you do the same on the "Local Fabric" node, and chose Refresh.

        Show
        Claus Ibsen
        added a comment - It appears that if you are disconnected, then the "Refresh" menu item is still active. I guess it should be non-active. As you would need to Connect first, before it can work. The same NPE appears if you do the same on the "Local Fabric" node, and chose Refresh.
        Hide
        Lars Heinemann
        added a comment -

        I was unable to reproduce that issue here but I added appropriate null checks to prevent this in future.

        Show
        Lars Heinemann
        added a comment - I was unable to reproduce that issue here but I added appropriate null checks to prevent this in future.

          People

          • Assignee:
            Lars Heinemann
            Reporter:
            Claus Ibsen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: