sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #23078
[Bug 1267694] Re: [1.0.1] IDE: Abort/Stop function using stop hotkey might leave IDE in an inconsistent state --- workaround
Until there might be another (better) method to run the scripts from inside the IDE, you have to take this into account.
There is no general solution for that.
Background:
When running a script in the IDE, the existing instance of the internally used Jython interpreter is asked to run the script via exec file() in a separate Java thread. This means, that the interpreter startup of about 3-5 seconds takes only place at the first run. Subsequent runs will start immediately.
This is seen as a convenience for the IDE users.
To abort the thread at stop hotkey press, we use thread.stop(), which is
the only available option in this case. The use of this method is not
recommended since it may leave instances down the line in an unstable
state (which obviously is the case in the observed situations).
** Description changed:
--- workaround ;-)
if you observe strange behaviour of the IDE after having used the stop hotkey, currently the only solution is to stop and restart the IDE
--- general advices
- long running scripts and scripts that tend to hang or loop forever should be run from command line
- use another IDE (NetBeans, Eclipse, ...)
+
+ --- reset IDE without restart
+ it is planned, to have a reset function in the IDE, that might help in these situations (resets the IDE to a state similar to that after startup)
+ This would avoid the need to stop/restart the IDE in some situations.
----------------------------------------------------------------------
sikuli version: 1.0.1
os:64bit, win7
Step:
1, Open the IDE.
2, Edit the simple py script in IDE and save it. like this.
for i in range(1,10000):
print(i)
3, Press the key:Alt+Shift+C to stop the running script.
Expect result: The IDE will display normal and run the script again
normally.
Observer result:The IDE display normal, but you could not run the script
successful again. It will back to the IDE UI immediately.
Comments:
I guess we would not force stop the running thread and it will call the jython.jar's thread.
It will cause other phenomenon:It will not real stop the script successful, it will continue to execute the action when you press the stop function.
I want to know how to stop the running script successful.
Thanks for your help.
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1267694
Title:
[1.0.1] IDE: Abort/Stop function using stop hotkey might leave IDE in
an inconsistent state --- workaround
Status in Sikuli:
Confirmed
Bug description:
--- workaround ;-)
if you observe strange behaviour of the IDE after having used the stop hotkey, currently the only solution is to stop and restart the IDE
--- general advices
- long running scripts and scripts that tend to hang or loop forever should be run from command line
- use another IDE (NetBeans, Eclipse, ...)
--- reset IDE without restart
it is planned, to have a reset function in the IDE, that might help in these situations (resets the IDE to a state similar to that after startup)
This would avoid the need to stop/restart the IDE in some situations.
----------------------------------------------------------------------
sikuli version: 1.0.1
os:64bit, win7
Step:
1, Open the IDE.
2, Edit the simple py script in IDE and save it. like this.
for i in range(1,10000):
print(i)
3, Press the key:Alt+Shift+C to stop the running script.
Expect result: The IDE will display normal and run the script again
normally.
Observer result:The IDE display normal, but you could not run the
script successful again. It will back to the IDE UI immediately.
Comments:
I guess we would not force stop the running thread and it will call the jython.jar's thread.
It will cause other phenomenon:It will not real stop the script successful, it will continue to execute the action when you press the stop function.
I want to know how to stop the running script successful.
Thanks for your help.
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1267694/+subscriptions
References