Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-3555

FlateFilter.decode cause native memory leaks

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.12, 2.0.3, 3.0.0 PDFBox
    • 1.8.13, 2.0.4, 3.0.0 PDFBox
    • None
    • None
    • Debian wheezy 7.11 / oracle JDK 8 - 64 bit / pdfbox 2.0.3

    Description

      The FlateFilter.decode method calls the private method FlateFilter.decompress which instanciates a java.util.zip.Inflater.

      But this method never calls the Inflater.end method so I think the native memory allocated by the Inflater is never released.

      By consequence, the java process memory size keeps growing over time.

      The simplest way we found to fix this is to call the Inflater.end when the inflater has done its job and is not used anymore at the end of FlateFilter.decompress.

      With this fix, the java process memory size remains stable over time.

      Just ask me if more details are needed.

      Attachments

        Activity

          People

            lehmi Andreas Lehmkühler
            Tyoras Yoan Alvarez
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: