sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #58747
[Question #705951]: Sikulix subprocess module overflow error
New question #705951 on SikuliX:
https://answers.launchpad.net/sikuli/+question/705951
Hello,
We are writing tests for a large project using Sikulix. It helped us test many scenarios. But some of our tests are too long. At some point in these long tests, I think we're reaching the limits of the JVM and the test freezes. When we terminate the sikulix.jar process, the test continues from where it left off. At this point, I ask for your help. (I use thousands of images and static functions). I cannot detect the error.
I am using the subprocess module. And as far as I have determined, it freezes after running this function 218 times on a computer with 8 GB of RAM, 1180 times on a computer with 64 GB of RAM. I tried different operating systems (ubuntu, centos) same problem.
The communicate() function in the Subprocess module causes an overflow even though I terminate the process.
I am waiting for your help.
# -*- coding: utf-8 -*-
import subprocess
class window:
@staticmethod
def check():
i = 0
while True:
print("i >>" +str(i))
print("Start SUBPROCESS 1>>> ")
p = subprocess.Popen("exec xdotool search 'window_name'", shell=True, stdout=subprocess.PIPE)
print("END SUBPROCESS 1>>> ")
print("start communicate 1>>> ")
result = p.communicate()
print("end communicate 1>>> ")
p.terminate()
print("end terminate 1>>> ")
id = result[0]
print("Start SUBPROCESS 2>>> ")
p = subprocess.Popen("exec xdotool getwindowname 'wındow_pid'", shell=True, stdout=subprocess.PIPE)
print("END SUBPROCESS 2>>> ")
print("start communicate 2>>> ")
result = p.communicate()
print("end communicate 2>>> ")
p.terminate()
print("end terminate 2>>> ")
x = result[0]
i += 1
window.check()
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.