← Back to team overview

sikuli-driver team mailing list archive

[Bug 1013396] Re: Java heap space exhausted with long running script

 

OK, you are the champ ;-)

The problem is caused behind the scenes by the JPanel preparation for
the extra option, to show a popup with the image and the skip/retry/fail
option in case of FindFailed.

In the case of Region.right(), every call seems to produce a bunch of
new JPanels that are never released and so constantly (slowly though)
increase the memory usage.

I used the tool "Java Visual VM" (bundled with the JDK 6), to look at
the details.

I tried some variants, but there is no other workaround, than to make
your own functions, to get a Region right (or above, below, left,
nearby) of a given region.

BTW: neither setAutoWaitTimeout(0.0) nor setFindFailedResponse(SKIP)
have any influence on the behavior.

** Summary changed:

- Java heap space exhausted with long running script
+ Java heap space exhausted with long running script using Region.right() or other spatial operators.

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1013396

Title:
  Java heap space exhausted with long running script using
  Region.right() or other spatial operators.

Status in Sikuli:
  New

Bug description:
  It took me a while* to track this one down:

  NO memory leak:

  def getNumbers(numType, region):
       return 0

  def test()
      x=regions['topLeft'].find("JI.png")
      getNumbers("topLeft", x) # <----<----<---- Region

  while True:
       test()

  
  MEMORY LEAK:

  def getNumbers(numType, region):
       return 0

  def test()
      x=regions['topLeft'].find("JI.png")
      getNumbers("topLeft", x.right(75)) #<---<---<--- Region.right(x)

  while True:
       test()

  System: win7 64bit
  JRE 1.6.32 (JRE1.7.04 tested as well)
  Sikuli X1.0rc3(905) (1.0RC930 tested as well)

  I've tested a few variations of the code above already. I will go on,
  since that script is essential to a project I am running.

  PS: getNumbers is my own text (number) recognition algorithm since
  region.text() isn't working yet.

  * "a while" == 12 days - anyway, sikuli is really good for it's
  purpose

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1013396/+subscriptions


References