Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 69212 invoked from network); 4 Mar 2008 21:12:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Mar 2008 21:12:54 -0000 Received: (qmail 59263 invoked by uid 500); 4 Mar 2008 21:12:50 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 59220 invoked by uid 500); 4 Mar 2008 21:12:50 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 59209 invoked by uid 99); 4 Mar 2008 21:12:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Mar 2008 13:12:50 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Mar 2008 21:12:10 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 24426234C098 for ; Tue, 4 Mar 2008 13:11:41 -0800 (PST) Message-ID: <1194966431.1204665101147.JavaMail.jira@brutus> Date: Tue, 4 Mar 2008 13:11:41 -0800 (PST) From: "Stefan Seelmann (JIRA)" To: dev@directory.apache.org Subject: [jira] Resolved: (DIRSTUDIO-288) "SWTError: No more handles" error when repeatedly adding a new entry In-Reply-To: <272872692.1204585971168.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DIRSTUDIO-288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Seelmann resolved DIRSTUDIO-288. --------------------------------------- Resolution: Fixed Fixed in trunk and 1.1.0 branch: http://svn.apache.org/viewvc?rev=633629&view=rev http://svn.apache.org/viewvc?rev=633630&view=rev > "SWTError: No more handles" error when repeatedly adding a new entry > -------------------------------------------------------------------- > > Key: DIRSTUDIO-288 > URL: https://issues.apache.org/jira/browse/DIRSTUDIO-288 > Project: Directory Studio > Issue Type: Bug > Components: studio-ldapbrowser > Affects Versions: 1.1.0 > Environment: Windows XP SP2 all current updates applied > Eclipse 3.3 > JDK1.5.0_11 with a 512m heap size > Directory Studio 1.1.0 > Open DS 1.0.0 > Reporter: John Buslawski > Assignee: Stefan Seelmann > Priority: Critical > Fix For: 1.1.0 > > > When adding a new entry in Directory Studio, Eclipse sometimes will crash with a "SWTError: No more handles" error combined with either an OutOfMemoryError, an ArrayIndexOutOfBoundsException, or NegativeArraySizeException. The following steps were used to reproduce the problem: > Connect via LDAP Browser to an LDAP server. > Expand out the tree and pick an group object. In our implementation it would look like > dc=initiatesystems,dc=com > ou=Groups > ou=System. Right-click on "cn=All Interactions" and select New Entry. ("All Interactions" is a group object.) > In the New Entry dialog select "Create from scratch", click Next. > On the page, move the object classes from the right side to the left side one at a time starting with "account" (the first one). > Once you have moved about 9 or 10 object classes to the left side, Eclipse will just shutdown with no warning. > The following was in the Eclipse .log file: > !ENTRY org.eclipse.ui 4 0 2008-03-03 16:22:22.806 > !MESSAGE Unhandled event loop exception > !STACK 0 > org.eclipse.swt.SWTError: No more handles > at org.eclipse.swt.SWT.error(SWT.java:3589) > at org.eclipse.swt.SWT.error(SWT.java:3481) > at org.eclipse.swt.SWT.error(SWT.java:3452) > at org.eclipse.swt.graphics.Image.init(Image.java:1811) > at org.eclipse.swt.graphics.Image.init(Image.java:1936) > at org.eclipse.swt.graphics.Image.(Image.java:490) > at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:289) > at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:227) > at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:205) > at org.apache.directory.studio.ldapbrowser.ui.wizards.NewEntryObjectclassWizardPage$1.getImage(Unknown Source) > at org.eclipse.jface.viewers.WrappedViewerLabelProvider.getImage(WrappedViewerLabelProvider.java:117) > at org.eclipse.jface.viewers.WrappedViewerLabelProvider.update(WrappedViewerLabelProvider.java:165) > at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:135) > at org.eclipse.jface.viewers.AbstractTableViewer.doUpdateItem(AbstractTableViewer.java:386) > at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:466) > at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) > at org.eclipse.core.runtime.Platform.run(Platform.java:857) > at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46) > at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:193) > at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2026) > at org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:692) > at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:630) > at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:617) > at org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredViewer.java:1433) > at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1368) > at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1330) > at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1431) > at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:503) > at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1390) > at org.apache.directory.studio.ldapbrowser.ui.wizards.NewEntryObjectclassWizardPage.add(Unknown Source) > at org.apache.directory.studio.ldapbrowser.ui.wizards.NewEntryObjectclassWizardPage.access$200(Unknown Source) > at org.apache.directory.studio.ldapbrowser.ui.wizards.NewEntryObjectclassWizardPage$7.widgetSelected(Unknown Source) > at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293) > at org.eclipse.jface.window.Window.runEventLoop(Window.java:820) > at org.eclipse.jface.window.Window.open(Window.java:796) > at org.apache.directory.studio.ldapbrowser.ui.actions.NewEntryAction.run(Unknown Source) > at org.apache.directory.studio.ldapbrowser.common.actions.proxy.BrowserActionProxy.run(Unknown Source) > at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) > at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545) > at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490) > at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) > at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) > at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) > at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) > at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504) > at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) > at org.eclipse.equinox.launcher.Main.run(Main.java:1169) > at org.eclipse.equinox.launcher.Main.main(Main.java:1144) > !ENTRY org.eclipse.ui 4 0 2008-03-03 16:23:21.728 > !MESSAGE Unhandled event loop exception > !STACK 0 > org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.OutOfMemoryError: Java heap space) > at org.eclipse.swt.SWT.error(SWT.java:3563) > at org.eclipse.swt.SWT.error(SWT.java:3481) > at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:126) > at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296) > at org.eclipse.jface.window.Window.runEventLoop(Window.java:820) > at org.eclipse.jface.window.Window.open(Window.java:796) > at org.apache.directory.studio.ldapbrowser.ui.actions.NewEntryAction.run(Unknown Source) > at org.apache.directory.studio.ldapbrowser.common.actions.proxy.BrowserActionProxy.run(Unknown Source) > at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) > at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545) > at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490) > at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402) > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) > at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682) > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293) > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) > at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) > at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) > at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) > at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) > at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) > at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) > at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504) > at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) > at org.eclipse.equinox.launcher.Main.run(Main.java:1169) > at org.eclipse.equinox.launcher.Main.main(Main.java:1144) > Caused by: java.lang.OutOfMemoryError: Java heap space > We think the error comes from using createImage() rather than getImage() in the getImage() method in the LabelProvider inner class of NewEntryObjectclassWizardPage. It appears as though the images keep getting recreated with freeing them. For example, the following line: > BrowserUIPlugin.getDefault().getImageDescriptor( BrowserUIConstants.IMG_OCD_ABSTRACT ).createImage(); > should be replaced with: > > BrowserUIPlugin.getDefault().getImage( BrowserUIConstants.IMG_OCD_ABSTRACT ); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.