Java: Running Sikuli scripts using ScriptRunner.runPython causes JVM to exit upon completion

Bug #719245 reported by Stephen Christian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
In Progress
Wishlist
RaiMan

Bug Description

Having gathered all of my individual, Sikuli-GUI-made unit tests into a single test suite and trying to run them sequentially I was hit by the incredible show-stopper bug of having the JVM shut down as soon as the first script finished. (Using X 1.0 rc2 "Maltese" on 64-bit Windows 7, but running 32-bit Java 1.6.0_23-b05)

The following code will never WOOGAH CHAKA:

final ScriptRunner sr = ScriptRunner.getInstance(new String[0]);
sr.runPython("testing/sikuli/InitialGuiLookTest.sikuli", new File("testing/sikuli/InitialGuiLookTest.sikuli/InitialGuiLookTest.py"));
System.out.println("WOOOGAH CHAKA");

Tags: scriptrun
Revision history for this message
RaiMan (raimund-hocke) wrote :

by design, when running a Sikuli script standalone (from Java or in the command line), the JVM, it is running in is exited.

I guess you have to put the "gathering" of your single scripts to the python level and use import or execfile for each of your test, so that on the Java level it is one Sikuli script.

Or you might try to call each scripts using a system command "java -jar sikuli-script.jar path to your script", hoping that gets it's own JVM.

summary: - ScriptRunner.runPython causes JVM to exit upon completion
+ Java: Running Sikuli scripts using ScriptRunner.runPython causes JVM to
+ exit upon completion
Revision history for this message
Stephen Christian (getefix) wrote :

I am extremely interested in what prompted this design decision, as it appears to limit the utility of the script-runner considerably.

Revision history for this message
RaiMan (raimund-hocke) wrote :

I guess, the focus for the Python level, was not to run it from within Java, since the Sikuli features are available from within Java on the Java level (this is what most Java people use).

But we should wait for a comment of the developers ;-)

RaiMan (raimund-hocke)
Changed in sikuli:
status: New → Confirmed
importance: Undecided → Wishlist
RaiMan (raimund-hocke)
Changed in sikuli:
status: Confirmed → Fix Committed
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → x1.0
tags: added: scriptrun
RaiMan (raimund-hocke)
Changed in sikuli:
status: Fix Committed → In Progress
milestone: x1.0 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.