Bug 576206 - NPE in AnnotationModel.getAnnotationIterator
Summary: NPE in AnnotationModel.getAnnotationIterator
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.22   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-23 01:07 EDT by Christian Dietrich CLA
Modified: 2022-12-07 10:37 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Dietrich CLA 2021-09-23 01:07:07 EDT
i am getting this NPE sporadically in our testsException in thread "Thread-20" 

java.lang.NullPointerException: Cannot invoke "org.eclipse.jface.text.source.IAnnotationModel.getAnnotationIterator()" because the return value of "java.util.Map.get(Object)" is null
	at org.eclipse.jface.text.source.AnnotationModel.getAnnotationIterator(AnnotationModel.java:744)
	at org.eclipse.jface.text.source.AnnotationModel.getAnnotationIterator(AnnotationModel.java:668)
	at org.eclipse.jface.text.source.projection.ProjectionSummary.removeSummaries(ProjectionSummary.java:175)
	at org.eclipse.jface.text.source.projection.ProjectionSummary.internalUpdateSummaries(ProjectionSummary.java:154)
	at org.eclipse.jface.text.source.projection.ProjectionSummary$Summarizer.run(ProjectionSummary.java:74)

it looks like there is a race condition somewhere.
Comment 1 Christian Dietrich CLA 2021-09-23 01:17:27 EDT
@Sebastian can it be your fix for CME is not completely working?
Comment 2 Christian Dietrich CLA 2021-09-24 02:38:16 EDT
org.eclipse.jface.text.source.AnnotationModel.getAnnotationIterator(int, int, boolean, boolean) also does not seem to check for null.