Race condition in symbol importer
All you need to do is closing the Type Hierarchy view while the computation is still ongoing.
Here is the full stacktrace
java.lang.AssertionError: assertion failed: Race condition detected: You are running a presentation compiler method outside the PC thread.[phase: <no phase>] Please file a ticket with the current stack trace at https://www.assembla.com/spaces/scala-ide/support/tickets
at scala.tools.nsc.interactive.Global.assertCorrectThread(Global.scala:452)
at scala.reflect.internal.Symbols$Symbol.rawInfo(Symbols.scala:1298)
at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1239)
at scala.reflect.internal.Importers$StandardImporter.importOrRelink$1(Importers.scala:140)
at scala.reflect.internal.Importers$StandardImporter.importSymbol(Importers.scala:202)
at scala.reflect.internal.Importers$StandardImporter.importOrRelink$1(Importers.scala:148)
at scala.reflect.internal.Importers$StandardImporter.importSymbol(Importers.scala:202)
at scala.reflect.internal.Importers$StandardImporter.importOrRelink$1(Importers.scala:148)
at scala.reflect.internal.Importers$StandardImporter.importSymbol(Importers.scala:202)
at scala.reflect.internal.Importers$StandardImporter.importSymbol(Importers.scala:27)
at org.scala.tools.eclipse.search.searching.SearchPresentationCompiler$$anonfun$org$scala$tools$eclipse$search$searching$SearchPresentationCompiler$$importSymbol$4.apply(SearchPresentationCompiler.scala:397)
at org.scala.tools.eclipse.search.searching.SearchPresentationCompiler$$anonfun$org$scala$tools$eclipse$search$searching$SearchPresentationCompiler$$importSymbol$4.apply(SearchPresentationCompiler.scala:396)
at scala.tools.nsc.util.InterruptReq.execute(InterruptReq.scala:26)
at scala.tools.nsc.interactive.Global.pollForWork(Global.scala:339)
at scala.tools.nsc.interactive.PresentationCompilerThread.run(PresentationCompilerThread.scala:22)
java.lang.AssertionError: assertion failed: Race condition detected: You are running a presentation compiler method outside the PC thread.[phase: <no phase>] Please file a ticket with the current stack trace at https://www.assembla.com/spaces/scala-ide/support/tickets
at scala.tools.nsc.interactive.Global.assertCorrectThread(Global.scala:452)
at scala.reflect.internal.Symbols$Symbol.rawInfo(Symbols.scala:1298)
at scala.reflect.internal.Symbols$Symbol.isCoDefinedWith(Symbols.scala:1931)
at scala.reflect.internal.Symbols$ClassSymbol$$anonfun$companionModule0$1.apply(Symbols.scala:2980)
at scala.reflect.internal.Symbols$ClassSymbol$$anonfun$companionModule0$1.apply(Symbols.scala:2980)
at scala.reflect.internal.Symbols$Symbol.filter(Symbols.scala:1664)
at scala.reflect.internal.Symbols$Symbol.suchThat(Symbols.scala:1668)
at scala.reflect.internal.Symbols$ClassSymbol.companionModule0(Symbols.scala:2979)
at scala.reflect.internal.Symbols$ClassSymbol.companionModule(Symbols.scala:2982)
at scala.reflect.internal.Symbols$PackageClassSymbol.sourceModule(Symbols.scala:3130)
at scala.reflect.internal.Importers$StandardImporter.importOrRelink$1(Importers.scala:152)
at scala.reflect.internal.Importers$StandardImporter.importSymbol(Importers.scala:202)
at scala.reflect.internal.Importers$StandardImporter.importOrRelink$1(Importers.scala:148)
at scala.reflect.internal.Importers$StandardImporter.importSymbol(Importers.scala:202)
at scala.reflect.internal.Importers$StandardImporter.importOrRelink$1(Importers.scala:148)
at scala.reflect.internal.Importers$StandardImporter.importSymbol(Importers.scala:202)
at scala.reflect.internal.Importers$StandardImporter.importOrRelink$1(Importers.scala:148)
at scala.reflect.internal.Importers$StandardImporter.importSymbol(Importers.scala:202)
at scala.reflect.internal.Importers$StandardImporter.importSymbol(Importers.scala:27)
at org.scala.tools.eclipse.search.searching.SearchPresentationCompiler$$anonfun$org$scala$tools$eclipse$search$searching$SearchPresentationCompiler$$importSymbol$4.apply(SearchPresentationCompiler.scala:397)
at org.scala.tools.eclipse.search.searching.SearchPresentationCompiler$$anonfun$org$scala$tools$eclipse$search$searching$SearchPresentationCompiler$$importSymbol$4.apply(SearchPresentationCompiler.scala:396)
at scala.tools.nsc.util.InterruptReq.execute(InterruptReq.scala:26)
at scala.tools.nsc.interactive.Global.pollForWork(Global.scala:339)
at scala.tools.nsc.interactive.PresentationCompilerThread.run(PresentationCompilerThread.scala:22)
This ticket is based on functionality that is still under review (here: https://github.com/scala-ide/scala-search/pull/68), but I expect it will be merged soon.
In scala-ide:75b7bcce3bc7eff428452fa0b3dc204f44363ec9 Workaround for race condition in symbol importer
Looks like the symbol importer module isn't thread-safe. In particular, before
importing a symbol from one presentation compiler to another, we need to make
sure the symbol's owner chain, and all companion's symbols are fully
initialized.
Fixes #1001826
In scala-ide:f99041220dd2b63dc88d7c53bdbb1d9edf46c10c Workaround for race condition in symbol importer
Looks like the symbol importer module isn't thread-safe. In particular, before
importing a symbol from one presentation compiler to another, we need to make
sure both the symbol and its owner chain are **fully initialized**, and the
symbol's ``sourceModel`` is also initialized. It's brittle, we know it, but
this seems to ensure we don't initialize symbols in the wrong presentation
compiler thread.
Fixes #1001826