Free Support Forum - aspose.com

Slide getThumbnail() returns OutOfMemoryError Java heap space

Hi,

The methode getThumbnail(1920,1080) returns an error. (Aspose Slides version 20.10)

Please find bellow a pptx file to reproduce the error :
https://ftp.momindum.com/java-heap-size-error-during-aspose-getThumnail.pptx

java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferByte.(Unknown Source)
at java.awt.image.ComponentSampleModel.createDataBuffer(Unknown Source)
at sun.awt.image.ByteInterleavedRaster.(Unknown Source)
at sun.awt.image.ByteInterleavedRaster.createCompatibleWritableRaster(Unknown Source)
at sun.awt.image.ByteInterleavedRaster.createCompatibleWritableRaster(Unknown Source)
at com.aspose.slides.internal.fy.int.new(Unknown Source)
at com.aspose.slides.internal.fy.int.do(Unknown Source)
at com.aspose.slides.internal.ez.if.do(Unknown Source)
at com.aspose.slides.internal.ez.if.do(Unknown Source)
at com.aspose.slides.internal.ez.if.do(Unknown Source)
at com.aspose.slides.internal.ez.if.do(Unknown Source)
at com.aspose.slides.internal.ez.volatile.(Unknown Source)
at com.aspose.slides.internal.ez.volatile.(Unknown Source)
at com.aspose.slides.internal.ez.volatile.(Unknown Source)
at com.aspose.slides.internal.nw.else.do(Unknown Source)
at com.aspose.slides.ci.try(Unknown Source)
at com.aspose.slides.ci.byte(Unknown Source)
at com.aspose.slides.ci.int(Unknown Source)
at com.aspose.slides.tf.do(Unknown Source)
at com.aspose.slides.GeometryShape.do(Unknown Source)
at com.aspose.slides.PictureFrame.do(Unknown Source)
at com.aspose.slides.GroupShape.do(Unknown Source)
at com.aspose.slides.Slide.for(Unknown Source)
at com.aspose.slides.Slide.do(Unknown Source)
at com.aspose.slides.Slide.do(Unknown Source)
at com.aspose.slides.Slide.do(Unknown Source)
at com.aspose.slides.Slide.getThumbnail(Unknown Source)

Is-it possible to handle slides having big images ?

Best regards

@momindum

I suggest you to please consider increasing Java Heap Size on your end and I hope the issue will get fixed.

How much do you suggest to increase? I tried with “-Xms256M -Xmx1024M” but it still doesn’t work.

@momindum

It depends on your presentation deck. But I would suggest you to please consider using upto 4G memory.