Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError in the presentation compiler (in mkSerializable) #6429

Closed
scabug opened this issue Sep 26, 2012 · 8 comments
Closed

AssertionError in the presentation compiler (in mkSerializable) #6429

scabug opened this issue Sep 26, 2012 · 8 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Sep 26, 2012

I keep getting crashes like the one below in the IDE. I mentioned it in one of the Scala meetings and Martin's comment was that 'updateInfo' is not supposed to be used inside the type checker.

Unfortunately I can't reproduce it at will, but using the IDE for a while, you'll start noticing it.

[org.scalaide.worksheet] ScriptCompilationUnit.scala:1: Presentation compiler crashed while type checking this file: java.lang.AssertionError: assertion failed: (2,1)
[org.scalaide.worksheet] type checking: ScalaReconcilingStrategy.scala
2012-09-25 18:15:40,667 ERROR [Worker-3541] - SemanticHighlightingAnnotationsManager - Error performing semantic highlighting
java.lang.AssertionError: assertion failed: (2,1)
	at scala.reflect.internal.Symbols$Symbol.updateInfo(Symbols.scala:1243)
	at scala.reflect.internal.Symbols$Symbol.makeSerializable(Symbols.scala:1473)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1705)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5300)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5357)
	at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedStat$1(Typers.scala:2684)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$55.apply(Typers.scala:2784)
	at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$55.apply(Typers.scala:2784)
	at scala.collection.immutable.List.loop$1(List.scala:164)
	at scala.collection.immutable.List.mapConserve(List.scala:180)
	at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2784)
	at scala.tools.nsc.typechecker.Typers$Typer.typedPackageDef$1(Typers.scala:5026)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5303)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5357)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5408)
	at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:98)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:461)
	at scala.tools.nsc.interactive.Global$TyperRun$$anonfun$applyPhase$1.apply(Global.scala:1084)
	at scala.tools.nsc.interactive.Global$TyperRun$$anonfun$applyPhase$1.apply(Global.scala:1084)
	at scala.reflect.internal.SymbolTable.atPhase(SymbolTable.scala:201)
	at scala.tools.nsc.interactive.Global$TyperRun.applyPhase(Global.scala:1084)
	at scala.tools.nsc.interactive.Global$TyperRun.typeCheck(Global.scala:1077)
	at scala.tools.nsc.interactive.Global.scala$tools$nsc$interactive$Global$$typeCheck(Global.scala:563)
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 26, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6429?orig=1
Reporter: @dragos
Affected Versions: 2.10.0

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 26, 2012

@gkossakowski said:
I talked to Iulian and this seems like critical issue because it slows down presentation compiler that has to restart due to crashes.

Raising importance to critical.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 26, 2012

@paulp said:
Can you give the git hash of the scala version which produced that stack trace? It's hard to learn much from a stack trace without being sure of what the line numbers mean.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 26, 2012

@paulp said:
"...'updateInfo' is not supposed to be used inside the type checker."

Is there any indication anywhere about how updateInfo is supposed to be used other than the comment at its definition?

/** Set new info valid from start of this phase. */
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 26, 2012

@dragos said:
Scala version: 2.10.0.v20120924-042318-ffaa3cb89e

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 26, 2012

@paulp said (edited on Sep 26, 2012 6:11:40 PM UTC):
That's interesting. I'm sorry to say there must be something is wrong, either in our line numbers, version string creation, correspondence to actual source code, or... any ideas?

	at scala.reflect.internal.Symbols$Symbol.makeSerializable(Symbols.scala:1473)
	at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1705)

In ffaa3cb89e, that call to makeSerializable is on line 1722, not 1705.

If I chase it backward, it doesn't look like it has ever been at 1705, at least not in a long time. This is the 2.10.x branch, it's similar on master.

% for sha in $(git log --format=%h -n20 -- src/compiler/scala/tools/nsc/typechecker/Typers.scala) ; \
  do echo "$sha $(git show $sha:src/compiler/scala/tools/nsc/typechecker/Typers.scala |grep -n makeSerializable)"; \
  done

c96db8b555 1722:              clazz.makeSerializable()
9ec19f34ac 1720:              clazz.makeSerializable()
52ea3cc76f 1720:              clazz.makeSerializable()
dbe69dc0db 1709:              clazz.makeSerializable()
beb08c206b 1710:              clazz.makeSerializable()
08e5fd23e7 1710:              clazz.makeSerializable()
8c69f4da33 1710:              clazz.makeSerializable()
fce3f8b2e3 1721:              clazz.makeSerializable()
0e061f420f 1709:              clazz.makeSerializable()
66603a2c00 1710:              clazz.makeSerializable()
c30a9bddc4 1710:              clazz.makeSerializable()
9bcb335b8a 1708:              clazz.makeSerializable()
dbe7ef94dd 1710:              clazz.makeSerializable()
344215b92d 1708:              clazz.makeSerializable()
ea0d891f23 1708:              clazz.makeSerializable()
210f8c8f10 1708:              clazz.makeSerializable()
55b609458f 1708:              clazz.makeSerializable()
e9c01dd1ce 1709:              clazz.makeSerializable()
255e096f1a 1709:              clazz.makeSerializable()
41dfb16121 1709:              clazz.makeSerializable()
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 26, 2012

@dragos said:
Weird.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Sep 28, 2012

@scabug scabug closed this Sep 28, 2012
@scabug scabug added this to the 2.10.0 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.