Closed GoogleCodeExporter closed 9 years ago
Which OS are you running your test?
Original comment by nikhil....@gmail.com
on 24 May 2013 at 8:29
Hi
Thanks for your quick consideration.
I'm using Sikuli in two different machines with the Windows OS with 32 Bit
and 64 Bit respectively.
Kindly provide me the solution to overcome heap memory. Since I worked on
lot of work around in my machine it didn't help. Sikuli consumes 3MB heap
memory for every DesktopScreenRegion() action.
Its very urgent because I made development using Sikuli and I cannot revert
it back. Please help in this regard.
Original comment by saranyab...@gmail.com
on 26 May 2013 at 5:40
Here is a pre-release version that contains a fix.
https://bitbucket.org/doubleshow/sikuli-api/downloads
Please download and report whether the problem is solved.
Original comment by doubles...@gmail.com
on 13 Jun 2013 at 9:54
Hi
Still issue is not resolved. when We try to click Element which was done using
DesktopScreenRegion() action, It consumes nearly 3MB of heap memory and
releasing
not that memory. Issue is because Sikuli consumes heap memory and not releasing
it
up or cleaning it after the action done.
Let me know if you any information further.
Original comment by saranyab...@gmail.com
on 14 Jun 2013 at 12:50
This is the piece of code we used to test. We were able to run this for a long
time without causing any out of memory problem.
public static void testRepeatedFindOnDifferentScreenRegionObjects(){
Runtime runtime = Runtime.getRuntime();
while (true){
ScreenRegion s = new DesktopScreenRegion();
Target target = new ImageTarget(new File("large.png"));
s.wait(target, 100);
System.out.println("heap MB: " + (runtime.totalMemory() - runtime.freeMemory()) / 1024 / 1024);
}
}
The sample output:
heap MB: 53
heap MB: 33
heap MB: 51
heap MB: 53
heap MB: 33
heap MB: 51
heap MB: 53
heap MB: 33
heap MB: 51
heap MB: 53
heap MB: 34
heap MB: 50
heap MB: 52
heap MB: 33
heap MB: 51
heap MB: 53
heap MB: 33
heap MB: 51
heap MB: 53
heap MB: 33
heap MB: 50
heap MB: 52
heap MB: 28
heap MB: 46
heap MB: 48
heap MB: 33
heap MB: 51
heap MB: 53
heap MB: 33
heap MB: 51
heap MB: 53
heap MB: 33
heap MB: 51
heap MB: 53
heap MB: 33
heap MB: 51
heap MB: 53
heap MB: 33
heap MB: 51
heap MB: 53
heap MB: 34
heap MB: 52
heap MB: 53
heap MB: 34
heap MB: 52
heap MB: 53
heap MB: 33
heap MB: 52
heap MB: 53
heap MB: 34
heap MB: 50
heap MB: 52
The heap consumption is hovering at about 50.
Also, if you force garbage collection by adding System.gc(), like:
Runtime runtime = Runtime.getRuntime();
while (true){
ScreenRegion s = new DesktopScreenRegion();
Target target = new ImageTarget(new File("large.png"));
s.wait(target, 100);
System.gc();
System.out.println("heap MB: " + (runtime.totalMemory() - runtime.freeMemory()) / 1024 / 1024);
}
>>
The memory consumption is stable at around 11.
heap MB: 11
heap MB: 11
heap MB: 11
heap MB: 11
heap MB: 11
Please let me know if you observe a similar behavior on your system.
Original comment by doubles...@gmail.com
on 14 Jun 2013 at 1:40
Hi
Thanks for your quick reply. Am using Canvas object to locate element first
before click event. Let me try again by removing canvas object and try like as
you mentioned and run garbage collector and let you know.
Regards,
Saranya.s
Original comment by saranyab...@gmail.com
on 14 Jun 2013 at 2:37
Hi
I tried using the above code. It works fine. But if implement "click()"
function and run tests, it actually consumes heap memory a lot as I mentioned
earlier. Could you please check by implementing "Click()" after
ScreenRegion s = new DesktopScreenRegion();
Target target = new ImageTarget(new File("large.png"));
s.wait(target, 100);
Waiting for your reply.
Thanks
Saranya
Original comment by saranyab...@gmail.com
on 17 Jun 2013 at 3:34
I am unable to reproduce the error.
I ran this code:
Runtime runtime = Runtime.getRuntime();
Mouse mouse = new DesktopMouse();
while (true){
ScreenRegion s = new DesktopScreenRegion();
Target target = new ImageTarget(new File("debug.png"));
List<ScreenRegion> rs = s.findAll(target);
if (rs.size() > 0){
ScreenRegion r = rs.get(0);
mouse.click(r.getCenter());
System.out.println("r = " + r);
}
System.gc();
System.out.println("heap MB: " + (runtime.totalMemory() - runtime.freeMemory()) / 1024 / 1024);
}
The output is:
r =
DefaultScreenRegion{screen=org.sikuli.api.robot.desktop.DesktopScreen{id=0},
x=1310, y=45, width=57, height=30, score=0.8070441484451294}
heap MB: 6
r =
DefaultScreenRegion{screen=org.sikuli.api.robot.desktop.DesktopScreen{id=0},
x=1310, y=45, width=57, height=30, score=0.8447399735450745}
heap MB: 10
r =
DefaultScreenRegion{screen=org.sikuli.api.robot.desktop.DesktopScreen{id=0},
x=1310, y=45, width=57, height=30, score=0.8447399735450745}
heap MB: 10
r =
DefaultScreenRegion{screen=org.sikuli.api.robot.desktop.DesktopScreen{id=0},
x=1310, y=45, width=57, height=30, score=0.8528084754943848}
heap MB: 10
r =
DefaultScreenRegion{screen=org.sikuli.api.robot.desktop.DesktopScreen{id=0},
x=1310, y=45, width=57, height=30, score=0.8528084754943848}
heap MB: 10
r =
DefaultScreenRegion{screen=org.sikuli.api.robot.desktop.DesktopScreen{id=0},
x=1310, y=45, width=57, height=30, score=0.8447399735450745}
heap MB: 10
r =
DefaultScreenRegion{screen=org.sikuli.api.robot.desktop.DesktopScreen{id=0},
x=1310, y=45, width=57, height=30, score=0.8528084754943848}
heap MB: 10
r =
DefaultScreenRegion{screen=org.sikuli.api.robot.desktop.DesktopScreen{id=0},
x=1310, y=45, width=57, height=30, score=0.8447399735450745}
heap MB: 10
r =
DefaultScreenRegion{screen=org.sikuli.api.robot.desktop.DesktopScreen{id=0},
x=1310, y=45, width=57, height=30, score=0.8447399735450745}
heap MB: 10
r =
DefaultScreenRegion{screen=org.sikuli.api.robot.desktop.DesktopScreen{id=0},
x=1310, y=45, width=57, height=30, score=0.8528084754943848}
heap MB: 10
r =
DefaultScreenRegion{screen=org.sikuli.api.robot.desktop.DesktopScreen{id=0},
x=1310, y=45, width=57, height=30, score=0.8447399735450745}
heap MB: 10
r =
DefaultScreenRegion{screen=org.sikuli.api.robot.desktop.DesktopScreen{id=0},
x=1310, y=45, width=57, height=30, score=0.8447399735450745}
heap MB: 10
r =
DefaultScreenRegion{screen=org.sikuli.api.robot.desktop.DesktopScreen{id=0},
x=1310, y=45, width=57, height=30, score=0.8528084754943848}
heap MB: 10
r =
DefaultScreenRegion{screen=org.sikuli.api.robot.desktop.DesktopScreen{id=0},
x=1310, y=45, width=57, height=30, score=0.8070441484451294}
heap MB: 10
I did not observe any memory consumption problem. Please try it yourself and
let us know.
Original comment by doubles...@gmail.com
on 18 Jun 2013 at 2:12
Hi
Thanks for your reply regarding this issue.
This issue has been resolved in Windows 64 - Bit OS.
But in 32 - Bit OS it still remains the same in consuming heap memory
[@Click] heap MB: 59
[@Click] heap MB: 55
[@Click] heap MB: 55
[@Click] heap MB: 55
[@Click] heap MB: 59
[@Click] heap MB: 59
Navigate IWE and settings Verify IWE and settings
Navigate to Homepage Verify that the page has navigated to Homepage
<<<Scroll>> <<<End>>
[@Displayed] heap MB: 55
[@Click] heap MB: 58
[@Click] heap MB: 62
[@Click] heap MB: 62
[@Click] heap MB: 68
[@Click] heap MB: 67
[@Click] heap MB: 67
[@Click] heap MB: 71
[@Click] heap MB: 69
[@Click] heap MB: 69
[@Click] heap MB: 75
[@Click] heap MB: 71
[@Click] heap MB: 71
[@Click] heap MB: 76
[@Click] heap MB: 74
[@Click] heap MB: 74
[@Click] heap MB: 84
[@Click] heap MB: 78
[@Click] heap MB: 78
[@Click] heap MB: 84
[@Click] heap MB: 82
[@Click] heap MB: 82
[@Click] heap MB: 86
Kindly please check from your side in Windows 32 Bit OS and let me know whether
this issue has been resolved.
Thanks
Saranya
Original comment by saranyab...@gmail.com
on 19 Jun 2013 at 12:48
Original issue reported on code.google.com by
saranyab...@gmail.com
on 20 May 2013 at 7:05