You are here

Better exception messages.

I just got an email asking about an exception that often shows up in the console on the first time you trying running:

Could not load environment file file:/.../runs/12.10.07/2.24.43PM/environment.xml

java.lang.RuntimeException: Could not start RemoteInterface
at org.jactr.tools.async.controller.RemoteInterface.install(RemoteInterface.java:299)
at org.jactr.core.model.basic.BasicModel.install(BasicModel.java:504)
at org.jactr.io.environment.EnvironmentParser.instantiateAttachments(EnvironmentParser.java:278)
at org.jactr.io.environment.EnvironmentParser.process(EnvironmentParser.java:125)
at org.jactr.io.environment.EnvironmentParser.parse(EnvironmentParser.java:95)
at org.jactr.entry.Main.createRuntime(Main.java:200)
at org.jactr.launching.Application.runNormal(Application.java:136)

at org.jactr.launching.Application.start(Application.java:88)

.....

This is readily solved by opening the Preferences -> jACT-R -> Run/Debug and increasing Launcher wait time to something greater.

What's happening other than my use of localized exception messages that don't make much sense to the user? The application that controls the jACT-R runtime is built around OSGi. Eclipse's implementation does a lot of cashing of bundles (i.e. plugins) and configurations. This allows subsequent runs to launch much faster. The cost of this is that the first run typically takes much longer.

That's what's occurring. When the IDE launches the subsequent process that actually controls the runtime, it opens up a socket and waits for a connection to be established by the runtime (async.controller.RemoteInterface specifically). If that connection is established, the two can talk and the model is executed/debugged. If the connection doesn't occur in a timely fashion, it quits waiting and shutdown the socket (all silently). Since that first run takes longer than normal, the IDE can often timeout. The solution is to just increase the time to live for the IDE socket.

I guess I should throw a notice in the IDE when this happens, huh?