sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #23459
Re: [Question #242343]: OutOfMemoryError: java.lang.OutOfMemoryError: Java heap space
Question #242343 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/242343
Status: Open => Answered
RaiMan proposed the following answer:
The current runScript.cmd runs with these settings:
set PARMS=-Xms64M -Xmx512M -Dfile.encoding=UTF-8
-Dsikuli.FromCommandLine
Currently you have to modify this line to change the values. There is no
parameter available.
But you might as well use your own java command directly (this is sufficient):
java -Xms512M -Xmx1024M -jar <path-to->sikuli-script.jar -r <path-to->myScript.sikuli
But I doubt, that this will help.
A Heap space problem usually means, that too much space is needed for
parameters with function calls down a call stack, which in turn usually
is caused by not intended loops leading to recursive function calls.
So in this case it simply might be Jython problem.
To narrow the case down, you should try with a simple script, that only does the pipe-read for on time:
import struct
def namedpipeClient():
f = open(r'\\192.168.173.231\pipe\testpipe', 'r+b', 0)
i = 1
n = struct.unpack('I', f.read(4))[0] # Read str length
s = f.read(n) # Read str
f.seek(0) # Important!!!
print 'Read:', s
if (s is None):
return False
else:
return True
time.sleep(2)
namedpipeClient()
and see what happens.
Another possibility might be to run an interactive Jython session, where
you would have the chance to see the result of every step:
runScript.cmd -i (getting a >> prompt)
>>f = open(r'\\192.168.173.231\pipe\testpipe', 'r+b', 0)
>> f
>> s = f.read(4)
>>s
... and so on
If the problem persists, it is a Jython problem.
Then you might check, wether this is solved with the latest Jython
2.7beta1 (http://www.jython.org/downloads.html) (which will be bundled
with version 1.0.1)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.