Community
Participate
Working Groups
I got this AIOOBE when running the UI test suites against HEAD. The problem is in this line: int newIndex = lastIndexOfContainer(targetContainer); if (ref == parts.get(newIndex)) { The method lastIndexOfContainer can return -1, in which case you'll get the AIIOBE on the next line. java.lang.ArrayIndexOutOfBoundsException at java.util.ArrayList.get(ArrayList.java:358) at org.eclipse.ui.internal.WorkbenchPage$ActivationList.bringToTop(WorkbenchPage.java:3814) at org.eclipse.ui.internal.WorkbenchPage.updateVisibility(WorkbenchPage.java:3300) at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3222) at org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(WorkbenchPage.java:957) at org.eclipse.ui.internal.WorkbenchPage.access$12(WorkbenchPage.java:941) at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.java:3340) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3338) at org.eclipse.ui.tests.api.IWorkbenchPageTest.testBug76285(IWorkbenchPageTest.java:2005) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:481) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:347) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:57) at org.eclipse.pde.internal.junit.runtime.UITestApplication$1.run(UITestApplication.java:105) 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:3325) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.pde.internal.junit.runtime.UITestApplication.run(UITestApplication.java:45) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) 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:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)
The code should read //New index can be -1 if there is no last index if (newIndex >= 0 && ref == parts.get(newIndex)) return; parts.remove(ref); if(newIndex >= 0) parts.add(newIndex, ref); else parts.add(ref); McQ we should add this for RC2
great bug as usual John - thanks!
+1.
Fixed for 20060425-1200
Marking verified for 20060428-0010 by code inspection
I can also verify this - I reran the test, which was previously consistently getting the error, and it now passes.