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

Traversers doesn't handle the case of scala.scalajs.ir.Trees$Debugger #1402

Closed
neocxi opened this issue Dec 19, 2014 · 1 comment
Closed
Assignees
Labels
bug Confirmed bug. Needs to be fixed.
Milestone

Comments

@neocxi
Copy link

neocxi commented Dec 19, 2014

scala.js is an awesome project! I tip my hat to the team. I encountered possibly an optimizer bug when I was trying out scala.js:

The issue seems to be that Traversers doesn't handle the case of scala.scalajs.ir.Trees$Debugger
https://github.com/scala-js/scala-js/blob/master/ir/src/main/scala/org/scalajs/core/ir/Traversers.scala#L193

Way to reproduce:
sbt run this repo https://github.com/neocxi/scalajs-angular-todomvc

Stacktrace:

Caused by: scala.scalajs.tools.optimizer.OptimizerCore$OptimizeException: The Scala.js optimizer crashed while optimizing Ltodomvc_example_TodoCtrl$.add__V
Methods attempted to inline:
* Ltodomvc_example_TodoCtrl$.scope__Lcom_greencatsoft_angularjs_core_Scope
* Ltodomvc_example_Task$.apply$default$2__Z
* Ltodomvc_example_Task$.apply$default$3__J
* sjsr_RuntimeLong$.apply__I__I__I__sjsr_RuntimeLong

    at scala.scalajs.tools.optimizer.OptimizerCore.optimize(OptimizerCore.scala:99) ~[na:na]
    at scala.scalajs.tools.optimizer.GenIncOptimizer$MethodImpl.process(GenIncOptimizer.scala:797) ~[na:na]
    at scala.scalajs.tools.optimizer.ParIncOptimizer$$anonfun$processAllTaggedMethods$2.apply(ParIncOptimizer.scala:82) ~[na:na]
    at scala.scalajs.tools.optimizer.ParIncOptimizer$$anonfun$processAllTaggedMethods$2.apply(ParIncOptimizer.scala:81) ~[na:na]
    at scala.collection.parallel.mutable.ParArray$ParArrayIterator.foreach_quick(ParArray.scala:145) ~[scala-library-2.11.2.jar:na]
Caused by: java.lang.RuntimeException: Invalid tree in traverse() of class class scala.scalajs.ir.Trees$Debugger
    at scala.sys.package$.error(package.scala:27) ~[scala-library-2.11.2.jar:na]
    at scala.scalajs.ir.Traversers$Traverser.traverse(Traversers.scala:206) ~[na:na]
    at scala.scalajs.tools.optimizer.OptimizerCore$RecreateInfoTraverser.traverse(OptimizerCore.scala:2734) ~[na:na]
    at scala.scalajs.ir.Traversers$Traverser$$anonfun$traverse$1.apply(Traversers.scala:26) ~[na:na]
    at scala.scalajs.ir.Traversers$Traverser$$anonfun$traverse$1.apply(Traversers.scala:26) ~[na:na]
@sjrd
Copy link
Member

sjrd commented Dec 19, 2014

Indeed, looks like we overlooked that one.

@sjrd sjrd added the bug Confirmed bug. Needs to be fixed. label Dec 19, 2014
@sjrd sjrd added this to the v0.6.0-M3 milestone Dec 19, 2014
@sjrd sjrd self-assigned this Dec 19, 2014
sjrd added a commit to sjrd/scala-js that referenced this issue Dec 19, 2014
@gzm0 gzm0 closed this as completed in 6742428 Dec 20, 2014
sjrd added a commit that referenced this issue Dec 20, 2014
Fix #1402: Handle Debugger in Transformers and Traversers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug. Needs to be fixed.
Projects
None yet
Development

No branches or pull requests

2 participants