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

[PATCH] ArrayIndexOutOfBoundsException in multithreaded system

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Cannot Reproduce
    • 2.0.0
    • 2.0.0
    • FontBox
    • None

    Description

      When it loads replacement font from OS i sometimes get:

      Exception in thread "Thread-27" java.lang.ArrayIndexOutOfBoundsException: 40036
      at org.apache.fontbox.ttf.GlyfSimpleDescript.readFlags(GlyfSimpleDescript.java:197)
      at org.apache.fontbox.ttf.GlyfSimpleDescript.<init>(GlyfSimpleDescript.java:78)
      at org.apache.fontbox.ttf.GlyphData.initData(GlyphData.java:58)
      at org.apache.fontbox.ttf.GlyphTable.getGlyph(GlyphTable.java:161)
      at org.apache.pdfbox.rendering.font.TTFGlyph2D.getPathForGID(TTFGlyph2D.java:140)
      at org.apache.pdfbox.rendering.font.TTFGlyph2D.getPathForCharacterCode(TTFGlyph2D.java:92)
      at org.apache.pdfbox.rendering.PageDrawer.drawGlyph2D(PageDrawer.java:392)
      at org.apache.pdfbox.rendering.PageDrawer.showGlyph(PageDrawer.java:372)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.showText(PDFStreamEngine.java:411)
      at org.apache.pdfbox.rendering.PageDrawer.showText(PageDrawer.java:346)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.showTextStrings(PDFStreamEngine.java:322)
      at org.apache.pdfbox.contentstream.operator.text.ShowTextAdjusted.process(ShowTextAdjusted.java:38)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:482)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processSubStream(PDFStreamEngine.java:236)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processSubStream(PDFStreamEngine.java:201)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:155)
      at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:177)
      at org.apache.pdfbox.rendering.PDFRenderer.renderPage(PDFRenderer.java:228)
      at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:160)
      at org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:109)

      Attachments

        1. TestPDFBox.java
          2 kB
          Simon Steiner
        2. ttfparrallel.patch
          1 kB
          Simon Steiner

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ssteiner Simon Steiner
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: