Skip to main content



      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 03:03 Go to next message
Eclipse UserFriend
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 13:15 Go to previous messageGo to next message
Eclipse UserFriend
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 02:44 Go to previous messageGo to next message
Eclipse UserFriend
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 04:53 Go to previous messageGo to next message
Eclipse UserFriend
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 05:18 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 03:03:18 EDT 2025

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

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

Back to the top