Project: Eclipse_Platform_UI
Bug 49700 [Dialogs] creating working set leaks an image
Reported: 2004-01-08 10:59:55 | Status: verified fixed

M6 - press the Search toolbar button - in the subsequent dialog select Working Set, press Choose... - in the subsequent dialog press New... - in the subsequent dialog select either Java or Resource, press Next - Cancel, Cancel, Cancel sleak says that the Image in the wizard's banner is leaked each time this is done. Here's a trace of its allocation, if it's interesting: java.lang.Error at org.eclipse.swt.graphics.Device.new_Object(Device.java:648) at org.eclipse.swt.graphics.Image.<init>(Image.java:556) at org.eclipse.jface.resource.ImageDescriptor.createImage (ImageDescriptor.java:137) at org.eclipse.jface.resource.ImageDescriptor.createImage (ImageDescriptor.java:94) at org.eclipse.jface.resource.ImageDescriptor.createImage (ImageDescriptor.java:83) at org.eclipse.jface.dialogs.DialogPage.getImage(DialogPage.java:230) at org.eclipse.jface.wizard.WizardPage.getImage(WizardPage.java:143) at org.eclipse.jface.wizard.WizardDialog.updateTitleBar (WizardDialog.java:1161) at org.eclipse.jface.wizard.WizardDialog.update(WizardDialog.java:1029) at org.eclipse.jface.wizard.WizardDialog.updateForPage (WizardDialog.java:963) at org.eclipse.jface.wizard.WizardDialog.access$1(WizardDialog.java:940) at org.eclipse.jface.wizard.WizardDialog$3.run(WizardDialog.java:929) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84) at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:927) at org.eclipse.jface.wizard.WizardDialog.nextPressed (WizardDialog.java:684) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:316) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:430) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2318) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1999) at org.eclipse.jface.window.Window.runEventLoop(Window.java:586) at org.eclipse.jface.window.Window.open(Window.java:566) at org.eclipse.ui.internal.dialogs.WorkingSetSelectionDialog.createWorkingSet (WorkingSetSelectionDialog.java:241) at org.eclipse.ui.internal.dialogs.WorkingSetSelectionDialog$1.widgetSelected (WorkingSetSelectionDialog.java:141) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2318) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1999) at org.eclipse.jface.window.Window.runEventLoop(Window.java:586) at org.eclipse.jface.window.Window.open(Window.java:566) at org.eclipse.ui.internal.dialogs.WorkingSetSelectionDialog.open (WorkingSetSelectionDialog.java:332) at org.eclipse.search.internal.ui.ScopePart.handleChooseWorkingSet (ScopePart.java:372) at org.eclipse.search.internal.ui.ScopePart.access$0(ScopePart.java:364) at org.eclipse.search.internal.ui.ScopePart$1.widgetSelected (ScopePart.java:311) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2318) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1999) at org.eclipse.jface.window.Window.runEventLoop(Window.java:586) at org.eclipse.jface.window.Window.open(Window.java:566) at org.eclipse.search.internal.ui.OpenSearchDialogAction.run (OpenSearchDialogAction.java:60) at org.eclipse.search.internal.ui.OpenSearchDialogAction.run (OpenSearchDialogAction.java:46) at org.eclipse.ui.internal.PluginAction.runWithEvent (PluginAction.java:271) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent (WWinPluginAction.java:207) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:509) at org.eclipse.jface.action.ActionContributionItem.access$2 (ActionContributionItem.java:461) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent (ActionContributionItem.java:433) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2318) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1999) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1506) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1482) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:246) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139) at org.eclipse.ui.internal.ide.IDEApplication.run (IDEApplication.java:47) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:85) 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:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:279) at org.eclipse.core.launcher.Main.run(Main.java:742) at org.eclipse.core.launcher.Main.main(Main.java:581)

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/WorkingSetNewWizard.java