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

Bug 323014

Summary: Renderer should not die if one model element could not be rendered/unrendered
Product: [Eclipse Project] e4 Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Remy Suen <remy.suen>
Status: VERIFIED FIXED QA Contact: Eric Moffatt <emoffatt>
Severity: critical    
Priority: P3    
Version: 1.0   
Target Milestone: 4.1 RC1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
PartRenderingEngine patch v1 none

Description Remy Suen CLA 2010-08-18 08:24:36 EDT
Right now, if there is a failure at any one point of the rendering cycle, the entire application will not be brought up. We need to use ISafeRunnables and log failures so that one misbehaving part does not prevent the application from coming up.
Comment 1 Remy Suen CLA 2010-09-15 08:16:22 EDT
We have failures on shutdown at the moment that is preventing the unrendering request from completing. At the moment, it is not clear why this NPE occurs but one element not being able to  be unrendered properly should not prevent the workbench from shutting down.

java.lang.NullPointerException
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.clearContext(PartRenderingEngine.java:557)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:544)
at org.eclipse.e4.ui.workbench.renderers.swt.ElementReferenceRenderer.disposeWidget(ElementReferenceRenderer.java:108)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:532)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:528)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:528)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:528)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:528)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:528)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.removeGui(PartRenderingEngine.java:528)
at org.eclipse.ui.internal.WorkbenchWindow.hardClose(WorkbenchWindow.java:1355)
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 2 Remy Suen CLA 2010-10-14 17:02:58 EDT
Delivered a change to PartRenderingEngine to wrap removeGui(MUIElement) in an ISafeRunnable due to bug 326699.
Comment 3 Remy Suen CLA 2011-05-12 14:02:09 EDT
Created attachment 195516 [details]
PartRenderingEngine patch v1

Change the engine to use the SafeRunner for both of its createGui(*) calls.
Comment 4 Remy Suen CLA 2011-05-12 14:03:19 EDT
(In reply to comment #3)
> Created attachment 195516 [details]
> PartRenderingEngine patch v1

Patch released to CVS HEAD. Now the engine won't choke if an element could not be rendered.
Comment 5 Remy Suen CLA 2011-05-17 08:29:14 EDT
Verified by source inspection with I20110516-1455.