Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 371122

Summary: [implementation] ConcurrentModificationException from AbstractDocument.getPositions(...)
Product: [Eclipse Project] Platform Reporter: Jared Burns <jared_burns>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert
Version: 3.6.2   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Jared Burns CLA 2012-02-09 13:58:14 EST
We have intermittently seen the following ConcurrentModificationException from AbstractDocument in our JUnit tests for years, against multiple major versions of Eclipse, but it looks like no one has filed this defect yet.

It appears that AbstractDocument is missing synchronization around access to the fPositions map and the List values it contains.

Caused by: java.util.ConcurrentModificationException
	at java.util.AbstractList$SimpleListIterator.next(AbstractList.java:64)
	at java.util.AbstractList$SubAbstractList$SubAbstractListIterator.next(AbstractList.java:206)
	at org.eclipse.jface.text.AbstractDocument.getPositions(AbstractDocument.java:1715)
	at org.eclipse.jface.text.source.AnnotationModel.getRegionAnnotationIterator(AnnotationModel.java:737)
	at org.eclipse.jface.text.source.AnnotationModel.getAnnotationIterator(AnnotationModel.java:699)
	at org.eclipse.jface.text.source.AnnotationModel.getAnnotationIterator(AnnotationModel.java:710)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.doPaint1(AnnotationRulerColumn.java:718)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBufferPaint(AnnotationRulerColumn.java:532)
	at org.eclipse.jface.text.source.AnnotationRulerColumn.redraw(AnnotationRulerColumn.java:811)
	at org.eclipse.jface.text.source.AnnotationRulerColumn$6.run(AnnotationRulerColumn.java:798)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
Comment 1 Dani Megert CLA 2012-02-10 01:56:36 EST

*** This bug has been marked as a duplicate of bug 69289 ***