OOM on small pptx file on html transformation

When saving pptx file into html we’re facing with Out of memory exception (having provided JVM -Xms512m -Xmx1280m -XX:MaxPermSize=256m). It eats up all the provided memory, then hangs for some time and crashes with OOM.
File size is around 300Kb.
Hopefully you will come up with solution for this ASAP.
File is attached. Snippet of code:

final String clearFileName = “without_images”;
final String fileName = clearFileName + “.pptx”;

License license = new License();
license.setLicense(“Aspose.Total.Java.lic”);
System.out.println(“Before document loading”);
FileInputStream fileInputStream = new FileInputStream(PATH_TO_FILES + fileName);
PresentationEx presentation = new PresentationEx(fileInputStream);

System.out.println(“Finished loading file into DOM”);

presentation.save(PATH_TO_FILES + clearFileName + “.html”, SaveFormat.Html);


Last crash had following stacktrace, if is of any help:
Exception in thread “main” java.lang.OutOfMemoryError: Java heap space
at com.aspose.slides.pf4dd765c.pbdb106a0.cp.if(Unknown Source)
at com.aspose.slides.pf4dd765c.pbdb106a0.cp.catch(Unknown Source)
at com.aspose.slides.cet.do(Unknown Source)
at com.aspose.slides.cen.do(Unknown Source)
at com.aspose.slides.ImageTransformEx.do(Unknown Source)
at com.aspose.slides.PictureEx.do(Unknown Source)
at com.aspose.slides.PictureEx.do(Unknown Source)
at com.aspose.slides.aap.do(Unknown Source)
at com.aspose.slides.aap.if(Unknown Source)
at com.aspose.slides.aap.(Unknown Source)
at com.aspose.slides.GeometryShapeEx.do(Unknown Source)
at com.aspose.slides.GeometryShapeEx.for(Unknown Source)
at com.aspose.slides.PictureFrameEx.do(Unknown Source)
at com.aspose.slides.GroupShapeEx.do(Unknown Source)
at com.aspose.slides.SlideEx.do(Unknown Source)
at com.aspose.slides.bdc.do(Unknown Source)
at com.aspose.slides.PresentationEx.do(Unknown Source)
at com.aspose.slides.PresentationEx.save(Unknown Source)
at my.test.AsposeSlidesTest.main(AsposeSlidesTest.java:90)

Hi Andrey,

I have worked with the presentation file shared by you and have not been able to observe the issue specified while generating html using Aspose.Slides for Java 7.5.1 in Windows 7 environment. The heap size on my end is 128 MB. I would suggest you to please try using the specified version or increase the heap-size limit to avoid issue.

Many Thanks,

  1. I was using and am using Aspose.Slides Java 7.5.1. ( though I checked OOM is reproduced on 6.9.0 version as well).
    2) My heap size, as I put it earlier, was 1.25 GB, are you suggesting increasing it? Well we got the same OOM, when generation of html was run under tomcat with 2GB heap size. So I bet the problem is not about not sufficient amount memory, rather then library has some memory leak inside, which appears under some circumstances.
    3) I am able to constantly reproduce this OOM on my PC with the provided code snippet and file.
    My PC is as well Windows 7 x64.

    Please let me know what information do you need to fix this. Maybe you should get your developers look into stacktrace - it should tell them something.

Cut video: launch of test project / OOM as a result

Hi Andrey,

I have used the same Windows 7 x64 on my end with x64 JDK 1.6_45 installed. Can you please share the JDK version with us that you are using on your end. Please also verify locale settings that you are using on your end. I may add the issue in our issue tracking system for further investigation. Please also share that how can be the shared SWF file is useful in my scenario for the verification of issue. Also, I have not been able to open the SWF file using Quick Time player.

Many Thanks,

SWF file contains video with shows occurrence of OOM on small file with 1GB memory provided for JVM. No idea why you’re unable to open it. Opens ok on my end.
x86 JDK 1.6.0_29.
Locale: en-Us
Thank you

Hi Andrey,

That is strange that same presenation that is working on my end failing on your end with same JDK versions as well. I am also using en-us as locale. We have released, Aspose.Slides for Java 7.6.0 yesterday. Can you please try this on your end. I will add an investigation ticket for your convenience if it failed to work with Aspose.Slides for Java 7.6.0 as well.

Many Thanks,