[1.0.1] - Java exception when terminating script using sys.exit() --- fixed in 1.1.0

Bug #1214291 reported by RaiMan on 2013-08-20
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

--- fixed in 1.1.0

usage is not recommended - use Debug.user() and exit() instead.

... but on usage a crash is triggered saying:
[error] script [ Unbenannt ] stopped with error in line xxx
[error] SystemExit ( message )



I have a loop which attempted to detect an image for defined number of times.
If the image is not detected after all the attempts - it will exit:

sys.exit("%s test step FAILED!" %(testName))

This approach was working fine in 1.0.0 (example below) however after I have started using 1.0.1, I started experiencing the following java exception:

Exception in thread "MainThread" java.lang.IllegalStateException: No match found

        at java.util.regex.Matcher.group(Unknown Source)
        at org.sikuli.scriptrunner.JythonScriptRunner.findErrorSourceWalkTrace(JythonScriptRunner.java:309)
        at org.sikuli.scriptrunner.JythonScriptRunner.findErrorSource(JythonScriptRunner.java:273)
        at org.sikuli.scriptrunner.JythonScriptRunner.runPython(JythonScriptRunner.java:183)
        at org.sikuli.scriptrunner.JythonScriptRunner.runScript(JythonScriptRunner.java:147)
        at org.sikuli.basics.SikuliScript.main(SikuliScript.java:179)

The overall logic still works but I guess I'm doing something wrong if it results with an exception?

In 1.0.0 version, if I was terminating a script with "sys.exit()", I was getting the following error instead:

[error] Script aborted with some error:

Which looks much more harmless.


RaiMan (raimund-hocke) on 2013-08-20
Changed in sikuli:
status: New → In Progress
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0
RaiMan (raimund-hocke) on 2014-01-12
Changed in sikuli:
status: In Progress → Fix Committed
RaiMan (raimund-hocke) on 2015-09-17
Changed in sikuli:
importance: High → Critical
summary: - [1.0.1] - Java exception when terminating script using sys.exit()
+ [1.0.1] - Java exception when terminating script using sys.exit() ---
+ fixed in 1.1.0
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers