URGENT: Found memory leak in Aspose.Words For Java (example and document is included) please help

Hi,
The code below, in combination with the attached docx file, demonstrates the Aspose memory leak.
Is there an update of the java component? Can this be fixed because we are planning to purchase this component.
Best regards,
Anouar

\ === === === === === === === === === === === === === === === === === === === ===
import java.io.FileInputStream;
import com.aspose.words.Document;
public class AsposeMemoryLeakDemo
{
    public static void main(String[] args) throws Exception
    {
        String inputFileName = "input.docx";
        String outputFileName = "output.pdf";
        Document inputFile = new Document(new FileInputStream(inputFileName));
        for (int i = 0; i <1000; i++)
        {
            inputFile.save(outputFileName);
            System.out.println("Total memory (bytes): " + Runtime.getRuntime().totalMemory());
        }
    }
}

Hi Anouar,

Thanks for your inquiry. I have tested the scenario with following code snippet and have not found the shared issue while using latest version of Aspose.Words for Java 13.7.0. Please use the latest version of Aspose.Words for Java 13.7.0. Please try the following code snippet at your end with latest version of Aspose.Words and let us know if you still face problem.

String inputFileName = MyDir + "input.docx";
Document inputFile = new Document(new FileInputStream(inputFileName));
for (int i = 0; i <1000; i++)
{
    inputFile.save(MyDir + "Out\\output" + i + ".pdf");
    System.out.println("Total memory (bytes): " + Runtime.getRuntime().totalMemory());
}

Thank you Tahir,

Can it be the fact that I use Java 1.7:

java version “1.7.0_25”
OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.12.04.2)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

Should I use 1.6 instead?

Hi Anouar,

Thanks for your inquiry. I managed to observe a significantly high memory spike during processing/rendering your Word document to many Pdf documents under OpenJDK environment on my side. I have logged a task in our issue tracking system for our development team to investigate the cause of possible memory leaks in Aspose.Words for Java. Your ticket number is WORDSJAVA-770. Your request has also been linked to this task and you will be notified as soon as it is worked out. Sorry for the inconvenience.

Best regards,

Hi Awais.Hafeez,

Have you got any updates regarding this issue? (WORDSJAVA-770)

I hope to hear from you soon.

Hi there anouar,

does your Word file contain embedded images? I got a problem with documents containing images under the 13.7.0 version as well, but this was fixed with the current 13.8.0. Might be worth a try for you too?

Regards
Scherge

Hi Scherge,

I have a signature as an image in each document.
That’s a good idea. I didn’t know I already could download that version.

Thank you.

Hi,

Thanks for your inquiry.

*Anouar:

> Have you got any updates regarding this issue ? (WORDSJAVA - 770) *

Unfortunately, your issue is not resolved yet. Our development team has completed the analysis of this issue and the root cause has been identified. We will inform you via this thread as soon as this issue is resolved. We apologize for any inconvenience.

Scherge:
does your Word file contain embedded images? I got a problem with documents containing images under the 13.7.0 version as well, but this was fixed with the current 13.8.0. Might be worth a try for you too?

Thanks for the additional information. It’s great you were able to find what you were looking for. Please let us know any time you have any further queries. We have just released Aspose.Words for Java 13.8.0 here and you’re welcome to give it a try.

Best regards,

Hi Awais,

Do you have any idea when this issue is going to be resolved? Because we would like to deploy it within a week.

I assume that this issue is still not resolved in 13.8.0?
Right now we are limited to converting only 1000 documents to a pdf, which is basically a small number compared to the 10000 documents we would like to convert.

I hoop to get a reaction or update soon.

Thank you in advance!

Did you try it with version 13.8.0 ?

Worked for me. We had a similar issue with an embedded picture.

Hello Grandel,

I have tried 13.8.0 but I still have the memory leak which is freaking me out

Regards

Anouar

sorry to hear that.

Hi Anouar,

Thanks for your inquiry. Unfortunately, your issue is not resolved yet. I have also intimated our development team of your concern and asked the ETA for this issue. I will try to get a firm estimate on this issue and provide you some further feedback. We apologize for your inconvenience.

Best regards,

Hi Anouar,
Could you please carefully check if problem still exists in 13.8.0?
I have executed the code you provided on the attached input file using OpenJDK 7 and don’t see any memory leak problems.
I have following console output at the beginning and at the end of execution, respectively:
0 Total memory (bytes): 44658688
1 Total memory (bytes): 44658688
2 Total memory (bytes): 44658688

997 Total memory (bytes): 56868864
998 Total memory (bytes): 56868864
999 Total memory (bytes): 56868864

The issues you have found earlier (filed as WORDSJAVA-770) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.