Occasional SWT Errors: Eclipse recommends shutdown

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Occasional SWT Errors: Eclipse recommends shutdown

Postby cebarne2 » Tue Sep 23, 2003 11:03 am

Occasionally, with no apparent reason, I receive SWT Errors while using the designer. They may occur when switching betwen source and design editors, or they may simply occur when dragging controls or editing properties.

Example error from the log:

org.eclipse.swt.SWTError: No more handles
at org.eclipse.swt.SWT.error(SWT.java:2358)
at org.eclipse.swt.SWT.error(SWT.java:2262)
at org.eclipse.swt.graphics.Image.init(Image.java:1445)
at org.eclipse.swt.graphics.Image.<init>(Image.java:161)
at com.swtdesigner.test.TestShot.a(Unknown Source)
.
.
.

Everytime I receive the error, Eclipse notifies me that I should exit the workbench and restart eclipse. In fact, if I do not, the SWT Designer failsto function.

Any ideas?

I am currently using the free edition. I am evaluating this tool against others for an eventual purchase and possible enterprise-scale use.

Thanks,

Chad Barnes
cebarne2
 
Posts: 67
Joined: Tue Sep 23, 2003 10:11 am
Location: Cedar Rapids, IA

Postby cebarne2 » Tue Sep 23, 2003 11:09 am

Sorry for this duplicate post. I have found others similar.

I will try v1.12 to see if the errors clear-up.
cebarne2
 
Posts: 67
Joined: Tue Sep 23, 2003 10:11 am
Location: Cedar Rapids, IA

Still getting SWT Errors

Postby cebarne2 » Tue Sep 23, 2003 12:26 pm

This time it occurred when switching between the Designer and the Source Editors:

org.eclipse.swt.SWTError: No more handles
at org.eclipse.swt.SWT.error(SWT.java:2358)
at org.eclipse.swt.SWT.error(SWT.java:2262)
at org.eclipse.swt.graphics.Image.init(Image.java:1445)
at org.eclipse.swt.graphics.Image.<init>(Image.java:161)
at org.eclipse.swt.custom.StyledText.performPaint(StyledText.java:5904)
at org.eclipse.swt.custom.StyledText.handlePaint(StyledText.java:5288)
at org.eclipse.swt.custom.StyledText$13.handleEvent(StyledText.java:4988)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:865)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:849)
at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:730)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:2817)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:2361)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1303)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1543)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
.
.
.

I would be happy to provide any other information that would assist in the solution...

Thanks,

Chad Barnes
cebarne2
 
Posts: 67
Joined: Tue Sep 23, 2003 10:11 am
Location: Cedar Rapids, IA

Postby admin » Tue Sep 23, 2003 11:36 pm

What source do you use to open in designer? Can you post it here or send to support? Does Designer work at all? Do you see exception after working with designer some time or after trying to use with some source?
admin
Moderator
 
Posts: 166
Joined: Thu Jul 24, 2003 12:25 am

Postby cebarne2 » Wed Sep 24, 2003 4:43 am

Eclipse: v2.1.1
GEF: v2.1.1
swt-designer.free: 1.1.2

The error has always ocurred after "some time" of using the SWT-Designer. Let's say, about 15 minutes was the quickest it has ever happened. The errors seem to occur after major changes to the Designer, or major changes to the source that would be reflected in the designer.

The last time this error occurred, I had to make duplicates of many controls on the page, only changing a few properties of each copy. So, I went to the source, copy & pasted a set of controls about 5 times, and changed the relevant properties. When I switched to the designer, I got the SWT error as it was seemingly trying to build the UI (stating the "No More Handles" message in the log). After restarting Eclipse, the designer showed the UI and the new controls fine.

The Source:

//This source implements an Eclipse project property page

/*
* Created on Jun 27, 2003
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package preferences;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbenchPropertyPage;
import org.eclipse.ui.dialogs.PropertyPage;
import org.eclipse.swt.layout.FillLayout;

/**
* @author cebarne2
*
*/
public class VHDLPropertyPageGeneral
extends PropertyPage
implements IWorkbenchPropertyPage {

/* (non-Javadoc)
* @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
*/
private Text txtSynplifyPro;
private Text txtSynplify;
private Text txtSynopsis;
private Text txtMentor;
private Text txtQuartus;
private Text txtMaxPlus;
private Text txtActel;
private Text txtModelSim;
private Button chkFPGAAutoMap;
private Text txtFPGALibs;
private Text txtEdaAppSvr;
private Text txtBlockDirectory;
private Text txtBaseDirectory;
protected Control createContents(Composite parent) {
Composite entryTable = new Composite(parent, SWT.NONE);
final GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 3;
entryTable.setLayout(gridLayout);
entryTable.setSize(entryTable.computeSize(SWT.DEFAULT, SWT.DEFAULT));
{
final Group grpGeneral = new Group(entryTable, SWT.NONE);
final GridLayout gridLayout_1 = new GridLayout();
gridLayout_1.numColumns = 3;
grpGeneral.setLayout(gridLayout_1);
grpGeneral.setText("Project Paths");
final GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 3;
grpGeneral.setLayoutData(gridData);
{
final Label lblBaseDirectory = new Label(grpGeneral, SWT.RIGHT);
lblBaseDirectory.setLayoutData(
new GridData(GridData.HORIZONTAL_ALIGN_END));
lblBaseDirectory.setText("Base Directory:");
}
{
txtBaseDirectory = new Text(grpGeneral, SWT.BORDER);
txtBaseDirectory.setEnabled(false);
final GridData gridData1 =
new GridData(GridData.FILL_HORIZONTAL);
txtBaseDirectory.setLayoutData(gridData1);
}
{
final Button chkBaseDirectoryDefault =
new Button(grpGeneral, SWT.CHECK);
chkBaseDirectoryDefault.setSelection(true);
chkBaseDirectoryDefault.setEnabled(false);
chkBaseDirectoryDefault.setText("Default");
}
{
final Label lblBlockDirectory =
new Label(grpGeneral, SWT.RIGHT);
lblBlockDirectory.setLayoutData(
new GridData(GridData.HORIZONTAL_ALIGN_END));
lblBlockDirectory.setText("Block Directory:");
}
{
txtBlockDirectory = new Text(grpGeneral, SWT.BORDER);
txtBlockDirectory.setEnabled(false);
txtBlockDirectory.setLayoutData(
new GridData(GridData.FILL_HORIZONTAL));
}
{
final Button chkBlockDirectoryDefault =
new Button(grpGeneral, SWT.CHECK);
chkBlockDirectoryDefault.setSelection(true);
chkBlockDirectoryDefault.setEnabled(false);
chkBlockDirectoryDefault.setText("Default");
}
{
final Label lblEdaAppSvr = new Label(grpGeneral, SWT.RIGHT);
lblEdaAppSvr.setLayoutData(
new GridData(GridData.HORIZONTAL_ALIGN_END));
lblEdaAppSvr.setText("EDA App Server:");
}
{
txtEdaAppSvr = new Text(grpGeneral, SWT.BORDER);
txtEdaAppSvr.setEnabled(false);
txtEdaAppSvr.setLayoutData(
new GridData(GridData.FILL_HORIZONTAL));
}
{
final Button chkEdaAppSvrDefault =
new Button(grpGeneral, SWT.CHECK);
chkEdaAppSvrDefault.setSelection(true);
chkEdaAppSvrDefault.setText("Default");
}
}
{
final Group grpFPGALibs = new Group(entryTable, SWT.NONE);
final GridLayout gridLayout_1 = new GridLayout();
gridLayout_1.numColumns = 3;
grpFPGALibs.setLayout(gridLayout_1);
grpFPGALibs.setText("FPGA Library Location");
final GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 3;
grpFPGALibs.setLayoutData(gridData);
{
final Label lblFPGALibs = new Label(grpFPGALibs, SWT.RIGHT);
lblFPGALibs.setLayoutData(
new GridData(GridData.HORIZONTAL_ALIGN_END));
lblFPGALibs.setText("FPGA Lib Directory:");
}
{
txtFPGALibs = new Text(grpFPGALibs, SWT.BORDER);
txtFPGALibs.setEnabled(false);
final GridData gridData_1 =
new GridData(GridData.FILL_HORIZONTAL);
txtFPGALibs.setLayoutData(gridData_1);
}
{
final Button chkFPGALibsDefault =
new Button(grpFPGALibs, SWT.CHECK);
chkFPGALibsDefault.setSelection(true);
chkFPGALibsDefault.setText("Default");
}
{
chkFPGAAutoMap = new Button(grpFPGALibs, SWT.CHECK);
final GridData gridData_1 =
new GridData(GridData.FILL_HORIZONTAL);
gridData_1.horizontalSpan = 2;
chkFPGAAutoMap.setLayoutData(gridData_1);
chkFPGAAutoMap.setText(
"Automatic Mapping of FPGA Vendor Libraries");
}
}
{
final Group grpGLSLangPref = new Group(entryTable, SWT.NONE);
final GridLayout gridLayout_1 = new GridLayout();
gridLayout_1.numColumns = 3;
grpGLSLangPref.setLayout(gridLayout_1);
grpGLSLangPref.setText("Gate-Level Simulation Language Preference");
final GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 3;
grpGLSLangPref.setLayoutData(gridData);
{
final Combo cmbGLSLangPref =
new Combo(grpGLSLangPref, SWT.READ_ONLY);
cmbGLSLangPref.setItems(new String[] { "VHDL", "VLOG" });
final GridData gridData_1 =
new GridData(GridData.FILL_HORIZONTAL);
gridData_1.horizontalSpan = 2;
cmbGLSLangPref.setLayoutData(gridData_1);
}
}
{
final Group grpModelSim = new Group(entryTable, SWT.NONE);
final GridLayout gridLayout_1 = new GridLayout();
gridLayout_1.numColumns = 3;
grpModelSim.setLayout(gridLayout_1);
grpModelSim.setText("ModelSim Properties");
final GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 3;
grpModelSim.setLayoutData(gridData);
{
final Label lblPath = new Label(grpModelSim, SWT.NONE);
lblPath.setLayoutData(
new GridData(GridData.HORIZONTAL_ALIGN_END));
lblPath.setText("Path:");
}
{
txtModelSim = new Text(grpModelSim, SWT.BORDER);
txtModelSim.setEnabled(false);
txtModelSim.setLayoutData(
new GridData(GridData.FILL_HORIZONTAL));
}
{
final Button chkDefault = new Button(grpModelSim, SWT.CHECK);
chkDefault.setSelection(true);
chkDefault.setText("Default");
}
}
{
final Group grpActel = new Group(entryTable, SWT.NONE);
final GridLayout gridLayout_1 = new GridLayout();
gridLayout_1.numColumns = 3;
grpActel.setLayout(gridLayout_1);
grpActel.setText("Actel Properties");
final GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 3;
grpActel.setLayoutData(gridData);
{
final Label lblPath = new Label(grpActel, SWT.NONE);
lblPath.setLayoutData(
new GridData(GridData.HORIZONTAL_ALIGN_END));
lblPath.setText("Path:");
}
{
txtActel = new Text(grpActel, SWT.BORDER);
txtActel.setEnabled(false);
txtActel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
}
{
final Button chkDefault = new Button(grpActel, SWT.CHECK);
chkDefault.setSelection(true);
chkDefault.setText("Default");
}
}

{
final Group grpAltera = new Group(entryTable, SWT.NONE);
grpAltera.setText("Altera Properties");
final GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 3;
grpAltera.setLayoutData(gridData);
final GridLayout gridLayout_1 = new GridLayout();
gridLayout_1.numColumns = 3;
grpAltera.setLayout(gridLayout_1);
{
final Label lblPath = new Label(grpAltera, SWT.NONE);
lblPath.setLayoutData(
new GridData(GridData.HORIZONTAL_ALIGN_END));
lblPath.setText("MaxPlus Path:");
}
{
txtMaxPlus = new Text(grpAltera, SWT.BORDER);
txtMaxPlus.setEnabled(false);
txtMaxPlus.setLayoutData(
new GridData(GridData.FILL_HORIZONTAL));
}
{
final Button chkDefault = new Button(grpAltera, SWT.CHECK);
chkDefault.setSelection(true);
chkDefault.setText("Default");
}
{
final Label lblPath = new Label(grpAltera, SWT.NONE);
lblPath.setLayoutData(
new GridData(GridData.HORIZONTAL_ALIGN_END));
lblPath.setText("Quartus Path:");
}
{
txtQuartus = new Text(grpAltera, SWT.BORDER);
txtQuartus.setEnabled(false);
txtQuartus.setLayoutData(
new GridData(GridData.FILL_HORIZONTAL));
}
{
final Button chkDefault = new Button(grpAltera, SWT.CHECK);
chkDefault.setSelection(true);
chkDefault.setText("Default");
}
}
{
final Group grpMentor = new Group(entryTable, SWT.NONE);
grpMentor.setText("Mentor Precision Synthesis Properties");
final GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 3;
grpMentor.setLayoutData(gridData);
final GridLayout gridLayout_1 = new GridLayout();
gridLayout_1.numColumns = 3;
grpMentor.setLayout(gridLayout_1);
{
final Label lblMentorPath = new Label(grpMentor, SWT.NONE);
lblMentorPath.setLayoutData(
new GridData(GridData.HORIZONTAL_ALIGN_END));
lblMentorPath.setText("Path:");
}
{
txtMentor = new Text(grpMentor, SWT.BORDER);
txtMentor.setEnabled(false);
txtMentor.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
}
{
final Button chkDefault = new Button(grpMentor, SWT.CHECK);
chkDefault.setSelection(true);
chkDefault.setText("Default");
}
}
{
final Group grpSynopsis = new Group(entryTable, SWT.NONE);
grpSynopsis.setText("Synopsis SmartModels Properties");
final GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 3;
grpSynopsis.setLayoutData(gridData);
final GridLayout gridLayout_1 = new GridLayout();
gridLayout_1.numColumns = 3;
grpSynopsis.setLayout(gridLayout_1);
{
final Label lblSynopsisPath = new Label(grpSynopsis, SWT.NONE);
lblSynopsisPath.setLayoutData(
new GridData(GridData.HORIZONTAL_ALIGN_END));
lblSynopsisPath.setText("Path:");
}
{
txtSynopsis = new Text(grpSynopsis, SWT.BORDER);
txtSynopsis.setEnabled(false);
txtSynopsis.setLayoutData(
new GridData(GridData.FILL_HORIZONTAL));
}
{
final Button chkSynopsisDefault =
new Button(grpSynopsis, SWT.CHECK);
chkSynopsisDefault.setSelection(true);
chkSynopsisDefault.setText("Default");
}
}
{
final Group grpSynplicity = new Group(entryTable, SWT.NONE);
grpSynplicity.setText("Synplicity Properties");
final GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 3;
grpSynplicity.setLayoutData(gridData);
final GridLayout gridLayout_2 = new GridLayout();
gridLayout_2.numColumns = 3;
grpSynplicity.setLayout(gridLayout_2);
{
final Label lblSynplifyPath =
new Label(grpSynplicity, SWT.NONE);
lblSynplifyPath.setLayoutData(
new GridData(GridData.HORIZONTAL_ALIGN_END));
lblSynplifyPath.setText("Synplify Path:");
}
{
txtSynplify = new Text(grpSynplicity, SWT.BORDER);
txtSynplify.setEnabled(false);
txtSynplify.setLayoutData(
new GridData(GridData.FILL_HORIZONTAL));
}
{
final Button chkSynplifyDefault =
new Button(grpSynplicity, SWT.CHECK);
chkSynplifyDefault.setSelection(true);
chkSynplifyDefault.setText("Default");
}
{
final Label lblSynplifyProPath =
new Label(grpSynplicity, SWT.NONE);
lblSynplifyProPath.setLayoutData(
new GridData(GridData.HORIZONTAL_ALIGN_END));
lblSynplifyProPath.setText("Synplify Pro Path:");
}
{
txtSynplifyPro = new Text(grpSynplicity, SWT.BORDER);
txtSynplifyPro.setEnabled(false);
txtSynplifyPro.setLayoutData(
new GridData(GridData.FILL_HORIZONTAL));
}
{
final Button chkSynplifyProDefault =
new Button(grpSynplicity, SWT.CHECK);
chkSynplifyProDefault.setSelection(true);
chkSynplifyProDefault.setText("Default");
}
{
final Group grpTimingDesigner = new Group(entryTable, SWT.NONE);
grpTimingDesigner.setText("Timing Designer Properties");
final GridData gridData1 =
new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 3;
final GridData gridData_1 = new GridData(GridData.FILL_HORIZONTAL);
gridData_1.horizontalSpan = 3;
grpTimingDesigner.setLayoutData(gridData_1);
final GridLayout gridLayout_1 = new GridLayout();
gridLayout_1.numColumns = 3;
grpTimingDesigner.setLayout(gridLayout_1);
{
final Label lblTimingDesigner =
new Label(grpTimingDesigner, SWT.NONE);
lblTimingDesigner.setLayoutData(
new GridData(GridData.HORIZONTAL_ALIGN_END));
lblTimingDesigner.setText("Path:");
}
{
Text txtTimingDesigner =
new Text(grpTimingDesigner, SWT.BORDER);
txtTimingDesigner.setEnabled(false);
txtTimingDesigner.setLayoutData(
new GridData(GridData.FILL_HORIZONTAL));
}
{
final Button chkTimingDesignerDefault =
new Button(grpTimingDesigner, SWT.CHECK);
chkTimingDesignerDefault.setSelection(true);
chkTimingDesignerDefault.setText("Default");
}
}
{
final Group grpTransEDA = new Group(entryTable, SWT.NONE);
grpTransEDA.setText(
"TransEDA Verification Navigator Properties");
final GridData gridData1 =
new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 3;
final GridData gridData_1 = new GridData(GridData.FILL_HORIZONTAL);
gridData_1.horizontalSpan = 3;
grpTransEDA.setLayoutData(gridData_1);
final GridLayout gridLayout_1 = new GridLayout();
gridLayout_1.numColumns = 3;
grpTransEDA.setLayout(gridLayout_1);
{
final Label lblTransEDA = new Label(grpTransEDA, SWT.NONE);
lblTransEDA.setLayoutData(
new GridData(GridData.HORIZONTAL_ALIGN_END));
lblTransEDA.setText("Path:");
}
{
Text txtTransEDA = new Text(grpTransEDA, SWT.BORDER);
txtTransEDA.setEnabled(false);
txtTransEDA.setLayoutData(
new GridData(GridData.FILL_HORIZONTAL));
}
{
final Button chkTransEDADefault =
new Button(grpTransEDA, SWT.CHECK);
chkTransEDADefault.setSelection(true);
chkTransEDADefault.setText("Default");
}
}
{
final Group grpXilinx = new Group(entryTable, SWT.NONE);
grpXilinx.setText("Xilinx Properties");
final GridData gridData1 =
new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = 3;
final GridData gridData_1 = new GridData(GridData.FILL_HORIZONTAL);
gridData_1.horizontalSpan = 3;
grpXilinx.setLayoutData(gridData_1);
final GridLayout gridLayout_1 = new GridLayout();
gridLayout_1.numColumns = 3;
grpXilinx.setLayout(gridLayout_1);
{
final Label lblXilinx = new Label(grpXilinx, SWT.NONE);
lblXilinx.setLayoutData(
new GridData(GridData.HORIZONTAL_ALIGN_END));
lblXilinx.setText("Path:");
}
{
Text txtXilinx = new Text(grpXilinx, SWT.BORDER);
txtXilinx.setEnabled(false);
txtXilinx.setLayoutData(
new GridData(GridData.FILL_HORIZONTAL));
}
{
final Button chkXilinxDefault =
new Button(grpXilinx, SWT.CHECK);
chkXilinxDefault.setSelection(true);
chkXilinxDefault.setText("Default");
}
}
}
return entryTable;
}

}
cebarne2
 
Posts: 67
Joined: Tue Sep 23, 2003 10:11 am
Location: Cedar Rapids, IA

Postby cebarne2 » Wed Sep 24, 2003 6:37 am

One method I used to duplicate this problem was to change the "selected" value of every checkbox in the design. When I got about halfway down the page, changing "selected" to "true" no longer put a checkmark in the box. It was like the designer quit responding to changes in the properties.

When this happened, I tried to switch to "source" editor and I got the SWT error.

-Chad
cebarne2
 
Posts: 67
Joined: Tue Sep 23, 2003 10:11 am
Location: Cedar Rapids, IA

Postby admin » Wed Sep 24, 2003 10:09 pm

Ok, thank you, I found image leak. We will publish next version soon (in first days of October).
admin
Moderator
 
Posts: 166
Joined: Thu Jul 24, 2003 12:25 am

Postby cebarne2 » Thu Sep 25, 2003 4:26 am

Thank you. I look forward to it.
cebarne2
 
Posts: 67
Joined: Tue Sep 23, 2003 10:11 am
Location: Cedar Rapids, IA


Return to SWT Designer

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 1 guest