Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT crashes with no more handles(SWT crashes with no more handles)
SWT crashes with no more handles [message #1808175] Tue, 18 June 2019 14:18
PASTOR Robert is currently offline PASTOR RobertFriend
Messages: 2
Registered: July 2009
Junior Member

Please read the use case :
The use case is a File Explorer, with a recursive access to children files or folders. When the initial entry file has many many children , the recursive access traces the name of the "discovered" file names in a SWT Label and a couple of minutes , the process finishes with the following trace

Infos: ---------- observer received a notification -------------
juin 18, 2019 2:14:46 PM FileExplorerTab.StatusBarObserver update
Infos: xxxxxx file name xxxx.csv
juin 18, 2019 2:14:46 PM FileExplorerTab.StatusBarObserver update
Infos: ---------- observer received a notification -------------
juin 18, 2019 2:14:46 PM FileExplorerTab.StatusBarObserver update
Infos: yyyyyyyyyy file name yyyyyy.conf
Exception in thread "main" org.eclipse.swt.SWTError: No more handles
at org.eclipse.swt.SWT.error(
at org.eclipse.swt.SWT.error(
at org.eclipse.swt.SWT.error(
at org.eclipse.swt.widgets.Widget.error(
at org.eclipse.swt.widgets.Control.createHandle(
at org.eclipse.swt.widgets.Composite.createHandle(
at org.eclipse.swt.widgets.Decorations.createHandle(
at org.eclipse.swt.widgets.Shell.createHandle(
at org.eclipse.swt.widgets.Control.createWidget(
at org.eclipse.swt.widgets.Scrollable.createWidget(
at org.eclipse.swt.widgets.Decorations.createWidget(
at org.eclipse.swt.widgets.Shell.<init>(
at org.eclipse.swt.widgets.Shell.<init>(
at LiveLinkCore.ShellInformationMessage.init(
at LiveLinkCore.ShellInformationMessage.<init>(
at FileExplorerTab.FileExplorerTab$6.widgetSelected(
at org.eclipse.swt.widgets.TypedListener.handleEvent(
at org.eclipse.swt.widgets.EventTable.sendEvent(
at org.eclipse.swt.widgets.Widget.sendEvent(
at org.eclipse.swt.widgets.Display.runDeferredEvents(
at org.eclipse.swt.widgets.Display.readAndDispatch(
at Main.MainMainLiveLinkSwtExplorer.main(

My query was to get some support / hints on how to be able to catch this SWT exception... perhaps when the number of available handles are near exhausting.

Where should I put this try - catch , please see my main program. It has already a try catch

public static void main(String[] args) {

Display display = new Display ();
try {
// create the shell
final Shell shell = new Shell(display);
try {
shell.setLayout(new FillLayout());

shell.setSize(1200, 700);;

while (shell != null && !shell.isDisposed()) {
if (!display.readAndDispatch()) {
} finally {
if (!shell.isDisposed()) {
} finally {

Thanks for your help
Previous Topic:browser creation silently closes program
Next Topic:ToolTip on Table cells, Linux
Goto Forum:

Current Time: Sat Apr 17 14:53:39 GMT 2021

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

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

Back to the top