Community
Participate
Working Groups
I20120123-1210 - Make sure 'Call Hierarchy' view is not open in Debug perspective - Switch to Java Perspective - Open Call Hierarchy on some method, and then 'Pin' the view - Open Call Hierarchy on another method, and also 'Pin' this view (since the first view was pinned a second Call Hierarchy view will be created) - Open Call Hierarchy on one more method - Bring focus on one of the pinned Call Hierarchy views - Now switch to Debug perspective - Open Call Hierarchy on a method => The first NPE shown below - Select an element in the view => The second NPE shown below I can reproduce this consistently with multiple Call Hierarchy views opened and some of them pinned in the Java perspective. ------------------------------------------------------------------------------- java.lang.NullPointerException at org.eclipse.ui.internal.e4.compatibility.SelectionService.selectionChanged(SelectionService.java:322) at org.eclipse.jdt.internal.ui.viewsupport.SelectionProviderMediator.fireSelectionChanged(SelectionProviderMediator.java:131) at org.eclipse.jdt.internal.ui.viewsupport.SelectionProviderMediator.propagateFocusChanged(SelectionProviderMediator.java:119) at org.eclipse.jdt.internal.ui.viewsupport.SelectionProviderMediator.doFocusChanged(SelectionProviderMediator.java:96) at org.eclipse.jdt.internal.ui.viewsupport.SelectionProviderMediator.access$0(SelectionProviderMediator.java:93) at org.eclipse.jdt.internal.ui.viewsupport.SelectionProviderMediator$InternalListener.focusGained(SelectionProviderMediator.java:47) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:139) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058) at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2822) at org.eclipse.swt.widgets.Widget.wmSetFocus(Widget.java:2403) at org.eclipse.swt.widgets.Control.WM_SETFOCUS(Control.java:5152) at org.eclipse.swt.widgets.Tree.WM_SETFOCUS(Tree.java:7045) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4598) at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5939) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972) at org.eclipse.swt.internal.win32.OS.SetFocus(Native Method) at org.eclipse.swt.widgets.Control.forceFocus(Control.java:1098) at org.eclipse.swt.widgets.Control.setFocus(Control.java:3303) at org.eclipse.swt.widgets.Composite.setFocus(Composite.java:1040) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyViewer.setFocus(CallHierarchyViewer.java:82) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyViewer.setMethodWrappers(CallHierarchyViewer.java:68) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyViewPart.updateView(CallHierarchyViewPart.java:1154) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyViewPart.refresh(CallHierarchyViewPart.java:778) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyViewPart.setInputElements(CallHierarchyViewPart.java:303) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyUI.openView(CallHierarchyUI.java:245) at org.eclipse.jdt.internal.ui.callhierarchy.CallHierarchyUI.openSelectionDialog(CallHierarchyUI.java:226) at org.eclipse.jdt.internal.ui.callhierarchy.OpenCallHierarchyAction.run(OpenCallHierarchyAction.java:120) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:279) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:999) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:893) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:85) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:577) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:532) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) 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:352) 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:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:624) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579) at org.eclipse.equinox.launcher.Main.run(Main.java:1433) at org.eclipse.equinox.launcher.Main.main(Main.java:1409) ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- java.lang.NullPointerException at org.eclipse.ui.internal.e4.compatibility.SelectionService.selectionChanged(SelectionService.java:322) at org.eclipse.jdt.internal.ui.viewsupport.SelectionProviderMediator.fireSelectionChanged(SelectionProviderMediator.java:131) at org.eclipse.jdt.internal.ui.viewsupport.SelectionProviderMediator.doSelectionChanged(SelectionProviderMediator.java:112) at org.eclipse.jdt.internal.ui.viewsupport.SelectionProviderMediator$InternalListener.selectionChanged(SelectionProviderMediator.java:40) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:164) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:162) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2188) at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1211) at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1241) at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:239) at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:233) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:403) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:999) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:893) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:85) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:577) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:532) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) 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:352) 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:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:624) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579) at org.eclipse.equinox.launcher.Main.run(Main.java:1433) at org.eclipse.equinox.launcher.Main.main(Main.java:1409) -------------------------------------------------------------------------------
Looks like we can't find the model of the part in question.
The problem has been identified and will be fixed in M6. Thank you very much for the bug report, Deepak!
Fix pushed to master. http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=147c89b225a920c29becb8d5da557013a6f30a52 Thanks again, Deepak.
Verified with I20120312-1730 on Windows 7. Thanks again for finding this bug, Deepak.