Scala Programming Language
  1. Scala Programming Language
  2. SI-6429

AssertionError in the presentation compiler (in mkSerializable)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.0
    • Fix Version/s: Scala 2.10.0
    • Component/s: Presentation Compiler
    • Labels:
      None
    • Environment:

      Scala: 2.10.0.v20120924-042318-ffaa3cb89e

      Description

      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)
      

        Activity

        Hide
        Grzegorz Kossakowski added a comment -

        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.

        Show
        Grzegorz Kossakowski added a comment - 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.
        Hide
        Paul Phillips added a comment -

        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.

        Show
        Paul Phillips added a comment - 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.
        Hide
        Paul Phillips added a comment -

        "...'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. */
        
        Show
        Paul Phillips added a comment - "...'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. */
        Hide
        Iulian Dragos added a comment -

        Scala version: 2.10.0.v20120924-042318-ffaa3cb89e

        Show
        Iulian Dragos added a comment - Scala version: 2.10.0.v20120924-042318-ffaa3cb89e
        Hide
        Paul Phillips added a comment - - edited

        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()
        
        Show
        Paul Phillips added a comment - - edited 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()
        Hide
        Iulian Dragos added a comment -

        Weird.

        Show
        Iulian Dragos added a comment - Weird.
        Show
        Grzegorz Kossakowski added a comment - Fixed in https://github.com/scala/scala/pull/1407

          People

          • Assignee:
            Iulian Dragos
            Reporter:
            Iulian Dragos
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development