← Back to team overview

sikuli-driver team mailing list archive

[Question #227366]: java.lang.OutOfMemoryError: Java heap space-Eclipse

 

New question #227366 on Sikuli:
https://answers.launchpad.net/sikuli/+question/227366

Hi,

I am using Eclipse IDE to write the test scripts. I am getting java.lang.OutOfMemoryError: Java heap space error up on few iterations of the code. I tried the following things to get rid of this error which is of no use:

1. Increased the VMargs values
2. Tried to point all the objects to null once the usage is complete.
3. Removed capturing screen shots at multiple points in the code.

I am using TestNG framework that has a hash table defined.

Please find the full details of the error below and suggest me how to fix this issue:

Machine Details:

Win7- 64 bit
eclipse win 32
vmargs: -Xms512m -Xmx1024m
RAM: 8GB
Sikuli: r903, in eclipse I am using sikuli-script.jar

The same code must also work in win xp of 32 bit edition

java.lang.OutOfMemoryError: Java heap space
	at java.awt.image.DataBufferInt.<init>(Unknown Source)
	at java.awt.image.Raster.createPackedRaster(Unknown Source)
	at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
	at java.awt.image.BufferedImage.<init>(Unknown Source)
	at sun.java2d.loops.GraphicsPrimitive.convertFrom(Unknown Source)
	at sun.java2d.loops.GraphicsPrimitive.convertFrom(Unknown Source)
	at sun.java2d.loops.MaskBlit$General.MaskBlit(Unknown Source)
	at sun.java2d.loops.Blit$GeneralMaskBlit.Blit(Unknown Source)
	at sun.java2d.pipe.DrawImage.blitSurfaceData(Unknown Source)
	at sun.java2d.pipe.DrawImage.renderImageCopy(Unknown Source)
	at sun.java2d.pipe.DrawImage.copyImage(Unknown Source)
	at sun.java2d.pipe.DrawImage.copyImage(Unknown Source)
	at sun.java2d.pipe.ValidatePipe.copyImage(Unknown Source)
	at sun.java2d.SunGraphics2D.drawImage(Unknown Source)
	at sun.java2d.SunGraphics2D.drawImage(Unknown Source)
	at org.sikuli.script.OpenCV.convertBufferedImageToByteArray(OpenCV.java:35)
	at org.sikuli.script.OpenCV.convertBufferedImageToMat(OpenCV.java:41)
	at org.sikuli.script.Finder.<init>(Finder.java:70)
	at org.sikuli.script.Region.doFind(Region.java:1034)
	at org.sikuli.script.Region$RepeatableFind.run(Region.java:1237)
	at org.sikuli.script.Region$Repeatable.repeat(Region.java:1208)
	at org.sikuli.script.Region.exists(Region.java:539)
	at org.sikuli.script.Region.exists(Region.java:526)
	at com.qtpselenium.base.TestBase.ClickImage(TestBase.java:334)
	at com.qtpselenium.suite.RepairTicketSuite.RepairTicketCombined.RepairTicketCombinedTest(RepairTicketCombined.java:100)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)


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