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

Regression: NoSuchElementException in PDFXrefStreamParser

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.29, 3.0.0 PDFBox
    • 2.0.30, 3.0.0 PDFBox
    • Parsing
    • None

    Description

      Tilman ran our regressions tests due to the upcoming final release of 3.0.0. It reveals an issue with the PDFXrefStreamParser. I've attached one of the affected files

      java.util.NoSuchElementException
      at org.apache.pdfbox.pdfparser.PDFXrefStreamParser$ObjectNumbers.next(PDFXrefStreamParser.java
      at org.apache.pdfbox.pdfparser.PDFXrefStreamParser.parse(PDFXrefStreamParser.java:129)
      at org.apache.pdfbox.pdfparser.COSParser.parseXrefObjStream(COSParser.java:445)
      at org.apache.pdfbox.pdfparser.COSParser.parseXref(COSParser.java:382)
      at org.apache.pdfbox.pdfparser.COSParser.retrieveTrailer(COSParser.java:225)
      at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:127)
      at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:184)
      at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:156)
      at org.apache.pdfbox.Loader.loadPDF(Loader.java:466)
      at org.apache.pdfbox.Loader.loadPDF(Loader.java:348)
      at org.apache.pdfbox.Loader.loadPDF(Loader.java:303)
      at o.a.t.parser.pdf.PDFParser.getPDDocument(PDFParser.java:499)
      at o.a.t.parser.pdf.PDFParser.getPDDocument(PDFParser.java:471)
      at o.a.t.parser.pdf.PDFParser.parse(PDFParser.java:193)
      at o.a.t.parser.CompositeParser.parse(CompositeParser.java:298)
      at o.a.t.parser.CompositeParser.parse(CompositeParser.java:298)
      at o.a.t.parser.AutoDetectParser.parse(AutoDetectParser.java:203)
      at o.a.t.parser.ParserDecorator.parse(ParserDecorator.java:152)
      at o.a.t.parser.DigestingParser.parse(DigestingParser.java:57)
      at o.a.t.parser.RecursiveParserWrapper.parse(RecursiveParserWrapper.java:164)
      at o.a.t.batch.FileResourceConsumer.parse(FileResourceConsumer.java:375)
      at o.a.t.batch.fs.RecursiveParserWrapperFSConsumer.processFileResource(RecursiveParserWrapperFSConsumer.java:98)
      at o.a.t.batch.FileResourceConsumer._processFileResource(FileResourceConsumer.java:152)
      at o.a.t.batch.FileResourceConsumer.call(FileResourceConsumer.java:87)
      at o.a.t.batch.FileResourceConsumer.call(FileResourceConsumer.java:50)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      at java.base/java.lang.Thread.run(Thread.java:829)
      

      Attachments

        1. IT54KKRKJBTDPS2MOXLUNUDP3G2BEDGD.pdf
          659 kB
          Andreas Lehmkühler

        Activity

          People

            lehmi Andreas Lehmkühler
            lehmi Andreas Lehmkühler
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: