Issue description:
For some DXF files the library .NET ASPOSE.CAD (version 20.7.0-20.9.1) hangs forever (or at least for hours) while consuming CPU.
This issue was introduced with version 20.7.0 (20.6.0 doesn’t display this issue) and is present in the latest version 20.9.1.
This problem is critical because it has affected negatively the servers’ perfomance in which ASPOSE.CAD was utilized to convert DXF files to images when there were DXF files that trigger the issue.
I had to downgrade the library referenced in our project to version 20.6.0 as a stopgap solution.
Versions which present this issue:
.NET ASPOSE.CAD 20.7.0 - 20.9.1
Code snippet for testing:
using (Aspose.CAD.FileFormats.Cad.CadImage cadImage = (Aspose.CAD.FileFormats.Cad.CadImage)Aspose.CAD.Image.Load(filename))
{
Aspose.CAD.Rectangle rect = cadImage.Bounds;
var options = new Aspose.CAD.ImageOptions.JpegOptions();
Aspose.CAD.ImageOptions.CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions()
{
BackgroundColor = Aspose.CAD.Color.White,
PageHeight = 1000,
PageWidth = 1000,
DrawType = Aspose.CAD.FileFormats.Cad.CadDrawTypeMode.UseObjectColor
};
options.VectorRasterizationOptions = rasterizationOptions;
// save DXF as a JPEG
cadImage.Save(Path.GetDirectoryName(filename) + "\\" + Path.GetFileNameWithoutExtension(filename) + ".jpg", options);
}
File DXF for testing: see attachment
191333-03.zip (146.8 KB)