Quantcast

ClassfileParser crash

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

ClassfileParser crash

√iktor Ҡlang
Hey guys,

Just encountered a reproducible compiler crash:

java.lang.AssertionError: assertion failed: class ActorRegistry.Spawn$2 linkedModule: object ActorRegistryList(method spawn$default$2, method shutdownAll, method unregister, method register, method spawn, method actorOf, method actorOf, method actorOf, method homeAddress, lazy value remote, lazy value remote, method typedActorFor, method typedActorFor, method typedActorsFor, method typedActorsFor, method typedActorFor, method typedActorsFor, method filterTypedActors, method findTypedActor, method foreachTypedActor, method typedActors, method actorFor, method actorsFor, method actorsFor, method actorFor, method actorsFor, method filter, method actorsFor, method find, method foreach, method size, method actors, value guard, value guard, value actorsById, value actorsById, value actorsByUUID, value actorsByUUID, method remoteBootstrap, constructor ActorRegistry, method foreachListener, method notifyListeners, method hasListener, method hasListeners, method removeListener, method addListener, method manageLifeCycleOfListeners, value listeners, method $init$, value log, method $asInstanceOf, method $isInstanceOf, method synchronized, method ne, method eq, method !=, method ==, method ##, method finalize, method wait, method wait, method wait, method notifyAll, method notify, method toString, method clone, method equals, method hashCode, method getClass, method asInstanceOf, method isInstanceOf, method !=, method ==)

Thought I'd see if anyone has any workarounds for this, or if it is already logged, before opening a ticket.

Steps to reproduce:
1) clone https://github.com/jboner/akka/tree/remote_deluxe
2) Add following Java file: akka/actor/Actors.java as

package akka.actor;

public class Actors {
    public static ActorRegistry$ registry() {
        return ActorRegistry$.MODULE$;
    }
}

3) sbt console
4) scala> akka.actor.Actors.registry


Possible linked tickets: http://lampsvn.epfl.ch/trac/scala/search?q=linkedModule (Although the relevant ones seems to be closed)

Stacktrace:

scala> akka.actor.Actors.registry
java.lang.AssertionError: assertion failed: class ActorRegistry.Spawn$2 linkedModule: object ActorRegistryList(method spawn$default$2, method shutdownAll, method unregister, method register, method spawn, method actorOf, method actorOf, method actorOf, method homeAddress, lazy value remote, lazy value remote, method typedActorFor, method typedActorFor, method typedActorsFor, method typedActorsFor, method typedActorFor, method typedActorsFor, method filterTypedActors, method findTypedActor, method foreachTypedActor, method typedActors, method actorFor, method actorsFor, method actorsFor, method actorFor, method actorsFor, method filter, method actorsFor, method find, method foreach, method size, method actors, value guard, value guard, value actorsById, value actorsById, value actorsByUUID, value actorsByUUID, method remoteBootstrap, constructor ActorRegistry, method foreachListener, method notifyListeners, method hasListener, method hasListeners, method removeListener, method addListener, method manageLifeCycleOfListeners, value listeners, method $init$, value log, method $asInstanceOf, method $isInstanceOf, method synchronized, method ne, method eq, method !=, method ==, method ##, method finalize, method wait, method wait, method wait, method notifyAll, method notify, method toString, method clone, method equals, method hashCode, method getClass, method asInstanceOf, method isInstanceOf, method !=, method ==)
    at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.innerSymbol$1(ClassfileParser.scala:1222)
    at scala.tools.nsc.symtab.classfile.ClassfileParser$innerClasses$.classSymbol(ClassfileParser.scala:1234)
    at scala.tools.nsc.symtab.classfile.ClassfileParser.classNameToSymbol(ClassfileParser.scala:478)
    at scala.tools.nsc.symtab.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:757)
    at scala.tools.nsc.symtab.classfile.ClassfileParser.sig2type$1(ClassfileParser.scala:789)
    at scala.tools.nsc.symtab.classfile.ClassfileParser.scala$tools$nsc$symtab$classfile$ClassfileParser$$sigToType(ClassfileParser.scala:835)
    at scala.tools.nsc.symtab.classfile.ClassfileParser$ConstantPool.getType(ClassfileParser.scala:328)
    at scala.tools.nsc.symtab.classfile.ClassfileParser.parseMethod(ClassfileParser.scala:632)
    at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$1$$anonfun$apply$mcV$sp$2.apply$mcVI$sp(ClassfileParser.scala:561)
    at scala.collection.immutable.Range$ByOne$class.foreach$mVc$sp(Range.scala:282)
    at scala.collection.immutable.Range$$anon$2.foreach$mVc$sp(Range.scala:265)
    at scala.tools.nsc.symtab.classfile.ClassfileParser$$anonfun$1.apply$mcV$sp(ClassfileParser.scala:561)
    at scala.tools.nsc.symtab.classfile.ClassfileParser.parseClass(ClassfileParser.scala:578)
    at scala.tools.nsc.symtab.classfile.ClassfileParser.parse(ClassfileParser.scala:98)
    at scala.tools.nsc.symtab.SymbolLoaders$ClassfileLoader.doComplete(SymbolLoaders.scala:247)
    at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:61)
    at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.load(SymbolLoaders.scala:80)
    at scala.tools.nsc.symtab.Symbols$Symbol.typeParams(Symbols.scala:930)
    at scala.tools.nsc.symtab.Types$class.scala$tools$nsc$symtab$Types$$isRawIfWithoutArgs(Types.scala:3155)
    at scala.tools.nsc.symtab.Types$rawToExistential$.gd28$1(Types.scala:3176)
    at scala.tools.nsc.symtab.Types$rawToExistential$.apply(Types.scala:3175)
    at scala.tools.nsc.symtab.Types$rawToExistential$.apply(Types.scala:3174)
    at scala.tools.nsc.symtab.Types$TypeMap.mapOver(Types.scala:2945)
    at scala.tools.nsc.symtab.Types$rawToExistential$.apply(Types.scala:3180)
    at scala.tools.nsc.symtab.Symbols$TermSymbol.cook$1(Symbols.scala:1721)
    at scala.tools.nsc.symtab.Symbols$TermSymbol.doCookJavaRawInfo(Symbols.scala:1729)
    at scala.tools.nsc.symtab.Symbols$Symbol.cookJavaRawInfo(Symbols.scala:875)
    at scala.tools.nsc.typechecker.Infer$Inferencer.checkAccessible(Infer.scala:270)
    at scala.tools.nsc.typechecker.Typers$Typer.makeAccessible(Typers.scala:610)
    at scala.tools.nsc.typechecker.Typers$Typer.typedSelect$1(Typers.scala:3607)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:4110)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4203)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4265)
    at scala.tools.nsc.typechecker.Typers$Typer.computeType(Typers.scala:4341)
    at scala.tools.nsc.typechecker.Namers$Namer.typeSig(Namers.scala:1145)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$typeCompleter$1.apply(Namers.scala:523)
    at scala.tools.nsc.typechecker.Namers$Namer$$anonfun$typeCompleter$1.apply(Namers.scala:521)
    at scala.tools.nsc.typechecker.Namers$$anon$1.complete(Namers.scala:1309)
    at scala.tools.nsc.typechecker.Namers$$anon$1.complete(Namers.scala:1307)
    at scala.tools.nsc.symtab.Symbols$Symbol.info(Symbols.scala:735)
    at scala.tools.nsc.symtab.Symbols$Symbol.initialize(Symbols.scala:848)
    at scala.tools.nsc.symtab.Symbols$Symbol.annotations(Symbols.scala:111)
    at scala.tools.nsc.typechecker.Typers$Typer.addGetterSetter(Typers.scala:1370)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$10.apply(Typers.scala:1547)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$10.apply(Typers.scala:1547)
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:227)
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:227)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:61)
    at scala.collection.immutable.List.foreach(List.scala:45)
    at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:227)
    at scala.collection.immutable.List.flatMap(List.scala:45)
    at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1547)
    at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1348)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3856)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4203)
    at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2128)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$20.apply(Typers.scala:2196)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$20.apply(Typers.scala:2196)
    at scala.collection.immutable.List.loop$1(List.scala:115)
    at scala.collection.immutable.List.mapConserve(List.scala:132)
    at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2196)
    at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1549)
    at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1348)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3856)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4203)
    at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2128)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$20.apply(Typers.scala:2196)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$20.apply(Typers.scala:2196)
    at scala.collection.immutable.List.loop$1(List.scala:115)
    at scala.collection.immutable.List.mapConserve(List.scala:132)
    at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2196)
    at scala.tools.nsc.typechecker.Typers$Typer.typedTemplate(Typers.scala:1549)
    at scala.tools.nsc.typechecker.Typers$Typer.typedModuleDef(Typers.scala:1348)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3856)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4203)
    at scala.tools.nsc.typechecker.Typers$Typer.typedStat$1(Typers.scala:2128)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$20.apply(Typers.scala:2196)
    at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$20.apply(Typers.scala:2196)
    at scala.collection.immutable.List.loop$1(List.scala:115)
    at scala.collection.immutable.List.mapConserve(List.scala:132)
    at scala.tools.nsc.typechecker.Typers$Typer.typedStats(Typers.scala:2196)
    at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:3849)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4203)
    at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:4252)
    at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.apply(Analyzer.scala:85)
    at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply(Global.scala:282)
    at scala.tools.nsc.Global$GlobalPhase$$anonfun$applyPhase$1.apply(Global.scala:282)
    at scala.tools.nsc.reporters.Reporter.withSource(Reporter.scala:48)
    at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:282)
    at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:80)
    at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3$$anonfun$run$1.apply(Analyzer.scala:80)
    at scala.collection.Iterator$class.foreach(Iterator.scala:631)
    at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:304)
    at scala.tools.nsc.typechecker.Analyzer$typerFactory$$anon$3.run(Analyzer.scala:80)
    at scala.tools.nsc.Global$Run.compileSources(Global.scala:741)
    at scala.tools.nsc.Interpreter.compileAndSaveRun(Interpreter.scala:518)
    at scala.tools.nsc.Interpreter$Request.objRun(Interpreter.scala:892)
    at scala.tools.nsc.Interpreter$Request.compile(Interpreter.scala:915)
    at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:598)
    at scala.tools.nsc.Interpreter.interpret(Interpreter.scala:577)
    at scala.tools.nsc.InterpreterLoop.reallyInterpret$1(InterpreterLoop.scala:472)
    at scala.tools.nsc.InterpreterLoop.interpretStartingWith(InterpreterLoop.scala:515)
    at scala.tools.nsc.InterpreterLoop.command(InterpreterLoop.scala:362)
    at scala.tools.nsc.InterpreterLoop.processLine$1(InterpreterLoop.scala:243)
    at scala.tools.nsc.InterpreterLoop.repl(InterpreterLoop.scala:249)
    at scala.tools.nsc.InterpreterLoop.main(InterpreterLoop.scala:559)
    at xsbt.ConsoleInterface.run(ConsoleInterface.scala:26)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at xsbt.AnalyzingCompiler.call(AnalyzingCompiler.scala:40)
    at xsbt.AnalyzingCompiler.console(AnalyzingCompiler.scala:32)
    at sbt.Console.console0$1(Compile.scala:142)
    at sbt.Console$$anonfun$apply$4$$anonfun$apply$5.apply(Compile.scala:143)
    at sbt.Console$$anonfun$apply$4$$anonfun$apply$5.apply(Compile.scala:143)
    at sbt.TrapExit$.executeMain$1(TrapExit.scala:33)
    at sbt.TrapExit$$anon$1.run(TrapExit.scala:42)
[info] == akka / console ==


--
Viktor Klang,
Code Connoisseur
Work:   Scalable Solutions
Code:   github.com/viktorklang
Follow: twitter.com/viktorklang
Read:   klangism.tumblr.com

Loading...