Java VM frequently throwing OutOfMemoryError in Aspose stack

@bendcotton,

Thank you for providing the sample file. We have attached it to the ticket for our reference and will share our feedback after testing the issue using this file.

so sorry that you approach software the way you, do. BNYM (PWMT) and you go perfectly together … prey upon the retail ill-equipped.

Hi,

Thank you for the comprehensive list, I wasn’t aware of “Requested array size exceeds VM limit”.

There’s one you haven’t mentioned, Non-Heap area too small or leaks in that area which results in java.lang.OutOfMemoryError (no message). We’ve seen that in case of leaking classes and classloaders, for example stubs/proxies from jaxws.

And regarding Out of swap space, my scenario was a bit different, it wasn’t really a leak. Here’s what I’ve recorded then: This may happen if you are making lots of heavy JNI calls, but the JavaHeap objects occupy little space. In that scenario the GC might not feel the urge to cleanup JavaHeap, while the JNI Heap keeps on increasing till it goes out of memory. If you use java NIO packages, watch out for this issue. DirectBuffer allocation uses the native heap. The NativeHeap can be increasded by -XX:MaxDirectMemorySize=256M (default is 128)

9Apps VidMate 9Apps

@bendcotton,

We have internally tried to use the presentation file shared by you even in loops but failed to reproduce the issue on different versions. The following code consumes about 330Mb and throws no exceptions. Would it be possible for you to recheck this and provide a new presentation with “complex financial quantitative views”, Ideally, a really big presentation with fake data.

for (int i = 0; i < 5; i++) 
{
Presentation pres = new Presentation("TestPresentation123_03112019_0905.pptx");
pres.save("pres_" + i + ".pdf", SaveFormat.Pdf);
pres.save("pres_" + i + ".pptx", SaveFormat.Pptx);
for(int j = 0; j < pres.getSlides().size(); j++)
ImageIO.write(pres.getSlides().get_Item(j).getThumbnail(new Dimension(960, 720)), "PNG", new java.io.File("image_"+j+".png"));
pres.dispose();
}

The issues you have found earlier (filed as SLIDESJAVA-37583) have been fixed in this update.