← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #151719]: JVM OOM Java Heap Error on Mac OSX 10.6.6

 

Question #151719 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/151719

Jeremiah Jacquet posted a new comment:
Hi Tom,

 here is my high level of my scripts being run

in my setup script i am making calls to github which means checkout times
can vary within the terminal so I have thinktime next to the wait method
from sikuli.

here is an example of that:

                    s.type(null, gitCommand, 0);

                    thinktime(50000);

                    s.wait(Images.TERMINAL_GITCHECKOUTCOMPLETE_TEXT,
500);

                    thinktime(3000);

                    s.type(null, "cd " + absolutePathOfSinglesIphoneDir + "
\r", 0);

                    thinktime(2000);

                    s.type(null, "git submodule init \r", 0);

                    thinktime(2000);

                    s.wait(Images.TERMINAL_GITINITCOMPLETE_TEXT, 500);

                    thinktime(2000);

                    s.type(null, "git submodule update \r", 0);

                    thinktime(50000);

                    s.wait(Images.TERMINAL_GITUPDATECOMPLETE_TEXT, 500);

                    thinktime(2000);

                    s.type(null, "cd " + absolutePathOfSinglesIphoneDir + "
\r", 0);


Following the setup method I run some find method from Sikuli inconjunction
with another library called robot and run test like this:


@Test

public void testFemaleGenderPositiveEntry() throws Exception {


 String result = "";


 MobileUtils.thinktime(THINKTIME);


 s.find("imgs/EharmonyHeader.png");


 robot.mouseMove((s.getLastMatch().below().getX() + 235), (s

.getLastMatch().below().getY() + 120));


 MobileUtils.thinktime(THINKTIME);


 robot.mousePress(InputEvent.BUTTON1_MASK);

robot.mouseRelease(InputEvent.BUTTON1_MASK);


 MobileUtils.thinktime(THINKTIME);


 if (s.find("imgs/GenderFemaleEnabled.png") != null) {

result = "true";

}


 assertTrue(

"The gender selector should be set to Woman defined in a pink
selection.",

result.contains("true"));


 } // end method


There are 20 more test almost like this one that continue to run before the
crash occurs. Something I should mention here I have not had this problem in
the past with your previous version of sikuli.


The images are 2-4k pngs, and I will have to get back to you on objects size
before garbage collection.

thanks,
JJacquet

On Sat, Apr 2, 2011 at 5:04 AM, Tom Yeh <tomyeh@xxxxxxxxxxxxxx> wrote:

> Hi,
>
> Thanks for reporting this memory leak error. It's not immediately
> obvious where the error comes from. Can you provide more information,
> like the kind of operations performed by your test scripts,
> resolutions of images being tested, and how fast the memory
> consumption seems to grow? Thanks!
>
> Tom
>
>
> On Sat, Apr 2, 2011 at 1:57 AM, Jeremiah Jacquet
> <jeremiahjacquet@xxxxxxxxx> wrote:
> > Public bug reported:
> >
> > Hey Sikuli devs,
> >
> >  first off thanks for making such a great product.
> >
> > I am experiencing a Java heap error when running my tests. Here is my
> > scenario
> >
> > Mac OSX 10.6.6
> > Eclipse
> > Ant (latest)
> > Fest (latest)
> > Jenkins
> > tests written in Java using your libraries (latest)
> > java version "1.6.0_22"
> >
> > in my build xml i set the maxmemory as follows:
> >
> >  <junit forkmode="perTest" printsummary="yes" haltonfailure="no"
> > haltonerror="no" maxmemory="2048m">
> >
> > The test begins and almost finishes, at the end of the test my build
> fails with this error:
> > Java heap space
> >
> > java.lang.OutOfMemoryError: Java heap space
> > at java.awt.image.DataBufferInt.(DataBufferInt.java:41)
> > at java.awt.image.Raster.createPackedRaster(Raster.java:458)
> > at
> java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
> > at java.awt.image.BufferedImage.(BufferedImage.java:324)
> > at
> sun.java2d.loops.GraphicsPrimitive.convertFrom(GraphicsPrimitive.java:539)
> > at
> sun.java2d.loops.GraphicsPrimitive.convertFrom(GraphicsPrimitive.java:523)
> > at sun.java2d.loops.MaskBlit$General.MaskBlit(MaskBlit.java:191)
> > at sun.java2d.loops.Blit$GeneralMaskBlit.Blit(Blit.java:186)
> > at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:927)
> > at sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:550)
> > at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:54)
> > at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:982)
> > at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:168)
> > at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3261)
> > at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3246)
> >
> > at
> org.sikuli.script.OpenCV.convertBufferedImageToByteArray(OpenCV.java:30)
> > at org.sikuli.script.OpenCV.convertBufferedImageToMat(OpenCV.java:36)
> > at org.sikuli.script.Finder.(Finder.java:56)
> > at org.sikuli.script.Region.doFind(Region.java:769)
> > at org.sikuli.script.Region$RepeatableFind.run(Region.java:1160)
> > at org.sikuli.script.Region$Repeatable.repeat(Region.java:1131)
> > at org.sikuli.script.Region.wait(Region.java:406)
> > at org.sikuli.script.Region.find(Region.java:308)
> > at org.sikuli.script.Region.getLocationFromPSRML(Region.java:856)
> > at org.sikuli.script.Region.click(Region.java:488)
> > at
> com.eharmony.iphoneautomation.tests.TestNewMemberScreenInput.testFindMyMatches(Unknown
> Source)
> >
> >
> > on the mac I am using its 64bit so i know i can set the memory higher for
> JVM. Is there something in sikuli I can set
> >
> >
> > thanks
> >
> > ** Affects: sikuli
> >     Importance: Undecided
> >         Status: New
> >
> > --
> > You received this bug notification because you are a member of Sikuli
> > Drivers, which is subscribed to Sikuli.
> > https://bugs.launchpad.net/bugs/748036
> >
> > Title:
> >  JVM OOM Java Heap Error on Mac OSX 10.6.6
> >
> > Status in Sikuli:
> >  New
> >
> > Bug description:
> >  Hey Sikuli devs,
> >
> >   first off thanks for making such a great product.
> >
> >  I am experiencing a Java heap error when running my tests. Here is my
> >  scenario
> >
> >  Mac OSX 10.6.6
> >  Eclipse
> >  Ant (latest)
> >  Fest (latest)
> >  Jenkins
> >  tests written in Java using your libraries (latest)
> >  java version "1.6.0_22"
> >
> >  in my build xml i set the maxmemory as follows:
> >
> >   <junit forkmode="perTest" printsummary="yes" haltonfailure="no"
> >  haltonerror="no" maxmemory="2048m">
> >
> >  The test begins and almost finishes, at the end of the test my build
> fails with this error:
> >  Java heap space
> >
> >  java.lang.OutOfMemoryError: Java heap space
> >  at java.awt.image.DataBufferInt.(DataBufferInt.java:41)
> >  at java.awt.image.Raster.createPackedRaster(Raster.java:458)
> >  at
> java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1015)
> >  at java.awt.image.BufferedImage.(BufferedImage.java:324)
> >  at
> sun.java2d.loops.GraphicsPrimitive.convertFrom(GraphicsPrimitive.java:539)
> >  at
> sun.java2d.loops.GraphicsPrimitive.convertFrom(GraphicsPrimitive.java:523)
> >  at sun.java2d.loops.MaskBlit$General.MaskBlit(MaskBlit.java:191)
> >  at sun.java2d.loops.Blit$GeneralMaskBlit.Blit(Blit.java:186)
> >  at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:927)
> >  at sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:550)
> >  at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:54)
> >  at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:982)
> >  at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:168)
> >  at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3261)
> >  at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3246)
> >
> >  at
> org.sikuli.script.OpenCV.convertBufferedImageToByteArray(OpenCV.java:30)
> >  at org.sikuli.script.OpenCV.convertBufferedImageToMat(OpenCV.java:36)
> >  at org.sikuli.script.Finder.(Finder.java:56)
> >  at org.sikuli.script.Region.doFind(Region.java:769)
> >  at org.sikuli.script.Region$RepeatableFind.run(Region.java:1160)
> >  at org.sikuli.script.Region$Repeatable.repeat(Region.java:1131)
> >  at org.sikuli.script.Region.wait(Region.java:406)
> >  at org.sikuli.script.Region.find(Region.java:308)
> >  at org.sikuli.script.Region.getLocationFromPSRML(Region.java:856)
> >  at org.sikuli.script.Region.click(Region.java:488)
> >  at
> com.eharmony.iphoneautomation.tests.TestNewMemberScreenInput.testFindMyMatches(Unknown
> Source)
> >
> >
> >  on the mac I am using its 64bit so i know i can set the memory higher
> for JVM. Is there something in sikuli I can set
> >
> >
> >  thanks
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~sikuli-driver
> > Post to     : sikuli-driver@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~sikuli-driver
> > More help   : https://help.launchpad.net/ListHelp
> >
>

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.