build-scala generates java.lang.StackOverflowError with Java 1.8
See original GitHub issueI get java.lang.StackOverflowError trying to build the Scala version of firrtl with Scala 2.11, sbt 0.13.9, and (Oracle) Java 1.8.0_74 on MacOSX 10.9.5, and Scala 2.11, sbt 0.13.9, and (Oracle) Java 1.8.0_45 on Ubuntu 14.04.2 LTS. This still occurs after deleting everything in ~/.ivy2 and ~/.m2
This doesn’t happen with Java 1.7.0_76 (on MacOSX) or 1.7.0_80 (on Ubuntu).
Here’s the bottom of the Ubuntu stack dump:
java.lang.StackOverflowError
at scala.tools.nsc.typechecker.Typers$Typer.checkDead(Typers.scala:111)
at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:4811)
at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5343)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5359)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5395)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5422)
at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5369)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5373)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$99.apply(Typers.scala:4524)
at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$99.apply(Typers.scala:4524)
at scala.tools.nsc.typechecker.Typers$Typer.silent(Typers.scala:680)
at scala.tools.nsc.typechecker.Typers$Typer.normalTypedApply$1(Typers.scala:4523)
at scala.tools.nsc.typechecker.Typers$Typer.typedApply$1(Typers.scala:4579)
at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5342)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5359)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5395)
at scala.tools.nsc.typechecker.Typers$Typer.scala$tools$nsc$typechecker$Typers$Typer$$typedInternal(Typers.scala:5422)
at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5369)
at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5373)
at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:5471)
at scala.tools.nsc.typechecker.Typers$Typer.typedQualifier(Typers.scala:5477)
at scala.tools.nsc.typechecker.Typers$Typer.typedSelectOrSuperCall$1(Typers.scala:4811)
at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5343)
at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5359)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5395)
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
build-scala generates java.lang.StackOverflowError with ...
I get java.lang.StackOverflowError trying to build the Scala version of firrtl with Scala 2.11, sbt 0.13.9, and (Oracle) Java 1.8.0_74 on ...
Read more >How to Fix java.lang.StackOverflowError in Java
The java. lang. StackOverflowError indicates that the application stack is exhausted and is usually caused by deep or infinite recursion.
Read more >What causes a java.lang.StackOverflowError
Check for any recusive calls for methods. Mainly it is caused when there is recursive call for a method. A simple example is...
Read more >Scala source code can't compile because of java.lang. ...
error when I try to build it with ant: ... [scalacfork] uncaught exception during compilation: java.lang.StackOverflowError [scalacfork] error: java.lang.
Read more >Diagnosing a java.lang.StackOverflowError
Symptom. A stack overflow can result from: A deeply nested application; An infinite loop within an application; A problem in just-in-time ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
-Xss256m does the trick.
Hi,
Have you tried increasing the JVM stack size (-Xss)? I know this shouldn’t be really necessary but -Xss256m -Xmx4096m solved the issue for me. (bumped to sbt 0.13.9, scala 2.11.7, running on Oracle JVM 1.8.0_74-b02)
Kamyar
On Tue, Feb 23, 2016 at 10:25 PM, Adam Izraelevitz <notifications@github.com