Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 371122 - [implementation] ConcurrentModificationException from AbstractDocument.getPositions(...)
Summary: [implementation] ConcurrentModificationException from AbstractDocument.getPos...
Status: CLOSED DUPLICATE of bug 69289
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.6.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-09 13:58 EST by Jared Burns CLA
Modified: 2012-02-10 01:56 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***