Unexpected internal error [message #666812] |
Fri, 22 April 2011 14:15  |
Eclipse User |
|
|
|
WindowBuilder reports about unexpected internal error on Test1
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
public class Test2 extends Composite {
public Test2(Composite parent, int style) {
super(parent, style);
setLayout(new GridLayout());
new Test1(this, SWT.NONE).setL(true);
}
}
---------------------------
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
public class Test1 extends Composite {
private Label lbl;
public Test1(Composite parent, int style) {
super(parent, SWT.BORDER);
setLayout(new GridLayout());
lbl = new Label(this, SWT.NONE);
lbl.setLayoutData(new GridData(SWT.FILL, SWT.FILL));
}
public void setL(boolean b) {
lbl.setVisible(!b);
((GridData) lbl.getLayoutData()).exclude = b;
}
}
StackTrace:
java.lang.NullPointerException
at org.eclipse.wb.internal.swt.model.layout.grid.GridLayoutInfo.getImplicitControlCells(GridLayoutInfo.java:856)
at org.eclipse.wb.internal.swt.model.layout.grid.GridLayoutInfo.getImplicitGridSize(GridLayoutInfo.java:842)
at org.eclipse.wb.internal.swt.model.layout.grid.GridLayoutInfo.getControlsGridSize(GridLayoutInfo.java:821)
at org.eclipse.wb.internal.swt.model.layout.grid.GridLayoutInfo.getControlsGrid(GridLayoutInfo.java:864)
at org.eclipse.wb.internal.swt.model.layout.grid.GridLayoutInfo.fixEmptyColumns(GridLayoutInfo.java:200)
at org.eclipse.wb.internal.swt.model.layout.grid.GridLayoutInfo.refresh_afterCreate(GridLayoutInfo.java:170)
at org.eclipse.wb.internal.rcp.model.layout.grid.GridLayoutInfo.refresh_afterCreate(GridLayoutInfo.java:52)
at org.eclipse.wb.core.model.ObjectInfo.refresh_afterCreate(ObjectInfo.java:611)
|
|
|
|
|
Re: Unexpected internal error [message #1070520 is a reply to message #1070354] |
Thu, 18 July 2013 02:28   |
Eclipse User |
|
|
|
The two test classes are not from me and reproduce not my error. I replied on this topic, because it is a similar error and it occures in the same region of code like the original.
As I mentioned in my post, I have no small test case. I have 2 UI-classes that are very complex and huge. In one, the error occures and in the second not. In the not working class, I use also the griddata.exlude command, like in the original post, but this seems not be the cause of the error. Both UI's uses similar widgets, Composite, Sash-Form, Text, Label, NatTable, CCombo... mostly with GridLayout.
Eclipse-Version is 4.3 Kepler (3.9.0.v20130326-1255) and WB-Version is 1.6.0.r43x201305212024[201307171427]
I will try to build a test-case.
|
|
|
|
|
Re: Unexpected internal error [message #1173389 is a reply to message #1070718] |
Wed, 06 November 2013 08:41  |
Eclipse User |
|
|
|
This is my first post here, I wouldn't like to interrupt discussion but I had the same problem with I was able to fix, perhaps it will help you to find the real problem.
Part of my exception log:
java.lang.ArrayIndexOutOfBoundsException: 2
at org.eclipse.wb.internal.swt.model.layout.grid.GridLayoutInfo.fixEmptyColumns(GridLayoutInfo.java:204)
at org.eclipse.wb.internal.swt.model.layout.grid.GridLayoutInfo.refresh_afterCreate(GridLayoutInfo.java:169)
Solution was to change 3->2, which is 'horizontalSpan':
myGrid.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 3->2, 1));
Crash happened for parent controls/classes, not for the control/class where the 'myGrid' was implemented. Child control/class works fine, it is visualized correctly by WindowBuilder Design mode.
P.S. Sorry for my bad English.
|
|
|
Powered by
FUDForum. Page generated in 0.05205 seconds