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

REPL Crashes on startup if you type too fast. #6299

Closed
scabug opened this issue Aug 30, 2012 · 3 comments
Closed

REPL Crashes on startup if you type too fast. #6299

scabug opened this issue Aug 30, 2012 · 3 comments
Assignees
Labels

Comments

@scabug
Copy link

@scabug scabug commented Aug 30, 2012

Welcome to Scala version 2.10.0-M7 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_33).
Type in expressions to have them evaluated.
Type :help for more information.

scala> Either

Failed to initialize the REPL due to an unexpected error.
This is a bug, please, report it along with the error diagnostics printed below.
java.lang.NullPointerException
	at scala.reflect.internal.SymbolTable.afterPhase(SymbolTable.scala:208)
	at scala.tools.nsc.Global.afterFlatten(Global.scala:1092)
	at scala.tools.nsc.transform.Flatten$$anon$1$$anonfun$1.apply(Flatten.scala:70)
	at scala.tools.nsc.transform.Flatten$$anon$1$$anonfun$1.apply(Flatten.scala:67)
	at scala.reflect.internal.Scopes$class.scopeTransform(Scopes.scala:383)
	at scala.reflect.internal.SymbolTable.scopeTransform(SymbolTable.scala:12)
	at scala.tools.nsc.transform.Flatten$$anon$1.apply(Flatten.scala:67)
	at scala.tools.nsc.transform.Flatten.transformInfo(Flatten.scala:100)
	at scala.tools.nsc.transform.InfoTransform$Phase$$anon$1.transform(InfoTransform.scala:38)
	at scala.reflect.internal.Symbols$Symbol.rawInfo(Symbols.scala:1247)
	at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1175)
	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:39)
	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:36)
	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:36)
	at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:57)
	at scala.reflect.internal.Mirrors$RootsBase.getClassByName(Mirrors.scala:95)
	at scala.reflect.internal.Mirrors$RootsBase.getRequiredClass(Mirrors.scala:98)
	at scala.tools.nsc.backend.jvm.GenASM$AsmPhase.<init>(GenASM.scala:56)
	at scala.tools.nsc.backend.jvm.GenASM.newPhase(GenASM.scala:33)
	at scala.tools.nsc.Global$Run$$anonfun$27.apply(Global.scala:1294)
	at scala.tools.nsc.Global$Run$$anonfun$27.apply(Global.scala:1294)
	at scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:110)
	at scala.collection.immutable.List.foldLeft(List.scala:78)
	at scala.tools.nsc.Global$Run.<init>(Global.scala:1294)
	at scala.tools.nsc.interpreter.IMain.compileSourcesKeepingRun(IMain.scala:424)
	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compileAndSaveRun(IMain.scala:799)
	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compile(IMain.scala:759)
	at scala.tools.nsc.interpreter.IMain.bind(IMain.scala:616)
	at scala.tools.nsc.interpreter.IMain.bind(IMain.scala:659)
	at scala.tools.nsc.interpreter.IMain$$anonfun$quietBind$1.apply(IMain.scala:658)
	at scala.tools.nsc.interpreter.IMain$$anonfun$quietBind$1.apply(IMain.scala:658)
	at scala.tools.nsc.interpreter.IMain.beQuietDuring(IMain.scala:232)
	at scala.tools.nsc.interpreter.IMain.quietBind(IMain.scala:658)
	at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1$$anonfun$apply$mcZ$sp$2.apply$mcV$sp(ILoop.scala:838)
	at scala.tools.nsc.interpreter.ILoopInit$class.runThunks(ILoopInit.scala:122)
	at scala.tools.nsc.interpreter.ILoop.runThunks(ILoop.scala:42)
	at scala.tools.nsc.interpreter.ILoopInit$class.postInitialization(ILoopInit.scala:95)
	at scala.tools.nsc.interpreter.ILoop.postInitialization(ILoop.scala:42)
	at scala.tools.nsc.interpreter.ILoopInit$$anonfun$createAsyncListener$1.apply$mcV$sp(ILoopInit.scala:63)
	at scala.tools.nsc.interpreter.ILoopInit$$anonfun$createAsyncListener$1.apply(ILoopInit.scala:60)
	at scala.tools.nsc.interpreter.ILoopInit$$anonfun$createAsyncListener$1.apply(ILoopInit.scala:60)
	at scala.tools.nsc.io.package$$anon$3.call(package.scala:23)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)
@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Aug 30, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6299?orig=1
Reporter: @jsuereth
Affected Versions: 2.10.0
Duplicates #7418

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Nov 4, 2012

Juha Heljoranta (p52mm3x) said:
One reasonably easy way to reproduce this is to type: something
If I wait few seconds before typing it doesn't happen.
Also, it cannot be reproduced if some (simple) expression is evaluated first, like integer 1.

I've seen few times the stack trace mentioned in this bug and those mentioned in #6510.
In addition there where plenty of new assertion errors and exceptions thrown.

Some of the new errors I saw:

unrecoverable error
        at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:48)
        at scala.tools.nsc.Global.abort(Global.scala:253)
        at scala.tools.nsc.interpreter.IMain$$anon$1.scala$tools$nsc$interpreter$ReplGlobal$$super$abort(IMain.scala:265)
posterasure
        at scala.Predef$.assert(Predef.scala:179)
        at scala.tools.nsc.Global.assert(Global.scala:238)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer.bridgeDefs(Erasure.scala:971)
This is a bug, please, report it along with the error diagnostics printed below.
java.lang.AssertionError: assertion failed: TypeHistory(namer:2,()List[Imports.this.global.TypeName],TypeHistory(patmat:2,=> List[Imports.this.global.TypeName],null))
        at scala.Predef$.assert(Predef.scala:179)
        at scala.reflect.internal.Symbols$TypeHistory.<init>(Symbols.scala:3280)
This is a bug, please, report it along with the error diagnostics printed below.
java.lang.AssertionError: assertion failed: TypeHistory(namer:2,Object
        with scala.tools.nsc.interpreter.Imports {
  private[this] val initialSettings: scala.tools.nsc.Settings
... 
  def typeOfExpression$default$2: Boolean @scala.annotation.unchecked.uncheckedVariance
},null))
        at scala.Predef$.assert(Predef.scala:179)
        at scala.reflect.internal.Symbols$TypeHistory.<init>(Symbols.scala:3280)
        at scala.reflect.internal.Symbols$Symbol.rawInfo(Symbols.scala:1301)

I was testing with 2.10.0-RC1.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Jun 5, 2013

@retronym said:
Closing as a duplicate of #7418.

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.