Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 327434 - SWTError: No more handles & NullPointerException in ui.internal.statushandlers.InternalDialog
Summary: SWTError: No more handles & NullPointerException in ui.internal.statushandler...
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-11 07:07 EDT by Dagmara S CLA
Modified: 2010-11-02 03:30 EDT (History)
2 users (show)

See Also:


Attachments
Stack Trace (deleted)
2010-10-11 07:13 EDT, Dagmara S CLA
no flags Details
Other occurence of SWTError (deleted)
2010-10-11 07:16 EDT, Dagmara S CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dagmara S CLA 2010-10-11 07:07:20 EDT
Build Identifier: org.eclipse.core.runtime_3.6.0.v20100505.jar

In my eclipse RCP application with Helios target I create a dialog MsgDialog which extends org.eclipse.jface.dialogs.TitleAreaDialog. In MsgDialog I use things like SWT.RESIZE or setShellStyle. I have this solution since ever, and in other eclipse platform it always worked fine. Now, when I try to open this dialog I have: org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTError: No more handles). When I try to catch this Error and close my application with some message for user, I have NullPointerException at org.eclipse.ui.internal.statushandlers.InternalDialog.refreshDialogSize(InternalDialog.java:384)

I have "SWTError: No more handles" also in other cases, please see attached files.

Reproducible: Always
Comment 1 Dagmara S CLA 2010-10-11 07:13:01 EDT
Created attachment 180591 [details]
Stack Trace

Main bug described in title
Comment 2 Prakash Rangaraj CLA 2010-10-11 07:16:18 EDT
Does this exception happens on a standard Eclipse SDK or only in your application? Your application is probably leaking SWT resources somewhere and you could use SLeak to trace where it is leaking.
Comment 3 Dagmara S CLA 2010-10-11 07:16:32 EDT
Created attachment 180592 [details]
Other occurence of SWTError

Other my occurence of org.eclipse.swt.SWTError: No more handles, this time connected with org.eclipse.swt.widgets.Composite class
Comment 4 Dagmara S CLA 2010-10-11 07:19:53 EDT
My configurations:

VM Arguments:
jvm_args: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:1886 -Xmx1300M -Xss8M -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=8779 -Dcom.sun.management.jmxremote.ssl=false  -XX:ThreadStackSize=2048 -XX:MaxPermSize=80m -Dfile.encoding=Cp1250 
java_command: org.eclipse.equinox.launcher.Main -name Eclipse -showsplash 600   -os win32 -ws win32 -arch x86 -nl pl_PL
Launcher Type: SUN_STANDARD

SYSTEM:
OS: Windows XP Build 2600 Service Pack 3
vm_info: Java HotSpot(TM) Client VM (17.0-b17) for windows-x86 JRE (1.6.0_21-b07), built on Jul 17 2010 01:10:15 by "java_re" with MS VC++ 7.1 (VS2003)
Comment 5 Prakash Rangaraj CLA 2010-10-11 07:23:37 EDT
(In reply to comment #3)
> Created an attachment (id=180592) [details]
> Other occurence of SWTError
> 
> Other my occurence of org.eclipse.swt.SWTError: No more handles, this time
> connected with org.eclipse.swt.widgets.Composite class

    Yes, no more handles occur when you leak SWT resources (not properly disposing them)
Comment 6 Dagmara S CLA 2010-10-11 07:57:50 EDT
(In reply to comment #5)
> (In reply to comment #3)
> > Created an attachment (id=180592) [details] [details]
> > Other occurence of SWTError
> > 
> > Other my occurence of org.eclipse.swt.SWTError: No more handles, this time
> > connected with org.eclipse.swt.widgets.Composite class
> 
>     Yes, no more handles occur when you leak SWT resources (not properly
> disposing them)

Ok, I will try to find those leaks, and try to use SLeak - thank you for your tips a lot!

But I have created all those classes in October 2009 and I have never problems with it. When I change my target to Helios last month, those problems starts to appear. It is a little suspicious to me. What do you think about this?
Comment 7 Remy Suen CLA 2010-10-11 09:54:12 EDT
(In reply to comment #6)
> But I have created all those classes in October 2009 and I have never problems
> with it. When I change my target to Helios last month, those problems starts to
> appear. It is a little suspicious to me. What do you think about this?

Well, if you can provide code that will reproduce the problem that may help in the debugging.
Comment 8 Eclipse Webmaster CLA 2010-10-18 09:55:13 EDT
The content of attachment 180591 [details] has been deleted by
    Eclipse Webmaster <webmaster@eclipse.org>
who provided the following reason:

User request(webmaster)

The token used to delete this attachment was generated at 2010-10-18 09:54:53 EDT.
Comment 9 Eclipse Webmaster CLA 2010-10-18 09:55:34 EDT
The content of attachment 180592 [details] has been deleted by
    Eclipse Webmaster <webmaster@eclipse.org>
who provided the following reason:

User request(webmaster)

The token used to delete this attachment was generated at 2010-10-18 09:55:24 EDT.
Comment 10 Francis Upton IV CLA 2010-11-02 03:30:24 EDT
Need more information to do something with this. "Helios has a leak" is not really enough to go on. If you can provide some more, please reopen this.