Free Support Forum - aspose.com

Aspose.Slides 20.10 causes OOM problems loading fonts - macOS

We recently attempted an upgrade to Aspose.Slides 20.10 (Java). We found it stable for Linux and Windows, but found it to cause a lot of out-of-memory problems when running on macOS. For example:

java.lang.OutOfMemoryError: Java heap space
	at com.aspose.slides.internal.e7.void.setCapacity(Unknown Source) ~[aspose-slides-20.10-jdk16.jar:20.10]
	at com.aspose.slides.internal.e7.void.b(Unknown Source) ~[aspose-slides-20.10-jdk16.jar:20.10]
	at com.aspose.slides.internal.e7.void.write(Unknown Source) ~[aspose-slides-20.10-jdk16.jar:20.10]
	at com.aspose.slides.internal.m8.if.do(Unknown Source) ~[aspose-slides-20.10-jdk16.jar:20.10]
	at com.aspose.slides.internal.l0.try.if(Unknown Source) ~[aspose-slides-20.10-jdk16.jar:20.10]
	at com.aspose.slides.internal.e5.new.do(Unknown Source) ~[aspose-slides-20.10-jdk16.jar:20.10]
	at com.aspose.slides.internal.n2.implements.do(Unknown Source) ~[aspose-slides-20.10-jdk16.jar:20.10]
	at com.aspose.slides.internal.n5.final.do(Unknown Source) ~[aspose-slides-20.10-jdk16.jar:20.10]
	at com.aspose.slides.internal.n5.final.do(Unknown Source) ~[aspose-slides-20.10-jdk16.jar:20.10]
	at com.aspose.slides.internal.n5.final.do(Unknown Source) ~[aspose-slides-20.10-jdk16.jar:20.10]
	at com.aspose.slides.FontsLoader.do(Unknown Source) ~[aspose-slides-20.10-jdk16.jar:20.10]
	at com.aspose.slides.FontsLoader.loadExternalFonts(Unknown Source) ~[aspose-slides-20.10-jdk16.jar:20.10]

Presently, with 20.10, we are only able to run our software stably on macOS if we use a heap exceeding 8GB; this seems like a significant amount of memory just for fonts. When executing FontsLoader.loadExternalFonts, we notice that on Windows the standard font directory (e.g, C:/Windows/Fonts) consumes about 384MB on disk. However, on macOS, the standard font directories (e.g., /System/Library/Fonts/Supplemental, /System/Library/Fonts, etc.) cumulatively exceed 700MB on disk.

If we revert to a previous version of Aspose.Slides (e.g., 20.2), we do not need 8GB heap space on macOS.

This seems like a clear regression, and we cannot expect consumers of our software to assign 8GB+ to heap. Can we expect this regression to be resolved in 20.11?

@nuix

There has been a similar thread shared by you recently as well. We may need to investigate this and for this we will request you to please share Java details, Source presentation and used sample code. We will add the issue in our issue tracking system to further investigate and resolve the issue.

This particular issue doesn’t require source data. And this issue is unrelated to our other ticket.

As clearly stated above, just call FontsLoader.loadExternalFonts on macOS with some of the font directories mentioned. You should find that when the font directories cumulatively exceed 700MB you’ll encounter OOM exceptions unless you bump xmx really high.

@nuix

I have create an issue with ID SLIDESJAVA-38350 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.