Concurrency Issue in Aspose Cell while saving any excel file as HTML file in multithreaded environment

Concurrency Issue in Aspose Cell while saving any excel file as HTML in multithreaded environment

In multithreaded environment workbook.save function is hanging and utilizing 100% CPU. Here is the thread dump

ReportGen-Thread:0" prio=10 tid=0x00002ab6f16b7800 nid=0x6bd3 runnable [0x000000004490e000]

java.lang.Thread.State: RUNNABLE

at java.util.HashMap.get(HashMap.java:303)

at com.aspose.cells.kS.a(Unknown Source)

at com.aspose.cells.kw.f(Unknown Source)

at com.aspose.cells.kw.c(Unknown Source)

at com.aspose.cells.kw.e(Unknown Source)

at com.aspose.cells.km.a(Unknown Source)

at com.aspose.cells.km.a(Unknown Source)

at com.aspose.cells.km.b(Unknown Source)

at com.aspose.cells.km.a(Unknown Source)

at com.aspose.cells.ko.b(Unknown Source)

at com.aspose.cells.ko.a(Unknown Source)

at com.aspose.cells.kp.a(Unknown Source)

at com.aspose.cells.Workbook.save(Unknown Source)

Code : Aspose Version : 7.4.2

Workbook workbook = new Workbook();

workbook.open(new ByteArrayInputStream(//excel file)));

workbook.calculateFormula();

HtmlSaveOptions options = new HtmlSaveOptions();

options.setHiddenColDisplayType(HtmlHiddenColDisplayType.HIDDEN);

options.setHiddenRowDisplayType(HtmlHiddenColDisplayType.HIDDEN);

workbook.save(filename, options);



Hi,


Please try our latest version/fix: Aspose.Cells for Java v8.2.2.3 if it makes any difference.

We think when calling Workbook.save() method in multi-threading, it might product different errors based on your scenario including this one too.

For your information, if you are saving the same workbook object in multiple threads, many issue will be occurred if you change/modify it in multi-threads. We are not entirely sure whether you are saving the same workbook or different workbook objects in multiple threads and also are you saving the file to the same location and with different file names or with same file names? We always recommend our users to use different workbook objects in different threads on a safer side.

If you got the same issue with our latest version/fix, could you create a sample JAVA console program (runnable) with your template file(s) (if any) to reproduce the issue on our end. Also, give us the stack trace of the error, which will make it easier for us to trace the issue on our end, we will check it soon.

Thank you.

Thanks for you response.


We are using different workbook objects , not sharing workbook object.

We will try to upgrade the package to 8.2.2.3 and see.


Thanks for you response.


We are using different workbook objects , not sharing workbook object.

We will try to upgrade the package to 8.2.2.3 and see.