| Summary: | [TabbedProperties] SWT Images leak in property tabs | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | a.gliznetsov |
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | a.gliznetsov, loskutov, pwebster, remy.suen, rolf.theunissen |
| Version: | 3.5.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
This might already be fixed in 3.7 PW (In reply to comment #1) > This might already be fixed in 3.7 Dupe of bug 275702 I believe. I think this bug could indeed be marked as duplicate of Bug 275702 *** This bug has been marked as a duplicate of bug 275702 *** |
Build Identifier: 20100218-1602 If you define a property tab like this in plugin.xml: <extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs"> <propertyTabs> <propertyTab image="icons/16x16/state.png" label="State"> </propertyTab> Then a new image is created and never disposed each time the tab is displayed. The leak is detected using sleak tool. Here's the stack trace: java.lang.Error at org.eclipse.swt.graphics.Device.new_Object(Device.java:853) at org.eclipse.swt.graphics.Resource.init(Resource.java:85) at org.eclipse.swt.graphics.Image.<init>(Image.java:577) at org.eclipse.jface.resource.URLImageDescriptor.createImage(URLImageDescriptor.java:162) at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:227) at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:205) at org.eclipse.ui.internal.views.properties.tabbed.view.TabDescriptor.<init>(TabDescriptor.java:79) at org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyRegistry.readTabDescriptors(TabbedPropertyRegistry.java:364) at org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyRegistry.getAllTabDescriptors(TabbedPropertyRegistry.java:342) at org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyRegistry.getTabDescriptors(TabbedPropertyRegistry.java:283) at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.setInput(TabbedPropertySheetPage.java:718) at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.selectionChanged(TabbedPropertySheetPage.java:555) at org.eclipse.ui.views.properties.PropertySheet.partActivated(PropertySheet.java:317) at org.eclipse.ui.part.PageBookView.showBootstrapPart(PageBookView.java:921) at org.eclipse.ui.part.PageBookView.createPartControl(PageBookView.java:492) at org.eclipse.ui.views.properties.PropertySheet.createPartControl(PropertySheet.java:132) at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:367) at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:226) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595) at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313) at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:529) at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180) at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270) at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65) at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473) at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256) at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1209) at org.eclipse.ui.internal.PartStack.presentationSelectionChanged(PartStack.java:843) at org.eclipse.ui.internal.PartStack.access$1(PartStack.java:829) at org.eclipse.ui.internal.PartStack$1.selectPart(PartStack.java:139) at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation$1.handleEvent(TabbedStackPresentation.java:133) at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:270) at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:279) at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.access$1(DefaultTabFolder.java:1) at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder$2.handleEvent(DefaultTabFolder.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:770) at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3256) at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:2045) at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:323) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) 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:368) 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:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311) at org.eclipse.equinox.launcher.Main.main(Main.java:1287) Reproducible: Always Steps to Reproduce: 1. define a custom editor and a property tab in the plugin.xml 2. use sleak to snap allocated resource 3. open an editor and a property view. close the editor 4. use sleak to see the diff 5. repeat 2-4. See that the number of used images grows