Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Problem with "org.eclipse.swt.SWTError: No more handles"
Problem with "org.eclipse.swt.SWTError: No more handles" [message #1066125] Mon, 01 July 2013 07:03 Go to next message
hortiz Mising name is currently offline hortiz Mising nameFriend
Messages: 96
Registered: July 2009
Member
Hi,

Sometimes I have the error "org.eclipse.swt.SWTError: No more handles", so I try to reduce the number of widgets in my SWT application.
I use a profiling tool to determine which widgets are currently used (I already know that I misuse some composites used as layout tool).

The first three classes (from package org.eclipse.swt.widgets) in term of instance count are:

- TypedListener
- Listener[ ]
- EventTable

My question is how can I reduce the number of instances of these classes ? Did I miss something in "Managing Operating System Resources" ?

Thanks !
Helene


Re: Problem with "org.eclipse.swt.SWTError: No more handles" [message #1066245 is a reply to message #1066125] Mon, 01 July 2013 17:15 Go to previous messageGo to next message
li ran is currently offline li ranFriend
Messages: 11
Registered: June 2013
Junior Member
had the same problem, i restricted the number of open tab items to 20.
i also rewrote widgets complex views to canvas and paint on them

make sure you dispose widgets currectly.
check if call for the GC helps you.

that is all i could have tought about.
Re: Problem with "org.eclipse.swt.SWTError: No more handles" [message #1066910 is a reply to message #1066245] Fri, 05 July 2013 06:44 Go to previous messageGo to next message
hortiz Mising name is currently offline hortiz Mising nameFriend
Messages: 96
Registered: July 2009
Member
But you don't answer my question about TypedListener, Listener[] and EventTable.
Anyone else ?
Re: Problem with "org.eclipse.swt.SWTError: No more handles" [message #1066953 is a reply to message #1066125] Fri, 05 July 2013 08:53 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

This probably means that you are keeping some handles for objects you
don't use any longer (think about the .dispose()) method/
You should use SLeak to track SWT handles leak:
http://eclipsesource.com/blogs/2009/04/17/finding-swt-leaks-with-sleak/
and then debug your code according to the leaks you noticed.


--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: Problem with "org.eclipse.swt.SWTError: No more handles" [message #1066964 is a reply to message #1066953] Fri, 05 July 2013 09:18 Go to previous message
hortiz Mising name is currently offline hortiz Mising nameFriend
Messages: 96
Registered: July 2009
Member
Thanks for your answer Mickael, I have already used Sleak and I don't have any problems with fonts, colors, images and cursors.
I thought that I properly used the dispose method, that's why I'm wondering about these three classes...

Previous Topic:Where is the information what key has been pressed
Next Topic:Why do newly created elements in a Java SWT Selection listener not get displayed/trigger a paint eve
Goto Forum:
  


Current Time: Tue Apr 23 13:16:51 GMT 2024

Powered by FUDForum. Page generated in 0.02923 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top