Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345735 - JDT leak tests are failing due to ToolBarManagerRenderer holding onto references
Summary: JDT leak tests are failing due to ToolBarManagerRenderer holding onto references
Status: VERIFIED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: 4.1 RC1   Edit
Assignee: Remy Suen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-13 09:35 EDT by Remy Suen CLA
Modified: 2011-05-17 08:18 EDT (History)
0 users

See Also:


Attachments
CoolBarToTrimManager patch v1 (1.78 KB, patch)
2011-05-13 11:13 EDT, Remy Suen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2011-05-13 09:35:35 EDT
They all seem to have the same cause and looks kind of like this.

junit.framework.AssertionFailedError: Expected instance count: 0, actual: 1
Element 0
org.eclipse.ui.editors.text.TextEditor
  org.eclipse.ui.texteditor.AbstractTextEditor$InformationDispatchAction#this$0 -> org.eclipse.ui.editors.text.TextEditor@13f8d4b
  org.eclipse.ui.texteditor.RetargetTextEditorAction#fAction -> org.eclipse.ui.texteditor.AbstractTextEditor$InformationDispatchAction@b1a510
  org.eclipse.ui.editors.text.TextEditorActionContributor#fRetargetShowInformationAction -> org.eclipse.ui.texteditor.RetargetTextEditorAction@16a3692
  org.eclipse.ui.internal.EditorActionBars#editorContributor -> org.eclipse.ui.editors.text.TextEditorActionContributor@110bed6
  org.eclipse.ui.internal.EditorActionBars$Overrides#this$0 -> org.eclipse.ui.internal.EditorActionBars@1364853
  org.eclipse.jface.action.ContributionManager#overrides -> org.eclipse.ui.internal.EditorActionBars$Overrides@152a5f7
  java.util.HashMap$Entry#value -> org.eclipse.jface.internal.provisional.action.ToolBarManager2@24c7aa
  java.util.HashMap$Entry[2] -> org.eclipse.e4.ui.model.application.ui.menu.impl.ToolBarImpl@b0795c (elementId: org.eclipse.ui.Defa
  java.util.HashMap#table -> [Ljava.util.HashMap$Entry;@250f64
  org.eclipse.e4.ui.workbench.renderers.swt.ToolBarManagerRenderer#modelToManager -> {org.eclipse.e4.ui.model.application.ui.menu.impl.ToolBarImpl@66eb46 (elementId: org.eclipse.ui.mac
  org.eclipse.e4.ui.workbench.renderers.swt.ToolBarManagerRenderer$1#this$0 -> org.eclipse.e4.ui.workbench.renderers.swt.ToolBarManagerRenderer@1c00972
  org.eclipse.e4.ui.services.internal.events.UIEventHandler#eventHandler -> org.eclipse.e4.ui.workbench.renderers.swt.ToolBarManagerRenderer$1@1bf8a41
  org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl#service -> org.eclipse.e4.ui.services.internal.events.UIEventHandler@77399e
  java.lang.Object[175] -> {org.osgi.service.event.EventHandler}={event.topics=[org/eclipse/e4/ui/model/ui/UILabel/*], service
  java.util.ArrayList#elementData -> [Ljava.lang.Object;@53cb28
  org.eclipse.osgi.internal.serviceregistry.ServiceRegistry#allPublishedServices -> [{org.eclipse.osgi.framework.console.CommandProvider}={service.ranking=2147483647, service.id=2}, {
  org.eclipse.osgi.framework.internal.core.Framework#serviceRegistry -> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry@bb855b
  org.eclipse.osgi.framework.internal.core.AbstractBundle#framework -> org.eclipse.osgi.framework.internal.core.Framework@1bacc7d
  org.eclipse.osgi.internal.loader.BundleLoader#bundle -> org.eclipse.jdt.ui.tests_3.7.0.qualifier [194]
  org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader#delegate -> org.eclipse.jdt.ui.tests_3.7.0.qualifier
  org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader -> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@1926e41


	at junit.framework.Assert.fail(Assert.java:47)
	at junit.framework.Assert.assertTrue(Assert.java:20)
	at org.eclipse.jdt.ui.leaktest.LeakTestCase.assertInstanceCount(LeakTestCase.java:127)
	at org.eclipse.jdt.ui.tests.leaks.JavaLeakTest.internalTestEditorClose(JavaLeakTest.java:324)
	at org.eclipse.jdt.ui.tests.leaks.JavaLeakTest.internalTestEditorClose(JavaLeakTest.java:293)
	at org.eclipse.jdt.ui.tests.leaks.JavaLeakTest.testTextEditorClose(JavaLeakTest.java:90)
Comment 1 Remy Suen CLA 2011-05-13 11:13:53 EDT
Created attachment 195600 [details]
CoolBarToTrimManager patch v1

When we added stuff to the manager, we linked them in the renderer.

When we removed stuff from the manager...we didn't. Now we do.
Comment 2 Paul Webster CLA 2011-05-13 14:20:22 EDT
Released to HEAD

Thanx, Remy
PW
Comment 3 Remy Suen CLA 2011-05-17 08:18:58 EDT
Verified that the test results from the RC1 build did not indicate failures in this area.