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

NPE during page render

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.25
    • 2.0.26, 3.0.0 PDFBox
    • FontBox, Rendering
    • None
    • openjdk 11.0.14 2022-01-18 LTS

    Description

       

      Rendering page causes NPE, opening in debugger gives this stacktrace:

      
      
      java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
          org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.done(PagePane.java:481)
          java.desktop/sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
          java.base/java.security.AccessController.doPrivileged(Native Method)
          java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
      Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
          org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.done(PagePane.java:461)
          java.desktop/sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
          java.base/java.security.AccessController.doPrivileged(Native Method)
          java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
      Caused by: java.lang.NullPointerException: null
          org.apache.fontbox.ttf.GlyfCompositeDescript.getContourCount(GlyfCompositeDescript.java:239)
          org.apache.fontbox.ttf.GlyfCompositeDescript.resolve(GlyfCompositeDescript.java:113)
          org.apache.fontbox.ttf.GlyphTable.getGlyphData(GlyphTable.java:216)
          org.apache.fontbox.ttf.GlyphTable.getGlyph(GlyphTable.java:191)
          org.apache.pdfbox.pdmodel.font.PDCIDFontType2.getPath(PDCIDFontType2.java:418)
          org.apache.pdfbox.pdmodel.font.PDType0Font.getPath(PDType0Font.java:620)
          org.apache.pdfbox.rendering.TTFGlyph2D.getPathForGID(TTFGlyph2D.java:144)
          org.apache.pdfbox.rendering.TTFGlyph2D.getPathForCharacterCode(TTFGlyph2D.java:93)
          org.apache.pdfbox.rendering.PageDrawer.drawGlyph2D(PageDrawer.java:514)
          org.apache.pdfbox.rendering.PageDrawer.showFontGlyph(PageDrawer.java:495)
          org.apache.pdfbox.contentstream.PDFStreamEngine.showGlyph(PDFStreamEngine.java:793)
          org.apache.pdfbox.contentstream.PDFStreamEngine.showGlyph(PDFStreamEngine.java:811)
          org.apache.pdfbox.contentstream.PDFStreamEngine.showText(PDFStreamEngine.java:749)
          org.apache.pdfbox.contentstream.PDFStreamEngine.showTextStrings(PDFStreamEngine.java:654)
          org.apache.pdfbox.contentstream.operator.text.ShowTextAdjusted.process(ShowTextAdjusted.java:53)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:939)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:514)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:492)
          org.apache.pdfbox.contentstream.PDFStreamEngine.showForm(PDFStreamEngine.java:186)
          org.apache.pdfbox.rendering.PageDrawer.showForm(PageDrawer.java:1558)
          org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:85)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:939)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:514)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:492)
          org.apache.pdfbox.contentstream.PDFStreamEngine.showForm(PDFStreamEngine.java:186)
          org.apache.pdfbox.rendering.PageDrawer.showForm(PageDrawer.java:1558)
          org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:85)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:939)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:514)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:492)
          org.apache.pdfbox.contentstream.PDFStreamEngine.showForm(PDFStreamEngine.java:186)
          org.apache.pdfbox.rendering.PageDrawer.showForm(PageDrawer.java:1558)
          org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:85)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:939)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:514)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:492)
          org.apache.pdfbox.contentstream.PDFStreamEngine.showForm(PDFStreamEngine.java:186)
          org.apache.pdfbox.rendering.PageDrawer.showForm(PageDrawer.java:1558)
          org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:85)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:939)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:514)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:492)
          org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:155)
          org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:282)
          org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:355)
          org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.doInBackground(PagePane.java:449)
          org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.doInBackground(PagePane.java:431)
          java.base/java.lang.Thread.run(Thread.java:829)
       

       

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            tilman Tilman Hausherr
            Brunarskyi Maksym
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment