Memory leaking & Sikuli script crashing - Windows 7 & XP

Asked by Sikuli User

Hi.

I am using an infinite loop - a script looking for specific images on screen - and after 1-2 hours, the script crashes with the following message for Windows 7:

Window title:

Microsoft Visual C++ Runtime Library

Message:

Runtime error!
Program: c:\Windows\SysWOW64\java.exe
This application has requested the Runtime to to terminate it in an unusual way.....................

Something similar I receive in Windows XP

In my comand prompt window I also receive the following message in Windows 7:

OpenCV error: Insufficient memory (Failed to alocate 56699948 bytes) in unknown function, file ..\..\...............cxalloc.cpp line 52

I read that memory leaking was fixed in version 0.10.1 so...I wonder, why my script was working before in Sikuli 0.9 under both XP and Windows 7, then in 0.10 but not in 0.10.1?!

I have some screen shots with those errors too, if somebody will want to take a look.

And, here is my script:

while True:

        ##import random
        ##interval = random.randrange(4,18)
        ##wait(interval)
        ##type("R", KEY_CTRL)

  setThrowException(False)

  while True:
      if exists(Pattern('images/1274676715984.png').similar(0.74),0):
      assign = findAll(Pattern('images/1274676715984.png').similar(0.74))
      if assign:
        for x in assign:
          click(x)
          sleep(0.5)
          click(x)
          sleep(0.5)
          click(x)
          sleep(0.5)
          click(x)
          sleep(0.5)
          click(x)
        sleep(12)
        click(Pattern('images/1274719019609.png').similar(0.68))
        sleep(12)
        click(Pattern('images/1274811772886.png').similar(0.68))
      else:
        break
      break
   else:
      pass

  setThrowException(True)

Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Sikuli User
Solved:
Last query:
Last reply:
Revision history for this message
Sikuli User (hidden-hidden) said :
#1

solved

Revision history for this message
Eric Brock (eric-brock21) said :
#2

how did you solve this? I am having the exact same problem with windows xp. I have sikuli 10.1, and I am encountering the runtime error on a consistent basis now. I am using a somewhat dated laptop, and i suspect that the memory capabilities are not up to par with the scripts that I am running, but I still feel that it should be able to handle it. Any suggestions? I can provide you with more information if needed, but the conditions of my troubles don't seem to be all that different from what problems you were having. I would appreciate some help :) thanks!

Revision history for this message
Sikuli User (hidden-hidden) said :
#3

I just stopped using version 0.10.1 and now I am using vers. 0.9.9

On Thu, Jul 22, 2010 at 7:14 PM, P <email address hidden>wrote:

> Your question #114050 on Sikuli changed:
> https://answers.launchpad.net/sikuli/+question/114050
>
> Linked to bug: #575585
> https://bugs.launchpad.net/bugs/575585
> "Memory leak in Sikuli 0.10 crashes long scripts"
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>