Hi support,
I detect some memory leak when I use SaveAsPdf in a loop.
The memory increase until 1.7 Gb just before OutOfMemoryException occurred during the 1442 document loop.
May be it’s the similar 6863 problem.
I join one of the 2000 identical .docx file
Here is my C# code :
using System;
using Aspose.Words;
namespace MyconsoleAppLoop
{
class Program
{
static void Main(string[] args)
{
Aspose.Words.License license = new Aspose.Words.License();
license.SetLicense("Aspose.Words.lic");
int loop = 1;
if (args.Length > 1) int.TryParse(args[1], out loop);
for (int i = 1; i <= loop; i++)
{
Console.WriteLine(i);
string fileNameDocX = args[0] + "." + i + ".docx";
string fileNamePdf = args[0] + "." + i + ".pdf";
Console.WriteLine("Debut " + fileNameDocX);
Aspose.Words.Document mDocument;
mDocument = new Aspose.Words.Document(fileNameDocX);
mDocument.Save(fileNamePdf);
Console.WriteLine("Fin");
}
}
}
}
Hi
Thanks for your request. I cannot reproduce the problem on my side. I used the following code for testing:
Document doc = new Document(@"Test085\cpestel.docx");
doc.Save(@"Test085\out.pdf");
Conversion takes a second or less. Are you sure, you attached a correct file? Also maybe you can provide some additional information that will allow me to reproduce the problem.
Best regards.
Hi
Thank you for additional information. I managed to reproduce the problem and created new issue #7179 in our defect database.
It takes 3662 iterations to reproduce the problem on my side.
Best regards.
I don’t use garbage. See my code in this thread.
If I try with another docx document, memory don’t increase during 2000 iterations.
The problem occur only with cpestel.docx document.
Hi
Thanks for additional information and interest to this issue. We will further investigate the problem and provide you more information.
Best regards.
Hi Alex,
We still facing some pdf redition problem with Aspose.words version 8.0 similar as version 6.2, currently we are using Aspose.words 5.3, are you still supporting version 5.3?
Thanks,
Christina
Thanks for your request. You can use old versions of Aspose.Words if you are satisfied with them. But you should note, all fixes and new feature are always added in new versions only.
Could you please attach the document, which will allow me to reproduce the memory leak issue?
Best regards.