Community
Participate
Working Groups
M20100909-0800 (3.6.1) I can't make this happen at will, but I have seen it with my customers in the field on 3.5.0 and I have hit it myself (once) in 3.6.1. Maybe I have captured enough information to track it down. (Oakland bug 4633) It looks like the problem happens because the same view (with no secondary ID) is ending up in the Perspective multiple times (there are two different ViewPane objects [808, 813] pointing to the same ViewPart [327]. Once it gets in this state, it always has a problem because the code in WorkbenchPage.certifyPart() calls Perspective.containsView() and it finds a ViewReference that has a null part (which is associated with one of the two ViewPanes (object id 813) - the other ViewPane is object id 813). Below find: [1] Stack trace showing the problem. Note that the view ResultsView is being created while in in the init() method of an EditorPart, not sure if this is allowed and maybe this is the source of the problem, but the problem rarely happens. [2] Variable dump of the relevant ViewPanes associated with the Perspective's MainLayout. [3] Variable dump in Perspective.containsView() showing the ViewReference that was found. ---------------- [1] org.eclipse.equinox.launcher.Main at localhost:60670 Thread [main] (Suspended (exception NullPointerException)) WorkbenchPage.busyShowView(IViewPart, int) line: 1106 WorkbenchPage.busyShowView(String, String, int) line: 1073 WorkbenchPage$20.run() line: 3822 BusyIndicator.showWhile(Display, Runnable) line: 70 WorkbenchPage.showView(String, String, int) line: 3819 Editor$9.run() line: 1039 RunnableLock.run() line: 35 UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 134 Display.runAsyncMessages(boolean) line: 3515 Display.readAndDispatch() line: 3164 ModalContext$ModalContextThread.block() line: 173 ModalContext.run(IRunnableWithProgress, boolean, IProgressMonitor, Display) line: 388 Editor(AppEditorImpl).showWaitCursorWhileProgress(Runnable, String, int) line: 2168 DependencyManager.doValidation(List<NodeReferenceInfo>, BaseMainNode, int) line: 886 DependencyManager.doValidationUponEditorOpen(BaseMainNode) line: 863 DependencyManager.editorOpened(BaseMainNode) line: 494 EditorMainObjectDelegate.init(IEditorSite, IEditorInput) line: 136 EditorMap(EditorMainObjectImpl).init(IEditorSite, IEditorInput) line: 212 EditorMap.init(IEditorSite, IEditorInput) line: 167 EditorManager.createSite(IEditorReference, IEditorPart, EditorDescriptor, IEditorInput) line: 798 EditorReference.createPartHelper() line: 647 EditorReference.createPart() line: 465 EditorReference(WorkbenchPartReference).getPart(boolean) line: 595 EditorReference.getEditor(boolean) line: 289 WorkbenchPage.busyOpenEditorBatched(IEditorInput, String, boolean, int, IMemento) line: 2863 WorkbenchPage.busyOpenEditor(IEditorInput, String, boolean, int, IMemento) line: 2768 WorkbenchPage.access$11(WorkbenchPage, IEditorInput, String, boolean, int, IMemento) line: 2760 WorkbenchPage$10.run() line: 2711 BusyIndicator.showWhile(Display, Runnable) line: 70 WorkbenchPage.openEditor(IEditorInput, String, boolean, int, IMemento) line: 2707 WorkbenchPage.openEditor(IEditorInput, String, boolean, int) line: 2691 WorkbenchPage.openEditor(IEditorInput, String) line: 2674 Editor.doTheOpen(BaseMainNode, int) line: 1521 Editor$13.run() line: 1598 RunnableLock.run() line: 35 UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 134 Display.runAsyncMessages(boolean) line: 3515 Display.readAndDispatch() line: 3164 ModalContext$ModalContextThread.block() line: 173 ModalContext.run(IRunnableWithProgress, boolean, IProgressMonitor, Display) line: 388 ProgressMonitorJobsDialog(ProgressMonitorDialog).run(boolean, boolean, IRunnableWithProgress) line: 507 ProgressMonitorJobsDialog.run(boolean, boolean, IRunnableWithProgress) line: 275 ProgressManager$5.run() line: 960 BusyIndicator.showWhile(Display, Runnable) line: 70 ProgressManager.busyCursorWhile(Runnable, ProgressMonitorJobsDialog) line: 995 ProgressManager.busyCursorWhile(IRunnableWithProgress) line: 970 AppEditorImpl$23.run() line: 2216 UISynchronizer(Synchronizer).syncExec(Runnable) line: 179 UISynchronizer.syncExec(Runnable) line: 150 Display.syncExec(Runnable) line: 4282 Editor(AppEditorImpl).displaySyncExec(Runnable) line: 1943 Editor(AppEditorImpl).showWaitCursorWhileProgress(Runnable, String, int) line: 2208 Editor(AppEditorImpl).showWaitCursorWhileProgress(Runnable, String) line: 2094 RuntimeEngineImpl(AppRuntimeImpl).showWaitCursorWhileProgress(Runnable, String) line: 1766 StandardMapNodeImpl(BaseNodeImpl).uiOpen() line: 1318 BaseTypeNode.doDoubleClick(IBaseTree, BaseNode) line: 510 Editor$5.doubleClick(DoubleClickEvent) line: 709 StructuredViewer$1.run() line: 824 SafeRunner.run(ISafeRunnable) line: 42 JFaceUtil$1.run(ISafeRunnable) line: 49 SafeRunnable.run(ISafeRunnable) line: 175 CommonViewer(StructuredViewer).fireDoubleClick(DoubleClickEvent) line: 822 CommonViewer(AbstractTreeViewer).handleDoubleSelect(SelectionEvent) line: 1421 CommonViewer.handleDoubleSelect(SelectionEvent) line: 454 StructuredViewer$4.widgetDefaultSelected(SelectionEvent) line: 1225 OpenStrategy.fireDefaultSelectionEvent(SelectionEvent) line: 238 OpenStrategy.access$0(OpenStrategy, SelectionEvent) line: 235 OpenStrategy$1.handleEvent(Event) line: 296 EventTable.sendEvent(Event) line: 84 Tree(Widget).sendEvent(Event) line: 1258 Display.runDeferredEvents() line: 3540 Display.readAndDispatch() line: 3161 Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2640 Workbench.runUI() line: 2604 Workbench.access$4(Workbench) line: 2438 Workbench$7.run() line: 671 Realm.runWithDefault(Realm, Runnable) line: 332 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 664 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149 IDEApplication.start(IApplicationContext) line: 115 EclipseAppHandle.run(Object) line: 196 EclipseAppLauncher.runApplication(Object) line: 110 EclipseAppLauncher.start(Object) line: 79 EclipseStarter.run(Object) line: 369 EclipseStarter.run(String[], Runnable) line: 179 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43 Method.invoke(Object, Object...) line: 616 Main.invokeFramework(String[], URL[]) line: 619 Main.basicRun(String[]) line: 574 Main.run(String[]) line: 1407 Main.main(String[]) line: 1383 Daemon Thread [Framework Event Dispatcher] (Running) Daemon Thread [Start Level Event Dispatcher] (Running) Daemon Thread [Bundle File Closer] (Running) Daemon Thread [[Timer] - Main Queue Handler] (Running) Thread [Worker-JM] (Running) Daemon Thread [Java indexing] (Running) Daemon Thread [JavaScript indexing] (Running) Thread [Worker-3] (Running) Thread [Worker-6] (Running) Thread [Worker-8] (Running) Daemon Thread [[ThreadPool Manager] - Idle Thread] (Running) Thread [ModalContext] (Running) Thread [ModalContext] (Running) [2] mainLayout ViewSashContainer (id=599) active true children ArrayList<E> (id=605) elementData Object[10] (id=608) [0] ContainerPlaceholder (id=610) [1] PartPlaceholder (id=612) [2] ContainerPlaceholder (id=615) [3] EditorSashContainer (id=458) [4] ViewStack (id=617) [5] ContainerPlaceholder (id=620) container ViewSashContainer (id=599) deferCount 0 [0x0] id "org.eclipse.ui.internal.ViewStack@41794179" (id=833) realContainer ViewStack (id=929) allowStateChanges true appearance 2 [0x2] children ArrayList<E> (id=1139) elementData Object[3] (id=1144) [0] ViewPane (id=813) busy false container ContainerPlaceholder (id=620) control null deferCount 0 [0x0] hadViewMenu true hasFocus false id "com.oaklandsw.transform.resultsView" (id=327) inLayout true isvMenuMgr ViewPane$PaneMenuManager (id=821) isvToolBarMgr ToolBarManager2 (id=823) isZoomed false listeners ListenerList (id=825) page WorkbenchPage (id=273) paneMenuManager null partListeners ListenerList (id=876) partReference ViewReference (id=333) traverseListener PartPane$1 (id=990) [1] ViewPane (id=808) busy false container ViewStack (id=1132) control Composite (id=947) deferCount 0 [0x0] hadViewMenu true hasFocus false id "com.oaklandsw.transform.resultsView" (id=327) inLayout true isvMenuMgr ViewPane$PaneMenuManager (id=512) isvToolBarMgr ToolBarManager2 (id=956) isZoomed false listeners ListenerList (id=958) page WorkbenchPage (id=273) paneMenuManager null partListeners ListenerList (id=961) partReference ViewReference (id=564) traverseListener PartPane$1 (id=963) [2] null modCount 22 [0x16] size 2 [0x2] container null current null deferCount 0 [0x0] detachViewAction SystemMenuDetach (id=1158) doingUnzoom false durable false factory null fastViewAction SystemMenuFastView (id=1224) id "org.eclipse.ui.internal.ViewStack@41794179" (id=833) ignoreSelectionChanges false isActive true isMinimized false listeners ListenerList (id=1232) page WorkbenchPage (id=273) presentableParts ArrayList<E> (id=1233) presentationCurrent null presentationSite PartStack$1 (id=1235) properties HashMap<K,V> (id=1236) requestedCurrent ViewPane (id=813) savedPresentationState XMLMemento (id=1237) sizeItem SystemMenuSize (id=1240) smartZoomed false [6] ViewStack (id=1132) allowStateChanges true appearance 2 [0x2] children ArrayList<E> (id=1160) elementData Object[3] (id=1161) [0] ViewPane (id=808) busy false container ViewStack (id=1132) control Composite (id=947) deferCount 0 [0x0] hadViewMenu true hasFocus false id "com.oaklandsw.transform.resultsView" (id=327) inLayout true isvMenuMgr ViewPane$PaneMenuManager (id=512) isvToolBarMgr ToolBarManager2 (id=956) isZoomed false listeners ListenerList (id=958) page WorkbenchPage (id=273) paneMenuManager null partListeners ListenerList (id=961) partReference ViewReference (id=564) traverseListener PartPane$1 (id=963) [1] null [2] null modCount 1 [0x1] size 1 [0x1] container ViewSashContainer (id=599) current ViewPane (id=808) deferCount 0 [0x0] detachViewAction SystemMenuDetach (id=1197) doingUnzoom false durable false factory null fastViewAction SystemMenuFastView (id=1201) id "org.eclipse.ui.internal.ViewStack@13d1711b" (id=1202) ignoreSelectionChanges false isActive true isMinimized false listeners ListenerList (id=1205) page WorkbenchPage (id=273) presentableParts ArrayList<E> (id=1207) presentationCurrent PresentablePart (id=1208) presentationSite PartStack$1 (id=1210) properties HashMap<K,V> (id=1216) requestedCurrent ViewPane (id=808) savedPresentationState null sizeItem SystemMenuSize (id=1217) smartZoomed false [7] null [8] null [9] null modCount 33 [0x21] size 7 [0x7] container null deferCount 0 [0x0] dropTarget null id "root layout container" (id=665) layoutDirty false page WorkbenchPage (id=273) parent Composite (id=389) parentWidget Composite (id=389) resizeListener PartSashContainer$1 (id=1166) root LayoutTreeNode (id=1169) zoomedPart null [3] ref ViewReference (id=333) actionBuilder null contentDescription "1 warning(s) - POPayPalCsv_PO2" (id=992) defaultImageDescriptor MissingImageDescriptor (id=993) factory ViewFactory (id=491) id "com.oaklandsw.transform.resultsView" (id=327) image null imageDescriptor MissingImageDescriptor (id=993) internalPropChangeListeners ListenerList (id=998) memento null pane ViewPane (id=813) part null partChangeListeners ListenerList (id=1002) partName "Integrator Problems" (id=526) partPropertyChangeListener WorkbenchPartReference$3 (id=1054) pinned false propChangeListeners ListenerList (id=1344) propertyCache HashMap<K,V> (id=1345) propertyChangeListener WorkbenchPartReference$2 (id=1346) queuedEvents BitSet (id=1347) queueEvents false secondaryId null state 3 [0x3] title "Integrator Problems (1 warning(s) - POPayPalCsv_PO2)" (id=1349) tooltip "" (id=551)
*** Bug 356540 has been marked as a duplicate of this bug. ***
I am seeing these in regression tests of STS that run with Eclipse 4.4.RC2 as target platform. build 12-Jun-2014 19:34:16 java.lang.NullPointerException build 12-Jun-2014 19:34:16 at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1273) build 12-Jun-2014 19:34:16 at org.eclipse.ui.internal.WorkbenchPage$13.run(WorkbenchPage.java:4144) build 12-Jun-2014 19:34:16 at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) build 12-Jun-2014 19:34:16 at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:4140) build 12-Jun-2014 19:34:16 at org.eclipse.ui.internal.console.ConsoleManager$ShowConsoleViewJob.runInUIThread(ConsoleManager.java:321) build 12-Jun-2014 19:34:16 at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:97) build 12-Jun-2014 19:34:16 at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) build 12-Jun-2014 19:34:16 at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136) build 12-Jun-2014 19:34:16 at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3806) build 12-Jun-2014 19:34:16 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3444) I haven't seen them during 'regular' use of Eclipse 4.4 so I am not sure if they can occur as such or only because of something 'funky' we may be doing in our test harness. The exceptions caused some test failures on our end. So I am dealing with them by catching the NPEs that pop out of calls to 'readAndDispatch' in our test harness and simply logging and ignoring them.
If you add an NPE breakpoint when you run the test could you perhaps give us the code that you're executing when the NPE occurs ? That'll help us track it down I think.
Not sure what code you'd want me to give you. As far as I can tell the error seems to come from a bit of code posted via a Display.asynchExec call. And as far as I can tell that call probably came from Eclipse code base: org.eclipse.ui.internal.console.ConsoleManager$ShowConsoleViewJob.runInUIThread(ConsoleManager.java:321) Anything that caused this job to be scheduled is really no longer there when the NPE breakpoint gets hit.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.