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

Bug 359547

Summary: ConcurrentModificationException in LandmarkMarkerManager
Product: z_Archived Reporter: Steffen Pingel <steffen.pingel>
Component: MylynAssignee: Shawn Minto <shawn.minto>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: P1    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Steffen Pingel CLA 2011-09-30 06:48:07 EDT
The exception below is logged during execution of AllJavaTests.

https://hudson.eclipse.org/hudson/job/mylyn-context-nightly/104/consoleFull

Running org.eclipse.mylyn.java.tests.AllJavaTests
[2011-09-30T6-37-37] Status ERROR: org.eclipse.mylyn.java.ui code=0 Could not update landmark markers java.util.ConcurrentModificationException, Exception:
java.util.ConcurrentModificationException
	at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
	at java.util.HashMap$KeyIterator.next(HashMap.java:828)
	at org.eclipse.mylyn.internal.java.ui.LandmarkMarkerManager.modelUpdated(LandmarkMarkerManager.java:97)
	at org.eclipse.mylyn.internal.java.ui.LandmarkMarkerManager.contextChanged(LandmarkMarkerManager.java:65)
	at org.eclipse.mylyn.internal.context.core.InteractionContextManager$4.run(InteractionContextManager.java:444)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.mylyn.internal.context.core.InteractionContextManager.deactivateContext(InteractionContextManager.java:434)
	at org.eclipse.mylyn.java.tests.xml.XmlSearchPluginTest.tearDown(XmlSearchPluginTest.java:88)
	at junit.framework.TestCase.runBare(TestCase.java:140)
Comment 1 Steffen Pingel CLA 2011-09-30 07:00:10 EDT
The exception is due to access to markerMap which is shared state that is not protected even though it is accessed concurrently. There is no straight forward fix for this. Shawn, let's take a look at the implementation together.
Comment 2 Steffen Pingel CLA 2011-09-30 07:00:13 EDT
Created attachment 204371 [details]
mylyn/context/zip
Comment 3 Sam Davis CLA 2015-04-29 19:53:43 EDT
Doesn't seem to happen anymore.