Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Calling scalafx.scene.Node.localToParentTransform / localToSceneTransform results in StackOverflow exception #205
The problem stems from their definition, e.g.
But the javafx.scene.Node delegate doesn't have the method localToSceneTransform(). It has getLocalToSceneTransform(). Since this is the case, what scala compiler does instead is applying the implicit conversion of jfxs.Node into scalafx.scene.Node... Yes! Right back into the same Node class we're starting from!... And calls its localToSceneTransform, i.e. the very same function we're in already.
Solution: change definitions to
I'd also advise to investigate whether implicit conversions produced similar recursion bugs in other places.
added a commit
Sep 9, 2015
I create for IDEA Live-Plugin to detect recursive methods:
I will try to find other instances of infinite recursion, before closing this issue.