Skip to content

ConcurrentModificationException in the compiler #12726

Closed
scala/scala
#10302
@noresttherein

Description

@noresttherein

Scala 2.13.10

Now this is something I haven't seen. StackOverflowError sure, half a dozen a day, I can understand them. But this?

java.util.ConcurrentModificationException: mutation occurred during iteration
	at scala.collection.mutable.MutationTracker$.checkMutations(MutationTracker.scala:43)
	at scala.collection.mutable.MutationTracker$CheckedIterator.hasNext(MutationTracker.scala:59)
	at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:575)
	at scala.collection.IterableOnceOps.foreach$(IterableOnce.scala:573)
	at scala.collection.AbstractIterable.foreach(Iterable.scala:933)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$TyperPhase.apply(Analyzer.scala:120)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:467)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$TyperPhase.run(Analyzer.scala:106)
	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1530)
	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1514)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1506)
	at scala.tools.nsc.Global$Run.compileFiles(Global.scala:1619)
	at xsbt.CachedCompiler0.run(CompilerBridge.scala:163)
	at xsbt.CachedCompiler0.run(CompilerBridge.scala:134)
	at xsbt.CompilerBridge.run(CompilerBridge.scala:39)
	at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:91)

I haven't a faintest idea in what class, file or even package this happens, so I have no way of extracting it. Maybe it will tell something to someone. Any ideas of how to look for clues? I have about every logging option enabled which doesn't throw an AssertionError, or NullPointerException itself. Unfortunately, the last line from -Ylog:0-100 seems to be from a successfully processed file (I got a summary of warnings for the file), so I am at a loss.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions