← Back to team overview

sikuli-driver team mailing list archive

[Question #151719]: [Java] Mac: Eclipse: Java Heap Error --- adjustments in build.xml needed

 

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

Description changed to:
*** Solution:
Remember to add maxmemory="2048m" wherever necessary in your targets to increase heap size in your ant build file. Obviously the number 2048 can get bigger if you want more memory allocated to your target.

------------------------------------------------------------------------------------------------------
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

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