Hi,
sporadically we get an “InvalidOperationException” while the method call “ChartData.writeWorkbookStream”. During a test, we got this error 16 times out of 431. So, unfortunately, we cannot reproduce it. The use case during the error occurs is quite complex. Basically, it’s about changing ChartData values as we did here:
https://forum.aspose.com/t/changes-in-ichartdataworkbook-result-in-corrupt-workbook/191848/4
- Changing the chart data values by using IChartData.getSeries() and IChartData.getCategories().
- Changing the workbook values by using IChartData.readWorkbookStream() and IChartData.writeWorkbookStream(byte[]).
This is done with certain parallelism:
- one thread per PowerPoint
- one thread per slide
- one thread per shape (e.g. Chart)
I’m not sure if the parallelism is the problem. But it might be…
Can you explain a bit why / how the InvalidOperationException occurs during writeWorkbookStream?
Meanwhile we are investigating the issue further. Maybe we can find a pattern or a way to reliably reproduce it.
This is the stack trace
com.aspose.slides.exceptions.InvalidOperationException: out of sync
at com.aspose.slides.Collections.Generic.Dictionary$Enumerator.for(Unknown Source)
at com.aspose.slides.Collections.Generic.Dictionary$Enumerator.hasNext(Unknown Source)
at com.aspose.slides.Collections.Generic.Dictionary$ValueCollection$Enumerator.hasNext(Unknown Source)
at com.aspose.slides.internal.dd.if.do(Unknown Source)
at com.aspose.slides.internal.dd.if.do(Unknown Source)
at com.aspose.slides.internal.dd.if$1.do(Unknown Source)
at com.aspose.slides.internal.de.do.int(Unknown Source)
at com.aspose.slides.internal.de.try.new(Unknown Source)
at com.aspose.slides.internal.dd.if.do(Unknown Source)
at com.aspose.slides.internal.dd.if.do(Unknown Source)
at com.aspose.slides.anb.do(Unknown Source)
at com.aspose.slides.ano.for(Unknown Source)
at com.aspose.slides.ano.do(Unknown Source)
at com.aspose.slides.ChartDataWorkbook.do(Unknown Source)
at com.aspose.slides.ChartDataWorkbook.(Unknown Source)
at com.aspose.slides.ChartData.do(Unknown Source)
at com.aspose.slides.ChartData.writeWorkbookStream(Unknown Source)
at de.knowis.isf.rep.bl.vorlage.pptx.replace.shape.ChartShapeReplacer.saveWorkbook(ChartShapeReplacer.java:101)
Regards,
Frank