Large conditional formats cause OOM

I’m using aspose-cells for Java version 19.4.

java version “1.8.0_181”
Java™ SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot™ 64-Bit Server VM (build 25.181-b13, mixed mode)

I have a Workbook created in Excel. I’m using aspose-cells for Java to open this Workbook and save as a PDF. However, after about 15 minutes it get an OutOfMemory error.

fatal error: OutOfMemory encountered: Java heap space

I’m running on a machine with 8GB of RAM. My JVM options are:

-Xmx6g -Xms6g -XX:+UseG1GC -XX:+CrashOnOutOfMemoryError

Looking at the error report generated by the JVM it seems like it might be related to the conditional formatting applied to a large range of cells. I’ve attached a synthetically created example which exhibits the same behaviour as I’m unable to share the actual example which original caused this issue.

Are there any save options I can apply to prevent the OOM? Any help would be appreciated.

aspose-cells-sample.zip (2.1 MB)

@tucker.barbour,

Thanks for the template file and details.

After an initial test, I am able to reproduce the issue as you mentioned by using your template file to convert to PDF file format. I got an exception “java.lang.OutOfMemoryError: Java heap space…” after sometime on rendering to PDF file format. I have logged a ticket with an id “CELLSJAVA-42914” for your issue. We will look into it soon.

Once we have an update on it, we will let you know.

@tucker.barbour,

This is to inform you that we have fixed your issue now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

Brilliant. Thank you for the update.

@tucker.barbour,

Please try our latest version/fix: Aspose.Cells for Java v19.5.5 (attached)

Your issue should be fixed in it.

Let us know your feedback.
Aspose_Cells_Java_v19.5.5.zip (6.5 MB)

The issues you have found earlier (filed as CELLSJAVA-42914) have been fixed in Aspose.Cells for Java 19.6. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi