SBT Builder crashed while compiling / StackOverFlowError
See attached files
java.lang.StackOverflowError
at scala.tools.nsc.typechecker.PatternMatching$Logic$And.equals(PatternMatching.scala:1901)
at scala.tools.nsc.typechecker.PatternMatching$Logic$And.equals(PatternMatching.scala:1901)
at scala.tools.nsc.typechecker.PatternMatching$Logic$And.equals(PatternMatching.scala:1901)
etc...
java.lang.StackOverflowError
at scala.tools.nsc.typechecker.PatternMatching$Logic$And.equals(PatternMatching.scala:1901)
at scala.tools.nsc.typechecker.PatternMatching$Logic$And.equals(PatternMatching.scala:1901)
at scala.tools.nsc.typechecker.PatternMatching$Logic$And.equals(PatternMatching.scala:1901)
etc...
Leave a comment
file:a61vKMyXOr4PFlacwqjQYw
event details from error log
event details from error log
This is a bug in the Scala 2.10.0 compiler, and a ticket for it already exists in the Scala issue tracker: https://issues.scala-lang.org/browse/SI-6726
I'm closing the ticket as invalid. Please, follow the upstream ticket for updates.
I'm closing the ticket as invalid. Please, follow the upstream ticket for updates.
Sorry - wasn't aware that the bug itself is in another project
However: I really am not sure, if the bug handling within the IDE is optimal.
There are currently 2 dialogs: one showing the error, the other suggesting to leave the IDE.
In my opinion the user shouldn't be bothered that much by the IDE when the compiler crashed (well, at least it still runs afterwards).
The other strange thing is, when I save the file again after typing space-backspace (so no real change involved) the compile succeeds - is that really not an issue of the IDE?
However: I really am not sure, if the bug handling within the IDE is optimal.
There are currently 2 dialogs: one showing the error, the other suggesting to leave the IDE.
In my opinion the user shouldn't be bothered that much by the IDE when the compiler crashed (well, at least it still runs afterwards).
The other strange thing is, when I save the file again after typing space-backspace (so no real change involved) the compile succeeds - is that really not an issue of the IDE?
on 2013-01-21 01:55 *
By Mirco Dotta
> Sorry - wasn't aware that the bug itself is in another project
No worries.
> There are currently 2 dialogs: one showing the error, the other suggesting to leave the IDE.
Oh, that I believe is unexpected. Usually, you should have an entry in the Error Log view saying that the Scala compiler has crashed and you should open a ticket for it (in the Scala issues tracker). But my memory may be failing me, could you upload an image for the two dialogs. At any rate, leaving the Scal IDE should never be an option ;-)
> The other strange thing is, when I save the file again after typing space-backspace (so no real change involved) the compile succeeds - is that really not an issue of the IDE?
I'm 99.9% positive that this is not a bug in the Scala IDE. The Scala IDE uses Sbt (0.13) as build compiler, so compilation is entirely handled by components outside of the IDE. Sbt delegates to the actual Scala compiler the task of producing binaries, and the stacktrace you linked makes it pretty clear that the crash happened in a binary that comes from the Scala compiler, hence the bug ought to be there.
> The other strange thing is, when I save the file again after typing space-backspace (so no real change involved) the compile succeeds - is that really not an issue of the IDE?
One possible explanation of why after typing some empty space the error goes away is that Sbt caches the compiler instance (for performance reasons), so there may be some side-effect going on that can end up triggering or hiding the reported behavior. But here I'm really speculating, chances are that I'm plain wrong.
By the way, did you check if the reason for the crash is the same as the one described in https://issues.scala-lang.org/browse/SI-6726? I think it would be valuable to isolate the problem and follow-up directly with the Scala folks.
No worries.
> There are currently 2 dialogs: one showing the error, the other suggesting to leave the IDE.
Oh, that I believe is unexpected. Usually, you should have an entry in the Error Log view saying that the Scala compiler has crashed and you should open a ticket for it (in the Scala issues tracker). But my memory may be failing me, could you upload an image for the two dialogs. At any rate, leaving the Scal IDE should never be an option ;-)
> The other strange thing is, when I save the file again after typing space-backspace (so no real change involved) the compile succeeds - is that really not an issue of the IDE?
I'm 99.9% positive that this is not a bug in the Scala IDE. The Scala IDE uses Sbt (0.13) as build compiler, so compilation is entirely handled by components outside of the IDE. Sbt delegates to the actual Scala compiler the task of producing binaries, and the stacktrace you linked makes it pretty clear that the crash happened in a binary that comes from the Scala compiler, hence the bug ought to be there.
> The other strange thing is, when I save the file again after typing space-backspace (so no real change involved) the compile succeeds - is that really not an issue of the IDE?
One possible explanation of why after typing some empty space the error goes away is that Sbt caches the compiler instance (for performance reasons), so there may be some side-effect going on that can end up triggering or hiding the reported behavior. But here I'm really speculating, chances are that I'm plain wrong.
By the way, did you check if the reason for the crash is the same as the one described in https://issues.scala-lang.org/browse/SI-6726? I think it would be valuable to isolate the problem and follow-up directly with the Scala folks.
I just checked the SI-6726 ticket - wasn't aware of that before - and it looks the same, yes!
I even tried the example code attached to that ticket and I got the compiler error and the two dialogs immediately.
I wasn't sure if I had accidentally hit a spot or if it's more a general problem.
So this is actually a duplicate of that ticket (but in the context of Scala/SBT, not the IDE - although the 2 dialogs are mentioned there as well).
I even tried the example code attached to that ticket and I got the compiler error and the two dialogs immediately.
I wasn't sure if I had accidentally hit a spot or if it's more a general problem.
So this is actually a duplicate of that ticket (but in the context of Scala/SBT, not the IDE - although the 2 dialogs are mentioned there as well).
P.S. - and the suggested workaround using -Xno-patmat-analysis as compiler option works! That's helpful!
(So I guees, I don't need that option - I normally add the _ => -case in may matching expressions anyway - unreachability check would have been nice, but the matches are generally not that big...)
Great! Thanks!
(So I guees, I don't need that option - I normally add the _ => -case in may matching expressions anyway - unreachability check would have been nice, but the matches are generally not that big...)
Great! Thanks!
on 2013-01-22 04:00 *
By Mirco Dotta
Great. I've create a new ticket for improving failure handling during building: http://scala-ide-portfolio.assembla.com/spaces/scala-ide/tickets/1001459