Project: JDT
Bug 67428 [implementation] ArrayIndexOutOfBoundsException in BufferedRuleBasedScanner
Reported: 2004-06-16 06:14:13 | Status: resolved fixed

3.0RC2 Build id: 200406111814 Getting from time to time the following sequence of errors while editing. I cannot correlate the errors with any specific action since the edit session seems to be not affected by them and i see the errors only if i look into the log. Yesterday it happend five times, this morning one. !ENTRY org.eclipse.ui 4 4 Jun 16, 2004 11:51:36.850 !MESSAGE Unhandled event loop exception !ENTRY org.eclipse.ui 4 0 Jun 16, 2004 11:51:36.850 !MESSAGE Failed to execute runnable (java.lang.ArrayIndexOutOfBoundsException: -1) !STACK 0 org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.ArrayIndexOutOfBoundsException: -1) at org.eclipse.swt.SWT.error(SWT.java:2691) at org.eclipse.swt.SWT.error(SWT.java:2616) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:109) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2709) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2401) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1362) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1333) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:252) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:334) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:272) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:638) at org.eclipse.core.launcher.Main.main(Main.java:622) !ENTRY org.eclipse.ui 4 4 Jun 16, 2004 11:51:36.850 !MESSAGE *** SWT nested exception !ENTRY org.eclipse.ui 4 0 Jun 16, 2004 11:51:36.866 !MESSAGE -1 !STACK 0 java.lang.ArrayIndexOutOfBoundsException: -1 at org.eclipse.jface.text.rules.BufferedRuleBasedScanner.read(BufferedRuleBasedScanner.java:118) at org.eclipse.jdt.internal.ui.text.CombinedWordRule.evaluate(CombinedWordRule.java:334) at org.eclipse.jface.text.rules.RuleBasedScanner.nextToken(RuleBasedScanner.java:155) at org.eclipse.jdt.internal.ui.text.AbstractJavaScanner.nextToken(AbstractJavaScanner.java:115) at org.eclipse.jface.text.rules.DefaultDamagerRepairer.createPresentation(DefaultDamagerRepairer.java:166) at org.eclipse.jface.text.presentation.PresentationReconciler.createPresentation(PresentationReconciler.java:446) at org.eclipse.jface.text.presentation.PresentationReconciler.processDamage(PresentationReconciler.java:555) at org.eclipse.jface.text.presentation.PresentationReconciler.access$3(PresentationReconciler.java:553) at org.eclipse.jface.text.presentation.PresentationReconciler$InternalListener.textChanged(PresentationReconciler.java:222) at org.eclipse.jface.text.TextViewer.updateTextListeners(TextViewer.java:2235) at org.eclipse.jface.text.TextViewer.fireRedrawChanged(TextViewer.java:4268) at org.eclipse.jface.text.TextViewer.enabledRedrawing(TextViewer.java:4338) at org.eclipse.jface.text.TextViewer.setRedraw(TextViewer.java:4415) at org.eclipse.jface.text.source.projection.ProjectionViewer.catchupWithProjectionAnnotationModel(ProjectionViewer.java:868) at org.eclipse.jface.text.source.projection.ProjectionViewer.access$5(ProjectionViewer.java:821) at org.eclipse.jface.text.source.projection.ProjectionViewer$1.run(ProjectionViewer.java:792) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:106) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2709) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2401) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1362) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1333) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:252) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:334) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:272) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:638) at org.eclipse.core.launcher.Main.main(Main.java:622)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java