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

Regression: java.lang.IndexOutOfBoundsException in shading

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: Rendering

      Description

      I get this with the attached file, and this didn't happen a few days ago (in PDFBOX-1877):

      25.02.2014 22:25:33.416 WARN [main] org.apache.pdfbox.util.PDFStreamEngine:552 - java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
      java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
      at java.util.ArrayList.rangeCheck(ArrayList.java:635)
      at java.util.ArrayList.get(ArrayList.java:411)
      at org.apache.pdfbox.cos.COSArray.get(COSArray.java:210)
      at org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace.create(PDColorSpace.java:140)
      at org.apache.pdfbox.pdmodel.PDResources.getColorSpaces(PDResources.java:354)
      at org.apache.pdfbox.util.operator.SetNonStrokingColorSpace.process(SetNonStrokingColorSpace.java:48)
      at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:539)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:267)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:234)
      at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:216)
      at org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:147)
      at org.apache.pdfbox.util.RenderUtil.renderPage(RenderUtil.java:225)
      at org.apache.pdfbox.util.RenderUtil.convertToImage(RenderUtil.java:190)
      at pdfboxpageimageextraction.ExtractImages.doPdf(ExtractImages.java:272)
      at pdfboxpageimageextraction.ExtractImages.main(ExtractImages.java:77)
      25.02.2014 22:25:33.418 WARN [main] org.apache.pdfbox.util.PDFStreamEngine:552 - java.lang.ArrayIndexOutOfBoundsException: 0
      java.lang.ArrayIndexOutOfBoundsException: 0
      at java.awt.color.ICC_ColorSpace.toRGB(ICC_ColorSpace.java:179)
      at org.apache.pdfbox.pdmodel.graphics.color.PDDeviceGray.toRGB(PDDeviceGray.java:77)
      at org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace.toPaint(PDColorSpace.java:243)
      at org.apache.pdfbox.pdfviewer.PageDrawer.getNonStrokingPaint(PageDrawer.java:611)
      at org.apache.pdfbox.pdfviewer.PageDrawer.fillPath(PageDrawer.java:684)
      at org.apache.pdfbox.util.operator.pagedrawer.FillNonZeroRule.process(FillNonZeroRule.java:37)
      at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:539)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:267)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:234)
      at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:216)
      at org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:147)
      at org.apache.pdfbox.util.RenderUtil.renderPage(RenderUtil.java:225)
      at org.apache.pdfbox.util.RenderUtil.convertToImage(RenderUtil.java:190)
      at pdfboxpageimageextraction.ExtractImages.doPdf(ExtractImages.java:272)
      at pdfboxpageimageextraction.ExtractImages.main(ExtractImages.java:77)
      25.02.2014 22:25:34.000 WARN [main] org.apache.pdfbox.util.PDFStreamEngine:552 - java.io.IOException: The color space 'COSName

      {R9}' does not exist in the current page's resources
      java.io.IOException: The color space 'COSName{R9}

      ' does not exist in the current page's resources
      at org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace.create(PDColorSpace.java:99)
      at org.apache.pdfbox.util.operator.SetNonStrokingColorSpace.process(SetNonStrokingColorSpace.java:48)
      at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:539)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:267)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:234)
      at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:216)
      at org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:147)
      at org.apache.pdfbox.util.RenderUtil.renderPage(RenderUtil.java:225)
      at org.apache.pdfbox.util.RenderUtil.convertToImage(RenderUtil.java:190)
      at pdfboxpageimageextraction.ExtractImages.doPdf(ExtractImages.java:272)
      at pdfboxpageimageextraction.ExtractImages.main(ExtractImages.java:77)
      25.02.2014 22:25:34.001 WARN [main] org.apache.pdfbox.util.PDFStreamEngine:552 - java.lang.ArrayIndexOutOfBoundsException
      java.lang.ArrayIndexOutOfBoundsException
      25.02.2014 22:25:34.005 WARN [main] org.apache.pdfbox.util.PDFStreamEngine:552 - java.io.IOException: The color space 'COSName

      {R9}' does not exist in the current page's resources
      java.io.IOException: The color space 'COSName{R9}

      ' does not exist in the current page's resources
      at org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace.create(PDColorSpace.java:99)
      at org.apache.pdfbox.util.operator.SetNonStrokingColorSpace.process(SetNonStrokingColorSpace.java:48)
      at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:539)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:267)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:234)
      at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:216)
      at org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:147)
      at org.apache.pdfbox.util.RenderUtil.renderPage(RenderUtil.java:225)
      at org.apache.pdfbox.util.RenderUtil.convertToImage(RenderUtil.java:190)
      at pdfboxpageimageextraction.ExtractImages.doPdf(ExtractImages.java:272)
      at pdfboxpageimageextraction.ExtractImages.main(ExtractImages.java:77)
      25.02.2014 22:25:34.006 WARN [main] org.apache.pdfbox.util.PDFStreamEngine:552 - java.lang.ArrayIndexOutOfBoundsException

        Attachments

        1. raw_image_demo.pdf-1.png
          0.2 kB
          Tilman Hausherr
        2. raw_image_demo.pdf
          6 kB
          Tilman Hausherr
        3. asy-gouraud.pdf-1.png
          11 kB
          Tilman Hausherr
        4. asy-gouraud.pdf
          12 kB
          Tilman Hausherr
        5. pslib-shading.pdf-4.png
          70 kB
          Tilman Hausherr
        6. pslib-shading.pdf-3.png
          195 kB
          Tilman Hausherr
        7. pslib-shading.pdf-2.png
          309 kB
          Tilman Hausherr
        8. pslib-shading.pdf-1.png
          271 kB
          Tilman Hausherr
        9. pslib-shading.pdf
          15 kB
          Tilman Hausherr

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tilman Tilman Hausherr
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: