| Unexpected internal error [message #666812] |
Fri, 22 April 2011 14:15  |
Oleg Danilov Messages: 1 Registered: July 2009 |
Junior Member |
|
|
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   |
Rico Scholz Messages: 7 Registered: March 2013 |
Junior Member |
|
|
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 #1070718 is a reply to message #1070653] |
Thu, 18 July 2013 10:28  |
Eric Clayberg Messages: 778 Registered: July 2009 Location: Boston, MA |
Senior Member |
|
|
It is generally not a good idea to piggyback off of an existing thread unless you are experiencing the exact same error and can reproduce it using the same test case. I didn't notice the user name change on the thread so assumed that the two were related when they weren't.
Code that takes an incoming composite and changes its layout downstream can be very tricky.
|
|
|
Powered by
FUDForum. Page generated in 0.01698 seconds