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

JBIG2Filter is creating an ImageInputStream (with temp file) and not closing it

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.4, 2.0.0
    • 1.8.5, 2.0.0
    • None
    • None
    • Java 1.6.0.
      levigo-jbig2-imageio-1.6.1.jar

    Description

      Our application is processing JBIG2 encoded PDFs and is not restarted on a regular basis. When calling pdPage.convertToImage() a temporary file is created and never closed. After some time, the limit (1024 in our case) for open file handles is being hit and we cannot process any more documents. I debugged the code and found the culprit to be pdfbox/filter/JBIG2Filter.java. It is calling ImageIO.createImageInputStream() to create a new ImageInputStream for the ImageReader, but this stream is never being closed. A temporary file is being created (/tmp/imageio<randomNumber>.tmp) as part of this call and remains open if the stream isn't closed.

      Attachments

        1. JBIG2Filter.patch
          5 kB
          Tim Cameron

        Activity

          People

            Unassigned Unassigned
            tcame051 Tim Cameron
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: