Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329355 - NPE when closing a view
Summary: NPE when closing a view
Status: RESOLVED WORKSFORME
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 329356 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-11-03 10:44 EDT by Olivier Thomann CLA
Modified: 2019-06-05 07:37 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2010-11-03 10:44:23 EDT
Using I20101029-1118,

I got the following stack trace when closing an editor. Unfortunately no steps to reproduce for now.

!ENTRY org.eclipse.e4.ui.workbench 4 0 2010-11-03 10:42:08.906
!MESSAGE Internal Error
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:59)
	at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:75)
	at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:90)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:326)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:343)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.activate(EclipseContext.java:598)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.activateBranch(EclipseContext.java:603)
	at org.eclipse.e4.ui.internal.workbench.PartActivationHistory.activate(PartActivationHistory.java:51)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:472)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:454)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.activate(PartServiceImpl.java:443)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.hidePart(PartServiceImpl.java:889)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.hidePart(PartServiceImpl.java:832)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.closePart(StackRenderer.java:493)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.access$5(StackRenderer.java:478)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer$5.close(StackRenderer.java:461)
	at org.eclipse.e4.ui.widgets.CTabFolder.onMouse(CTabFolder.java:1637)
	at org.eclipse.e4.ui.widgets.CTabFolder$2.handleEvent(CTabFolder.java:270)
	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:4084)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3675)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$6.run(PartRenderingEngine.java:783)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:692)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:104)
	at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:542)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:524)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	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:369)
	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:621)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:576)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1409)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1385)
Caused by: java.lang.NullPointerException
	at org.eclipse.ui.part.PageBookView$4.partDeactivated(PageBookView.java:1047)
	at org.eclipse.ui.internal.WorkbenchPage.firePartDeactivated(WorkbenchPage.java:3054)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:3043)
	at org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partDeactivated(WorkbenchPage.java:142)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.firePartDeactivated(PartServiceImpl.java:173)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.setPart(PartServiceImpl.java:140)
	at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:52)
	... 43 more
Comment 1 Olivier Thomann CLA 2010-11-03 10:48:12 EDT
Once I got this exception, I could no longer open any editor.
On shutdown I got:
!ENTRY org.eclipse.jface 4 0 2010-11-03 10:47:04.325
!MESSAGE Unhandled event loop exception during blocked modal context.
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
	at org.eclipse.swt.SWT.error(SWT.java:4091)
	at org.eclipse.swt.SWT.error(SWT.java:4006)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4059)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3678)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:173)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:388)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
	at org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.run(ProgressMonitorJobsDialog.java:275)
	at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.disconnectFromWorkspace(IDEWorkbenchAdvisor.java:515)
	at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.postShutdown(IDEWorkbenchAdvisor.java:348)
	at org.eclipse.ui.internal.Workbench.shutdown(Workbench.java:2638)
	at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:1054)
	at org.eclipse.ui.internal.Workbench.access$11(Workbench.java:952)
	at org.eclipse.ui.internal.Workbench$15.run(Workbench.java:1118)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.Workbench.close(Workbench.java:1116)
	at org.eclipse.ui.internal.Workbench.close(Workbench.java:1089)
	at org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:1055)
	at org.eclipse.ui.internal.WorkbenchWindow.access$9(WorkbenchWindow.java:1037)
	at org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindow.java:1084)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:1082)
	at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:1098)
	at org.eclipse.ui.internal.WorkbenchWindow$4.close(WorkbenchWindow.java:426)
	at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer$8.shellClosed(WBWRenderer.java:419)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:98)
	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:1062)
	at org.eclipse.swt.widgets.Decorations.closeWidget(Decorations.java:308)
	at org.eclipse.swt.widgets.Decorations.WM_CLOSE(Decorations.java:1665)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4167)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
	at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1598)
	at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2061)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4891)
	at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2455)
	at org.eclipse.swt.widgets.Shell.callWindowProc(Shell.java:497)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4256)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
	at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1598)
	at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2061)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4891)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2460)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3673)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$6.run(PartRenderingEngine.java:783)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:692)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:104)
	at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:542)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:524)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	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:369)
	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:621)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:576)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1409)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1385)
Caused by: java.lang.NullPointerException
	at org.eclipse.pde.internal.ui.PDEPlugin.internalGetActivePage(PDEPlugin.java:108)
	at org.eclipse.pde.internal.ui.PDEPlugin.getActivePage(PDEPlugin.java:74)
	at org.eclipse.pde.internal.ui.launcher.LaunchTerminationStatusHandler$2.run(LaunchTerminationStatusHandler.java:63)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	... 68 more
Comment 2 Dani Megert CLA 2010-11-03 11:14:19 EDT
*** Bug 329356 has been marked as a duplicate of this bug. ***
Comment 3 Remy Suen CLA 2010-11-03 11:28:57 EDT
(In reply to comment #0)
> Caused by: java.lang.NullPointerException
>     at
> org.eclipse.ui.part.PageBookView$4.partDeactivated(PageBookView.java:1047)
>     at
> org.eclipse.ui.internal.WorkbenchPage.firePartDeactivated(WorkbenchPage.java:3054)
>     at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:3043)
>     at
> org.eclipse.ui.internal.WorkbenchPage$E4PartListener.partDeactivated(WorkbenchPage.java:142)
>     at
> org.eclipse.e4.ui.internal.workbench.PartServiceImpl.firePartDeactivated(PartServiceImpl.java:173)
>     at
> org.eclipse.e4.ui.internal.workbench.PartServiceImpl.setPart(PartServiceImpl.java:140)
>     at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:597)
>     at
> org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:52)
>     ... 43 more

This might be a manifestation of bug 328944. Though it sounds to me as though the editor failed to be rendered as it has no context.

(In reply to comment #1)
> Caused by: java.lang.NullPointerException
>     at
> org.eclipse.pde.internal.ui.PDEPlugin.internalGetActivePage(PDEPlugin.java:108)
>     at org.eclipse.pde.internal.ui.PDEPlugin.getActivePage(PDEPlugin.java:74)
>     at
> org.eclipse.pde.internal.ui.launcher.LaunchTerminationStatusHandler$2.run(LaunchTerminationStatusHandler.java:63)
>     at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
>     at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
>     ... 68 more

Looks like a failed launch has conflicted with the shutdown process. This bug can actually manifest itself on 3.x. I've opened bug 329363 against PDE/UI.
Comment 4 Eclipse Genie CLA 2019-02-09 13:43:43 EST
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.
Comment 5 Lars Vogel CLA 2019-06-05 07:37:51 EDT
This is a mass change to close all e4 bugs marked with "stalebug" whiteboard.

If this bug is still valid, please reopen and remove the "stalebug" keyword.