Note that there are some explanatory texts on larger screens.

plurals
  1. POSWT Table with SWT.VIRTUAL raises StackOverflowError
    text
    copied!<p>After recently installing Windows 7 Professional, I'm getting a strange problem removing a TableItem from a populated Table in SWT. It is specific to Windows 7 and to the <code>SWT.VIRTUAL</code> style constant for the table.</p> <p>Consider the following code:</p> <pre><code>table = new Table(parent, SWT.VIRTUAL | Skin.SCROLL_STYLE | SWT.FULL_SELECTION | SWT.BORDER); TableItem item = new TableItem(table, SWT.NONE); item.setText("Table item"); table.remove(0); </code></pre> <p>This causes a StackOverflowError as follows:</p> <pre><code>Caused by: java.lang.StackOverflowError at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2312) at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:334) at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:200) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4036) at org.eclipse.swt.widgets.Table.windowProc(Table.java:5520) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4602) at org.eclipse.swt.internal.win32.OS.SendMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.SendMessage(OS.java:3106) at org.eclipse.swt.widgets.Table.wmNotifyChild(Table.java:6319) at org.eclipse.swt.widgets.Control.wmNotify(Control.java:4877) at org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:1757) at org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:4507) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4000) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4602) at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at ... </code></pre> <p>As shown above, the stack cycles from the Display's <code>windowProc</code> call to the OS' <code>CallWindowProcW</code>; this leads me to suspect that it has something to do with the Windows 7-specific implementation of SWT. The stack trace eventually originates from the <code>table.remove(0)</code> line.</p> <p>Testing under Vista, XP or Mac OS X gives no problems.</p> <p>Removing the <code>SWT.VIRTUAL</code> style constant resolves the problem, but doesn't allow for custom objects in the table.</p> <p>It would seem that this is a SWT bug, or am I missing something?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload