-
Notifications
You must be signed in to change notification settings - Fork 21
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
Stackoverflow in typechecker.Typers$Typer in scala 2.12.3/2.12.4 #10604
Comments
It may, perhaps, not sure anymore at anything, that the problem might be link with the use of the "-verbose" option. Removing that flag seems to make it disapear (but as I don't have a clean way to trigger it in the first place, I'm not sure of anything). |
Yeah we're seeing |
Upgrading from 2.12.3 to 2.12.4 introduced a StackOverflowError in inductive shapeless derivation in the scalafix repo scalacenter/scalafix#477 (comment) Increasing -Xss8m fixed the problem. This regression took a while to track down since the SO was caught by the compiler during implicit expansion and only reported under |
I took the liberty to open another issues about the fact that the SO was getting swallowed and not reported without -Xlog-implicits #10649 |
It may be related to #10552 |
I've a variant of that one on IntelliJ (I believe I also got it from time to time on scala IDE) with a NPE:
|
Is this issue being actively worked on by anyone? We suddenly started getting the same problem on my project at work. We bumped the stack size which has fixed the issue but, that seems more like a band-aid rather than an actual fix. We are seeing this issue when compiling with Maven on the command line instead of just the IDE. |
Same here with 2.12.4 |
bump |
fwiw, Im having this issue w/ shapeless / slickless in Scala 2.11.11 |
some of y'all know this already, but maybe not everyone does: it's considered normal in Scala that you may have to increase JVM stack size in order to compile some kinds of especially involved or nested Scala code. does anyone know a way to reproduce the problem they're having on Scala 2.12.5 (yes, I mean 2.12.5 specifically, now that it's out), with a minimal example and without needing access to your project's entire source tree? without that, it's really hard to know whether this ticket even identifies a specific issue, or whether it's just a miscellaneous collection of people reporting a miscellaneous collection of (I'm not criticizing anyone who's reported or commented here, but in order to actually do anything about this, we need to converge on something more specific and actionable.) note that 2.12.5 fixes #10552, so trying again in 2.12.5 may produce different error logs that may continue additional clues that we didn't have before. |
I had the same issue and I can confirm that increasing of the stack size from default one (1MB to 5MB) helped. |
closing since there isn't currently anything actionable here, unless new information comes to light. |
Hello, We had the same kind of problem today at work.
I have reproduced the bug in a minimal reproducible way. It might be the same stuff as the 22 fields case class limit earlier. |
@mycaule unrelated to the 22 limit. it's:
|
I'm getting this same error with
Java 11 issue?
I also have the same issue in scala
Full log: https://gist.github.com/er1c/4650e34b02c92a1a4c00bdaf1889f598 It works successfully on |
@er1c You should increase the stack size with the |
@Jasper-M yeah I was basically playing with multiple options if you see above, sbt is running with 16GB, are you simply talking about |
Ahh, I missed/overlooked the
Does work fine with |
👍 also note that the scala compiler runs in the same JVM as sbt, so you need to start sbt with enough |
@lrytz the
|
Hello, I have the same problem as you. I created a very large case class and encountered these errors while compiling. I solved the problem by increasing stack memory (-Xss2048m), but I don't understand the cause, do you know the cause? |
@Mr-HHP it's the "-Xss5m" that will do the trick |
This solves the problem, but I'm not sure why. What does "Scala" do with compiling "case Class" |
@Mr-HHP I don't know in particular, but I was just looking at how it typechecks a function application, and a case class's synthetic
Each Edit: see #12397 |
I'm observing a stackoverflow in typechecker with ScalaIDE 4.7.0 when using scalac 2.12.3 or 2.12.4, which is not present with scala 2.12.2. The stackoverflow does not happen when I'm compiling from the command line using maven.
I saw a lot of variation of the problem (
call site initialization exception
andjava.lang.UnsupportedOperationException: Position.point on NoPosition
) but these other problem seems to be consequences of the stackoverflow.Of course I tried to set a bigger Xss, but it does not change anything (even with 256m), and the fact that the maven compilation works or that it works on 2.12.2 with normal Xss tends to let me think that it is a genuine bug.
I don't have at all a minimal reproducer, and the stacktraces are not very telling, but the problem happen with an open source project: https://github.com/Normation/rudder/ (on branch master).
It may or not may be related to Daniel "infinite macro expansion in scala 2.12.3/2.12.4" #10584 or perhaps both have same root cause (rudder-core uses doobie and so macro expansion).
Nonetheless, here are the SOE and other exception I saw:
The text was updated successfully, but these errors were encountered: