Community
Participate
Working Groups
I wish I could extract more context for this bug report, but this is all I have: While editing I suddenly got an exception, which was shown in a a dialog box simply saying "Error", with the "Details" button grayed out. The following exception had been logged: org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.IllegalArgumentException: Index out of bounds) at org.eclipse.swt.SWT.error(SWT.java:3283) at org.eclipse.swt.SWT.error(SWT.java:3206) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:126) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3262) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2903) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1762) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1726) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:397) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:109) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:379) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) at jrockit.reflect.InitialMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source) at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338) at org.eclipse.core.launcher.Main.basicRun(Main.java:282) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952) Caused by: java.lang.IllegalArgumentException: Index out of bounds at org.eclipse.swt.SWT.error(SWT.java:3267) at org.eclipse.swt.SWT.error(SWT.java:3206) at org.eclipse.swt.SWT.error(SWT.java:3177) at org.eclipse.swt.widgets.TreeItem.findPrevious(TreeItem.java:208) at org.eclipse.swt.widgets.TreeItem.<init>(TreeItem.java:118) at org.eclipse.jface.viewers.TreeViewer.newItem(TreeViewer.java:528) at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:534) at org.eclipse.jface.viewers.AbstractTreeViewer.createAddedElements(AbstractTreeViewer.java:193) at org.eclipse.jface.viewers.AbstractTreeViewer.internalAdd(AbstractTreeViewer.java:181) at org.eclipse.jface.viewers.TreeViewer.internalAdd(TreeViewer.java:811) at org.eclipse.jface.viewers.AbstractTreeViewer.add(AbstractTreeViewer.java:124) at org.eclipse.ui.progress.DeferredTreeContentManager$3.runInUIThread(DeferredTreeContentManager.java:305) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:93) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3262) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2899) ... 16 more (This might be related to Mylar, which seems prone to such exceptions, but then again it might not.) Eclipse 3.2M4.
Thanks for logging this bug. Please reopen it if you see it again.
*** Bug 127949 has been marked as a duplicate of this bug. ***
Reopening since the same exception has been observed again. Note that TreeItem (Tree parent, int style, int index) does not constrain the allowed range of the index, but still throws an "Index out of bounds" IAE here.
From what I can see, someone is calling new TreeItem() with an invalid index and we are throwing an error. It could be that we have a bug and the index is valid. Is there something I am missing? Moving to UI for someone to check AbstractTreeViewer.createTreeItem().
Steve, the index cannot be invalid, since the TreeItem constructors don't specify any precondition on the index ;-). I filed bug 128378 for this.
Right.
*** Bug 130517 has been marked as a duplicate of this bug. ***
The only idea I have for this one is that a label provider spins the event loop, which runs an asyncExec that changes the tree. We should protect against this more than we do already, but it would still be good to have a reproducible case.
Boris if you are not planning to address this for 3.2.1 you should remove the tag. The release candidates start next week.
I don't have a reproducible case for this, but I opened a bug for what I think is the general problem. *** This bug has been marked as a duplicate of 154571 ***