sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #11200
[Bug 1013396] Re: Memory leak in Region.right(x)
Ok, but this is not a memory leak caused by a specific Sikuli feature,
this is some strange behavior of the Java GC (garbage collection), while
running a Sikuli script.
The effect of increase of minimum memory consumption is more
substantial, when running a script in the IDE compared to running it
from command line.
Running a script in IDE directly after IDE start, the base memory
consumption jumps from about 120 MB to about 250 MB after having
initialized the Sikuli basics and started running the script.
Then memory consumption rises to a value of about base+350MB, before
falling back to base (because of GC). The problem is, that base is
constantly increasing with each fallback (IDE: +10-30MB, command line
using sikuli-script.jar: +0-5MB varying).
So in my opinion, this is a general IDE-script-run problem.
See what happens if you run your script from command line using:
java -jar path-to-sikuli-script.jar path-to-script.sikuli
** Summary changed:
- Memory leak in Region.right(x)
+ Java heap space exhausted with long running script
--
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
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