I've been binding the stub instead of the object itself, which may have been causing the sketch runner to exit early.
MODIFY
runtime/src/jycessing/mode/run/RMIUtils.java
runtime/src/jycessing/mode/run/RMIUtils.java
@@ -83,13 +83,13 @@ public class RMIUtils {
throws RMIProblem {
final String registryKey = remoteInterface.getSimpleName();
try {
- final Remote stub = export(remote);
+ export(remote);
log(
"Attempting to bind instance of "
+ remote.getClass().getName()
+ " to registry as "
+ registryKey);
- registry().bind(registryKey, stub);
+ registry().bind(registryKey, remote);
log("Bound.");
Runtime.getRuntime()
.addShutdownHook(

MODIFY
runtime/src/jycessing/mode/run/SketchRunner.java
runtime/src/jycessing/mode/run/SketchRunner.java
@@ -160,8 +160,10 @@ public class SketchRunner implements SketchService {
// If env var SKETCH_RUNNER_FIRST=true then SketchRunner will wait for a ping from the Mode
// before registering itself as the sketch runner.
if (PythonMode.SKETCH_RUNNER_FIRST) {
+ log("Waiting for mode with id " + id);
waitForMode(id);
} else {
+ log("Starting sketch runner immediately with id " + id);
startSketchRunner(id);
}
}

I've been binding the stub instead of the object itself, which may have been causing the sketch runner to exit early.