Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 323496

Summary: Unrendered perspectives do not unrender its child parts even if there are no other perspectives referencing the parts
Product: [Eclipse Project] e4 Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Project Inbox <e4.ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 1.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
PartRenderingEngineTests tests patch v1 none

Description Remy Suen CLA 2010-08-24 10:07:28 EDT
1. Window > Open Perspective > Debug
2. Window > Open Perspective > Java
3. Window > Close Perspective
4. Window > Close Perspective
5. Shutdown. NPEs will be thrown for parts that are not in the 'Debug' perspective like the 'Package Explorer'. We expect the 'Package Explorer' to have been deconstructed when the 'Java' perspective was closed in step 3 because it is not in the 'Debug' perspective since there should have been zero references to it remaining.

java.lang.NullPointerException
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart.dispose(PackageExplorerPart.java:451)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.invalidate(CompatibilityPart.java:129)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.destroy(CompatibilityPart.java:236)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:618)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:52)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:796)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:776)
	at org.eclipse.e4.core.internal.di.InjectorImpl.uninject(InjectorImpl.java:163)
	at org.eclipse.e4.core.internal.di.InjectorImpl.disposed(InjectorImpl.java:327)
	at org.eclipse.e4.core.internal.di.Requestor.disposed(Requestor.java:112)
	at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:59)
	at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:90)
	at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.doHandleInvalid(TrackableComputationExt.java:53)
	at org.eclipse.e4.core.internal.contexts.Computation.handleInvalid(Computation.java:59)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.dispose(EclipseContext.java:196)
	at org.eclipse.e4.core.internal.contexts.EclipseContext.dispose(EclipseContext.java:186)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.clearContext(PartRenderingEngine.java:604)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:545)
	at org.eclipse.ui.internal.WorkbenchWindow.hardClose(WorkbenchWindow.java:1358)
	at org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:1059)
	at org.eclipse.ui.internal.WorkbenchWindow.access$9(WorkbenchWindow.java:1038)
	at org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindow.java:1085)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:1083)
	at org.eclipse.ui.internal.Workbench$14.run(Workbench.java:1048)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:1042)
	at org.eclipse.ui.internal.Workbench.access$11(Workbench.java:956)
	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:1056)
	at org.eclipse.ui.internal.WorkbenchWindow.access$9(WorkbenchWindow.java:1038)
	at org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindow.java:1085)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:1083)
	at org.eclipse.ui.internal.WorkbenchWindow.close(WorkbenchWindow.java:1099)
	at org.eclipse.ui.internal.WorkbenchWindow$4.close(WorkbenchWindow.java:427)
	at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer$8.shellClosed(WBWRenderer.java:421)
Comment 1 Remy Suen CLA 2010-08-24 12:39:57 EDT
Created attachment 177342 [details]
PartRenderingEngineTests tests patch v1

Tests patch to reproduce the problem.
Comment 2 Remy Suen CLA 2010-08-24 12:40:46 EDT
This is a problem in the renderer.
Comment 3 Remy Suen CLA 2010-08-25 10:24:15 EDT
*** Bug 323608 has been marked as a duplicate of this bug. ***
Comment 4 Remy Suen CLA 2010-08-31 19:15:32 EDT
Fixed by bug 309705. I've corrected the patch and delivered it to HEAD.

*** This bug has been marked as a duplicate of bug 309705 ***