scala-ide / scala-worksheet

A Scala IDE plugin for a multi-line REPL (called worksheet)
96 stars 24 forks source link

Wortksheet stops evaluating output #129

Closed dotta closed 10 years ago

dotta commented 11 years ago

Not sure how I ended up in this corrupted state, but the worksheet isn't evaluating anymore because. Looks like the ProgramExecutor got lost.

2013-05-01 09:36:17,713  INFO [ForkJoinPool-1-worker-9] - WorksheetRunner - forwarding StopRun(ScriptCompilationUnit(L/testApp/asd.sc)) to ProgramExecutor actor <null>
2013-05-01 09:36:17,713  INFO [ForkJoinPool-1-worker-10] - ProgramExecutor - Ignoring StopRun(ScriptCompilationUnit(L/testApp/asd.sc)): we're executing: null
2013-05-01 09:36:33,653  INFO [ForkJoinPool-1-worker-9] - WorksheetRunner - forwarding StopRun(ScriptCompilationUnit(L/testApp/asd.sc)) to ProgramExecutor actor <null>
2013-05-01 09:36:33,653  INFO [ForkJoinPool-1-worker-12] - ProgramExecutor - Ignoring StopRun(ScriptCompilationUnit(L/testApp/asd.sc)): we're executing: null

Only workaround is closing/re-opening Eclipse. I think this may actually the issue @heathermiller mentioned some of the Coursera students have experienced.

dotta commented 11 years ago

It looks like that one way this can happen is if you have binary incompatible binaries in the classpath (for instance, the above issue was happening to me because I was using the worksheet-runtime library compiled with Scala 2.9 on the Scala IDE for 2.10). Hence, the cause is that the additional VM we spawn for evaluating the instrumented source may fail to initialize, and hence bring the ProgramExecutor actor to ignore any additional requests. We need to be more robust against initialization failure and report the issue to the user.

q42jaap commented 11 years ago

I was also doing the coursera course and experienced that a new worksheet doesn't do anything when you save it, however I didn't see anything in the scala ide log window.

anderseriksson commented 11 years ago

I also repeatedly run into this no-evaluation-problem but IDE restart helps. ( Build id: 3.0.0-vfinal-20130320-1624-Typesafe )

dragos commented 10 years ago

Looks like there's some bad failure handling. The WorksheetsManager is stopped because it got a message it doesn't understand. Here's the exitReason:

UncaughtException(WorksheetManager <actor>,Some(StopRun(ScriptCompilationUnit(L/debugtest/src/test/cps.sc))),Some(scala.actors.ActorProxy@4e0de36e),java.util.NoSuchElementException: None.get)