Community
Participate
Working Groups
M6, maybe related to bug 49700 (?) - select a java project, right-click -> Properties - select its Java Build Path page, Libraries tab - press Add Library... button on right side - select JRE System Library, press Next - press Finish, Cancel to close the Properties dialog sleak claims that the image in the wizard banner of the JRE System Library page is being leaked each time this is done. A trace showing the allocation of this image is included below: 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.jdt.internal.debug.ui.jres.JREContainerWizardPage.getImage (JREContainerWizardPage.java:151) 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.jdt.internal.ui.wizards.buildpaths.LibrariesWorkbookPage.openContain erDialog(LibrariesWorkbookPage.java:685) at org.eclipse.jdt.internal.ui.wizards.buildpaths.LibrariesWorkbookPage.openContain erSelectionDialog(LibrariesWorkbookPage.java:674) at org.eclipse.jdt.internal.ui.wizards.buildpaths.LibrariesWorkbookPage.libaryPageC ustomButtonPressed(LibrariesWorkbookPage.java:234) at org.eclipse.jdt.internal.ui.wizards.buildpaths.LibrariesWorkbookPage.access$0 (LibrariesWorkbookPage.java:221) at org.eclipse.jdt.internal.ui.wizards.buildpaths.LibrariesWorkbookPage$LibrariesAd apter.customButtonPressed(LibrariesWorkbookPage.java:181) at org.eclipse.jdt.internal.ui.wizards.dialogfields.TreeListDialogField.buttonPress ed(TreeListDialogField.java:171) at org.eclipse.jdt.internal.ui.wizards.dialogfields.TreeListDialogField.doButtonSel ected(TreeListDialogField.java:386) at org.eclipse.jdt.internal.ui.wizards.dialogfields.TreeListDialogField.access$2 (TreeListDialogField.java:382) at org.eclipse.jdt.internal.ui.wizards.dialogfields.TreeListDialogField$2.widgetSel ected(TreeListDialogField.java:349) 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.dialogs.PropertyDialogAction.run (PropertyDialogAction.java:164) at org.eclipse.jface.action.Action.runWithEvent(Action.java:842) 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$5.handleEvent (ActionContributionItem.java:408) 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)
Note that I've found another case that is probably the same: - select a java project, right-click -> Properties - select its Java Build Path page, Libraries tab - press Add Library... button on right side - select Required Plugins, press Next - press Finish, Cancel to close the Properties dialog It's the Image in the banner of the Required Plug-in Entries page.
The problem here is in ClasspathContainerPage.getContainerPage(). When the new page is created they are using page.setWizard() rather than Wizard.addPage(). As a result the wizard has no idea about the page and does not dispose it on shutdown.
thanks a lot for hinting this down fixed > 20040418