AndreVanDelft / scala

The SubScript extension to the Scala programming language
http://www.subscript-lang.org/
12 stars 1 forks source link

NullPointerException by GraphicalDebugger when handling Success and AAHappened messages of dynamically launched nodes #26

Closed anatoliykmetyuk closed 10 years ago

anatoliykmetyuk commented 10 years ago

Consider following program:

  def main(args: Array[String]) {
    val executor = ScriptExecutorFactory.createScriptExecutor(true)
    future {executor run _live()}
    executor.invokeFromET {executor.rootNode launch _doSomething()}
  }

  def script..
    live = (* doSomething *)

    doSomething = {println("Hello World!")}

Now, the dynamically launched process will be under node. When debugged with graphical debugger, it throws a NullPointerException when handling AAHappened and Success messages intended for root of dynamically launched subtree. Statically launched subtree behaves normally.

anatoliykmetyuk commented 10 years ago

Note that same problems are not observable when running without a debugger.

AndreVanDelft commented 10 years ago

Solved in TemplateChildNode (don't rely on parent!=null). Owner of launched nodes still needs to be set.