Bug 67187 [implementation] Concurrent modification of CompilationUnitDocumentProvider's ReverseMap
Was just scrolling through a Java file and got a popup with the following info: Java AST creation (Error: An internal error occurred during: "Java AST creation".) An internal error occurred during: "Java AST creation". java.lang.IndexOutOfBoundsException: Index: 62, Size: 60 java.util.ArrayList.RangeCheck(ArrayList.java:507) java.util.ArrayList.get(ArrayList.java:324) org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider$ReverseM ap.get(CompilationUnitDocumentProvider.java:325) org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider$Compilat ionUnitAnnotationModel.addAnnotation(CompilationUnitDocumentProvider.java:665) org.eclipse.jface.text.source.AnnotationModel.addAnnotation (AnnotationModel.java:163) org.eclipse.jdt.internal.ui.text.correction.QuickAssistLightBulbUpdater.calcula teLightBulb(QuickAssistLightBulbUpdater.java:233) org.eclipse.jdt.internal.ui.text.correction.QuickAssistLightBulbUpdater.doSelec tionChanged(QuickAssistLightBulbUpdater.java:221) org.eclipse.jdt.internal.ui.text.correction.QuickAssistLightBulbUpdater.access$ 0(QuickAssistLightBulbUpdater.java:204) org.eclipse.jdt.internal.ui.text.correction.QuickAssistLightBulbUpdater$1.selec tionChanged(QuickAssistLightBulbUpdater.java:128) org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartLis tenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:164) org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run (SelectionListenerWithASTManager.java:136) org.eclipse.core.internal.jobs.Worker.run(Worker.java:66) Wasn't doing anything remarkable at the time - certainly nothing that I would expect would induce this...
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitDocumentProvider.java
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Display;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.ListenerList;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.text.Assert;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.DefaultLineTracker;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ILineTracker;
import org.eclipse.jface.text.ISynchronizable;
import org.eclipse.jface.text.Position;
import org.eclipse.jface.text.source.Annotation;
import org.eclipse.jface.text.source.AnnotationModelEvent;
import org.eclipse.jface.text.source.IAnnotationAccessExtension;
import org.eclipse.jface.text.source.IAnnotationModel;
import org.eclipse.jface.text.source.IAnnotationModelListener;
import org.eclipse.jface.text.source.IAnnotationModelListenerExtension;
import org.eclipse.jface.text.source.IAnnotationPresentation;
import org.eclipse.jface.text.source.ImageUtilities;
import org.eclipse.ui.editors.text.EditorsUI;
import org.eclipse.ui.editors.text.ForwardingDocumentProvider;
import org.eclipse.ui.editors.text.TextFileDocumentProvider;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel;
import org.eclipse.ui.texteditor.AnnotationPreference;