Menu

#21 org.eclipse.swt.SWTError: No more handles

closed-fixed
5
2005-10-22
2005-09-08
Anonymous
No

When running v0.7.1 on Eclipse 3.x platform on an Win
XP I get the supplied exception. What I can see in the
task manager is that the GDI objects start to run wild
when adding resource entries and Eclipse finally
terminates.

Hermod

Stacktrace:
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTError: No more handles
at org.eclipse.swt.SWT.error(SWT.java:2968)
at org.eclipse.swt.SWT.error(SWT.java:2865)
at org.eclipse.swt.SWT.error(SWT.java:2836)
at org.eclipse.swt.graphics.Image.<init>(Image.java:275)
at
org.eclipse.swt.widgets.ToolItem.createDisabledImage(ToolItem.java:199)
at
org.eclipse.swt.widgets.ToolItem.updateImages(ToolItem.java:912)
at
org.eclipse.swt.widgets.ToolBar.enableWidget(ToolBar.java:399)
at
org.eclipse.swt.widgets.Control.setEnabled(Control.java:2108)
at
org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2129)
at
org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:122)
at
org.eclipse.ui.internal.EditorManager.saveAll(EditorManager.java:1141)
at
org.eclipse.ui.internal.Workbench$12.run(Workbench.java:647)
at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
at
org.eclipse.core.runtime.Platform.run(Platform.java:783)
at
org.eclipse.ui.internal.Workbench.saveAllEditors(Workbench.java:610)
at
org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:531)
at
org.eclipse.ui.internal.Workbench.access$8(Workbench.java:522)
at
org.eclipse.ui.internal.Workbench$13.run(Workbench.java:713)
at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
at
org.eclipse.ui.internal.Workbench.close(Workbench.java:711)
at
org.eclipse.ui.internal.WorkbenchConfigurer.emergencyClose(WorkbenchConfigurer.java:165)
at
org.eclipse.ui.internal.ide.IDEExceptionHandler.closeWorkbench(IDEExceptionHandler.java:121)
at
org.eclipse.ui.internal.ide.IDEExceptionHandler.handleException(IDEExceptionHandler.java:100)
at
org.eclipse.ui.internal.ide.IDEWorkbenchAdvisor.eventLoopException(IDEWorkbenchAdvisor.java:210)
at
org.eclipse.ui.internal.ExceptionHandler.handleException(ExceptionHandler.java:62)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1703)
at
org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
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.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)

Discussion

  • Pascal Essiembre

    Logged In: YES
    user_id=1012642

    Can you please let me know the exact steps to reproduce the
    problem and the exact version of Eclipse. If this happens
    only with a given set of files, can you please attach them
    so I can reproduce the problem.

    Thanks.

     
  • Pascal Essiembre

    • milestone: 494694 --> 494693
     
  • Nobody/Anonymous

    Logged In: NO

    I start up eclipse (MyEclipse). The GDI count is now 546. I
    then open my resource bundle where I have one default
    locale, and 5 different locale versions, and the GDI count
    rises to 1834. I the copy a value from the default into one
    of the locale bundles, and the GDI count rises to 4211. I
    then paste it into the other locales and it rises to 5404. I
    repeat that for another value and it rises to 8990. I think
    there is a limit of about 10 000 GDI object in Windows, so
    for the third value Eclipse just dies.

    Hermod

     
  • Nobody/Anonymous

    Logged In: NO

    Almost forgot one thing: If I close down the resource
    bundle, the GDI objects are not released.

    Hermod

     
  • Pascal Essiembre

    • assigned_to: nobody --> essiembre
    • priority: 5 --> 9
    • status: open --> open-accepted
     
  • Pascal Essiembre

    Logged In: YES
    user_id=1012642

    Hummm.. I must admit not being familiar with this issue. I
    will definitely do a bit of research. With what I read so
    far, it seems to be an issue with SWT and some video cards
    (https://bugs.eclipse.org/bugs/show_bug.cgi?id=53632)
    In all cases, I suspect I am not handling some image
    resources properly (looks like there is a leak somewhere).

    I will do my best to provide a fix for the next release.

     
  • Pascal Essiembre

    Logged In: YES
    user_id=1012642

    I beleive I am making progress (I isolated a few leaks).
    But to make sure I resolve your problem, can you tell me
    what GDI stands for, and how do you obtain the count (to
    replicate it).

    Thanks.

     
  • Pascal Essiembre

    Patched 0.7.1 release.

     
  • Pascal Essiembre

    Logged In: YES
    user_id=1012642

    I have attached a fix. Could you please test it. I found
    several resources not being disposed properly. I have made
    sure in the attached fix that there are no "leaks" anymore.
    I am hopeful that this will fix your problem. Due to size
    limitation, the zip file does not have flag icons,
    translations, etc. You may want to keep your current
    version around if you want to switch back.

    Please let me know if that fixes your problem.

     
  • Nobody/Anonymous

    Logged In: NO

    Hi

    I tried your fix and I am happy to report that so far so
    good. I do not see any increase in GDI object count anymore.

    Thnx :)

    Hermod

    PS. I hope this fix will make it into the next version.

     
  • Pascal Essiembre

    Logged In: YES
    user_id=1012642

    Excellent! The fix will definitely be in the next release.

    Let me know if you need the full plugin with the fix before
    then (icons, translations, etc) and I will email you a build
    from CVS.

     
  • Pascal Essiembre

    • milestone: 494693 --> 450938
     
  • Nobody/Anonymous

    Logged In: NO

    Hi

    I'l wait. I hust copied over the fix on top of the exeisting
    install, and as far as I can tell it everything is ok,
    including flags etc. The only thing that can see is missing
    right now is the flag for en_UK.

    Hermod

     
  • Pascal Essiembre

    Logged In: YES
    user_id=1012642

    There is no flag for "UK" since "UK" is not an ISO standard.
    The two-letter ISO code for United Kingdom is "GB". What
    you want to use is: "en_GB" (there is a flag for "GB").

     
  • Pascal Essiembre

    • priority: 9 --> 5
    • status: open-accepted --> open-fixed
     
  • Nobody/Anonymous

    Logged In: NO

    Hi

    Stupid me - You are of course absolutly right.

    Hermod

     
  • Pascal Essiembre

    Logged In: YES
    user_id=1012642

    Fixed in release 0.7.2.

     
  • Pascal Essiembre

    • milestone: 450938 --> Fix_included_in_an_existing_release
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB