SWT Table with SWT.VIRTUAL raises StackOverflowError

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 `SWT.VIRTUAL` style constant for the table. Consider the following 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); This causes a StackOverflowError as follows: 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 ... As shown above, the stack cycles from the Display's `windowProc` call to the OS' `CallWindowProcW`; 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 `table.remove(0)` line. Testing under Vista, XP or Mac OS X gives no problems. Removing the `SWT.VIRTUAL` style constant resolves the problem, but doesn't allow for custom objects in the table. It would seem that this is a SWT bug, or am I missing something?

以上就是SWT Table with SWT.VIRTUAL raises StackOverflowError的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏