Community
Participate
Working Groups
If s.o. changes/removes the input of a table viewer on a table with tooltips enabled it is possible and very likely that the session crashes with a HTTP ERROR 500 Problem accessing /view. Reason: Index out of bounds Caused by: java.lang.IllegalArgumentException: Index out of bounds at org.eclipse.swt.SWT.error(SWT.java:3185) at org.eclipse.swt.SWT.error(SWT.java:3119) at org.eclipse.swt.SWT.error(SWT.java:3090) at org.eclipse.swt.widgets.Table.getItem(Table.java:669) at org.eclipse.jface.viewers.CellToolTipProvider.getToolTipText(CellToolTipProvider.java:42) at org.eclipse.swt.internal.widgets.tablekit.TableLCA.readCellToolTipTextRequested(TableLCA.java:321) at org.eclipse.swt.internal.widgets.tablekit.TableLCA.readData(TableLCA.java:113) at org.eclipse.swt.internal.widgets.displaykit.DisplayLCA$1.doVisit(DisplayLCA.java:321) at org.eclipse.swt.internal.widgets.WidgetTreeVisitor$AllWidgetTreeVisitor.visit(WidgetTreeVisitor.java:35) at org.eclipse.swt.internal.widgets.WidgetTreeVisitor.accept(WidgetTreeVisitor.java:49) at org.eclipse.swt.internal.widgets.WidgetTreeVisitor.accept(WidgetTreeVisitor.java:56) at org.eclipse.swt.internal.widgets.WidgetTreeVisitor.accept(WidgetTreeVisitor.java:56) at org.eclipse.swt.internal.widgets.WidgetTreeVisitor.accept(WidgetTreeVisitor.java:56) at org.eclipse.swt.internal.widgets.WidgetTreeVisitor.accept(WidgetTreeVisitor.java:56) at org.eclipse.swt.internal.widgets.WidgetTreeVisitor.accept(WidgetTreeVisitor.java:56) at org.eclipse.swt.internal.widgets.displaykit.DisplayLCA.readData(DisplayLCA.java:328) at org.eclipse.rwt.internal.lifecycle.ReadData.execute(ReadData.java:26) at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.continueLifeCycle(RWTLifeCycle.java:222) at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.sleep(RWTLifeCycle.java:300) at org.eclipse.swt.widgets.Display.sleep(Display.java:1128) at org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(WorkbenchAdvisor.java:361) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2391) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2351) at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:2206) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:424) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.jface.internal.databinding.realmadapter.RealmAdapter.run(RealmAdapter.java:44) at org.eclipse.rap.ui.internal.RealmAdapterHook.runWithDefault(RealmAdapterHook.java:48) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:427) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:157) at org.eclipse.rap.tooltipbug.TBApplication.createUI(TBApplication.java:17) at org.eclipse.rwt.internal.lifecycle.EntryPointManager.createUI(EntryPointManager.java:92) at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:244) at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:113) at java.lang.Thread.run(Thread.java:619) at org.eclipse.rwt.internal.lifecycle.UIThread.run(UIThread.java:102)
Created attachment 175398 [details] demo project with test code The attached demo project contains some lines of code that create a table with tooltips enabled. If you move the mouse over the cells you will see some tooltips. If you click/select a cell below 'three' the expected behaviour is that the old entries are removed and the table is filled with the new content containing only two elements. But most of the time (it's a timing issue, so you cannot see the error *every* time) this selection event will change the content of the table and *then* a request for a tooltip on a non-existing table cell is triggered.
Created attachment 175399 [details] Workaround This is a workaround that checks that the itemIndex of the requested tooltip is within the table, but I would prefer a solution earlier in the execution flow.
*** Bug 321300 has been marked as a duplicate of this bug. ***
Fixed in CVS HEAD and 1.3 service branch. The TableLCA does not call CellToolTipProvider#getToolTipText for invalid cells anymore.
-> RESOLVED