100% CPU utilization on Mac

Asked by Temporal Fusion

Complete new to Sikuli but trying to learn as much as possible. loving it.

One problem I'm having often is that my script might fail at some point and often this will hang Sikuli indefinitely, and if I check top in terminal or activity monitor I notice that Sikuli is running at 100% CPU and won't let go, causing me to quit or force quit the application.

I'm using almost completely, wait and click commands at the moment. Automating website navigation mostly.

Should I use different commands instead of wait(image) ?
I don't like force quitting Sikuli and feel like I'm doing something wrong or thats just a bug when the script fails to execute correctly and ramps the cpu up instead of quitting back to my failed script.

Any tips are appreciated, thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Temporal Fusion
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

--- other methods than wait()
you might have a look at exists(), which does not stop the script in case of FindFailed. But for your case it makes no difference.

--- any loops in your script? any usage of FOREVER?

--- how are you running your scripts?

--- using Sikuli X on 10.6?

--- you say: my script might fail at some point
always the same point? what is specific at the situation? Using try: except: ?

--- if you like, you can send me a zipped .sikuli to my mail at https://launchpad.net/~raimund-hocke. I will have a look at it and make some tests.

Revision history for this message
Temporal Fusion (temporalfusion) said :
#2

I think I was causing it by putting inordinate amount of wait times that was causing the problem. Confusing seconds with milliseconds.

I'm on 10.6.6 using Sikuli X-1.0rc1

I didn't see the problem after adjusting the wait times. I'll keep an eye on it and If it continues then I'll post my script or forward it to you, thank you for your quick reply and suggestions. Much appreciated.

-Michael