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

Bug 391118

Summary: StackRenderer leaks viewMenuImage
Product: [Eclipse Project] Platform Reporter: Markus Keller <markus.kell.r>
Component: UIAssignee: Lars Vogel <Lars.Vogel>
Status: CLOSED DUPLICATE QA Contact:
Severity: minor    
Priority: P3 CC: emoffatt, Lars.Vogel, ob1.eclipse, pwebster, rolf.theunissen
Version: 4.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/71106
Whiteboard:

Description Markus Keller CLA 2012-10-04 08:23:13 EDT
StackRenderer leaks the viewMenuImage:

java.lang.Error
	at org.eclipse.swt.graphics.Device.new_Object(Device.java:859)
	at org.eclipse.swt.graphics.Resource.init(Resource.java:86)
	at org.eclipse.swt.graphics.Image.<init>(Image.java:492)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.getViewMenuImage(StackRenderer.java:1285)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showMenuButton(StackRenderer.java:1165)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.setupMenuButton(StackRenderer.java:1149)
	at org.eclipse.ui.internal.e4.compatibility.ActionBars.updateActionBars(ActionBars.java:123)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityView$1.compute(CompatibilityView.java:196)
	at org.eclipse.e4.ui.workbench.renderers.swt.ToolBarManagerRenderer.postProcess(ToolBarManagerRenderer.java:844)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:646)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$6.run(PartRenderingEngine.java:518)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:503)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.adjustTR(StackRenderer.java:671)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1133)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer.postProcess(LazyStackRenderer.java:97)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:646)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:732)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:703)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:697)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:682)
...
Comment 1 Eclipse Genie CLA 2016-04-20 18:24:59 EDT
New Gerrit change created: https://git.eclipse.org/r/71106
Comment 2 Eclipse Genie CLA 2019-09-11 12:56:04 EDT
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 3 Lars Vogel CLA 2019-09-11 13:26:36 EDT
Rolf, any suggestions how I can test this? When is the StackRenderer disposed?
Comment 4 Rolf Theunissen CLA 2019-09-12 05:31:28 EDT
Bug 462613 and Bug 475357 are related.

The view image menu image is shared with the part image. The fix for Bug 462613 might have fixed this one too.

There are many ways to set the image, however there are no test-cases. I suggest adding test-cases for all methods to set the image, and include tests that all images are disposed correctly too.
Comment 5 Lars Vogel CLA 2019-11-27 08:03:35 EST

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