Problem Running RoboRunner
The highlighted comment was created in this revision.
I'm finally at the point where I am trying to actually launch RoboRunner. Currently running into an error I will have to debug. Posting part of the stack trace here in case anyone wants to comment.
Copying missing bots... 0 JAR copies done! Initializing engine: robocodes\z1... Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at robowiki.runner.BattleRunner.initEngine(BattleRunner.java:66) at robowiki.runner.BattleRunner.<init>(BattleRunner.java:42) at robowiki.runner.RoboRunner.<init>(RoboRunner.java:172) at org.xandercat.roborunner.runner.RoboRunnerService.startRunner(RoboRunnerService.java:44) at org.xandercat.roborunner.runner.action.LaunchRoboRunnerAction.actionPerformed(LaunchRoboRunnerAction.java:46) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
And the chunk of relevant code from RoboRunner:
System.out.print("Initializing engine: " + enginePath + "... "); ProcessBuilder builder = new ProcessBuilder(command); builder.redirectErrorStream(true); Process battleProcess = builder.start(); BufferedReader reader = new BufferedReader( new InputStreamReader(battleProcess.getInputStream())); String processOutput; do { processOutput = reader.readLine(); } while (!processOutput.equals(BattleProcess.READY_SIGNAL)); System.out.println("done!"); _processQueue.add(battleProcess);
Presumably, the input stream never provided the BattleProcess.READY_SIGNAL. I'll have to do some digging to figure out why. I'm not entirely clear on what the RoboRunner requirements are, but at the moment I am running it under Java 6 with Robocode 1.7.3.0.
I'll take a deeper look later when I'm home. At a glance, it seems like processOutput is coming up null - maybe the condition should be "processOutput != null && ...". What command are you using to launch this?
Looks like the problem was I didn't have one of the needed Robocode jars in the classpath. Thanks for including source in the RoboRunner jar; that made debugging easier.