We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Chart.ToImage() Thread Safety Issue

Aspose.Cells 21.7.6.0
.NET 6.0 Windows

There appears to be a thread safety issue with Aspose.Cells.Charts.Chart.ToImage. Adding a lock around the calling code resolves the issue. Stack trace below:

at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at . ( , String )
at . ( , String )
at Aspose.Cells.Drawing.Texts.TextOptions.set_LatinName(String value)
at ​ .​(TextOptions )
at ​ .​(ChartFrame , )
at ​ . ()
at ​ . ()
at ​ . (Chart , Boolean )
at ​ . (Chart , Stream , ImageFormat )
at ​ . (Stream , Chart )
at Aspose.Cells.Charts.Chart.ToImage(Stream stream, ImageOrPrintOptions options)
at QueBIT.ReportWORQ.BusinessLayer.Execution.Excel.WorksheetExtensions.GetChartImage(Worksheet worksheet, String address, Stream stream, Int32 scale) in C:\Users\AndyWeiss\repos\ReportWORQ\QueBIT.ReportWORQ.BusinessLayer\Execution\Excel\WorksheetExtensions.cs:line 265

Thanks,
-Andy

@weissa
Please post your template file here, we will check it soon.

@weissa,

We were able to reproduce the issue as you mentioned. We have logged a ticket with an id “CELLSNET-50266” for your issue. We will look into it soon.

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

@weissa,

This is to inform you that we have fixed your issue (logged earlier as “CELLSNET-50266”) now. The fix will be included in our regular release Aspose.Cells for .NET v22.2 which is scheduled to be published in the second week of February, 2022.

@Amjad_Sahi,
Thank you for the update. We’ll keep an eye out for the new release.

-Andy

@weissa,

You are welcome. You will be notified once the new release is published.

The issues you have found earlier (filed as CELLSNET-50266) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi