Description
Aspose.PDF random
to throw NullReferenceException
when save some PDF to Docx via Parallel
.
Environment
- Windows 10 .NET 4.7
- Aspose.PDF for .NET 22.12
Code
Parallel.For(1, 6, (i) =>
{
var doc = new Aspose.Pdf.Document(@"C:\Users\XCL\Desktop\test\source" + i + ".pdf");
doc.Save(@"C:\Users\XCL\Desktop\test\target" + i + ".docx", Aspose.Pdf.SaveFormat.DocX);
});
Note
We need to run code above more times ( I ran it 15 times) and we will see the exception:
image.png (186.7 KB)
Test Files
test.zip (277.9 KB)