wait(IMAGE, FOREVER) crashes in 0.10.1

Asked by Luca Somaini

I’m using windows Vista SP2 with Sikuli 0.10.1

while True:
   wait(IMAGE, FOREVER)
   popup(“Image found!”)

At beginning when I display the image on the screen, the popup message is visible. But after some hours the image was not visible (so the program was holding on waiting), the task Sikuli-IDE.exe crashed without any error message (It disappeard from the task manager)

Thank you very much for the help!

Question information

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

There still seem to be some problems with long running scripts (https://bugs.launchpad.net/sikuli/+bug/575585).

This seems to be caused by a steady increase of memory consumption.

You can try to restrict the find operation to a smaller region if possible or implement your own timing to reduce the find operations:
while True:
   if exists(IMAGE, 0) # only one try
      popup(“Image found!”)
   wait(10) # e.g. only every 10 seconds

Another possibility could be to try out the observer feature.
http://sikuli.org/trac/wiki/reference-0.10#ObservingVisualEventsinaRegion

Revision history for this message
Luca Somaini (luca-somaini) said :
#2

The reduction of the find operation to a smaller region seems to solve my problem as the memory lasts for my actual testing time. I suppose that with region reduction the Sikuli program will still crash after a longer running time.

Thank you very much!

Revision history for this message
RaiMan (raimund-hocke) said :
#3

I linked your question to the relevant bug.

Can you help with this problem?

Provide an answer of your own, or ask Luca Somaini for more information if necessary.

To post a message you must log in.