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

NegativeArraySizeException in radial shading

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.6, 1.8.7, 2.0.0
    • 1.8.7, 2.0.0
    • Rendering

    Description

      I get this exception with the attached file:

      java.lang.NegativeArraySizeException
      	at org.apache.pdfbox.pdmodel.graphics.shading.RadialShadingContext.calcColorTable(RadialShadingContext.java:186)
      	at org.apache.pdfbox.pdmodel.graphics.shading.RadialShadingContext.<init>(RadialShadingContext.java:149)
      	at org.apache.pdfbox.pdmodel.graphics.shading.RadialShadingPaint.createContext(RadialShadingPaint.java:68)
      	at sun.java2d.pipe.AlphaPaintPipe.startSequence(AlphaPaintPipe.java:83)	at sun.java2d.pipe.AlphaPaintPipe.startSequence(AlphaPaintPipe.java:83)
      	at sun.java2d.pipe.AAShapePipe.renderTiles(AAShapePipe.java:168)
      	at sun.java2d.pipe.AAShapePipe.renderPath(AAShapePipe.java:159)
      	at sun.java2d.pipe.AAShapePipe.fill(AAShapePipe.java:68)
      	at sun.java2d.pipe.PixelToParallelogramConverter.fill(PixelToParallelogramConverter.java:164)
      	at sun.java2d.pipe.ValidatePipe.fill(ValidatePipe.java:160)
      	at sun.java2d.SunGraphics2D.fill(SunGraphics2D.java:2466)
      	at org.apache.pdfbox.rendering.PageDrawer.shadingFill(PageDrawer.java:984)
      	at org.apache.pdfbox.util.operator.graphics.ShadingFill.process(ShadingFill.java:36)
      

      The cause is a negative radius due to a negative scale in the CTM (see also PDFBOX-2217).

      Attachments

        1. PDFBOX-2344-233644-p10.pdf
          365 kB
          Tilman Hausherr

        Activity

          People

            tilman Tilman Hausherr
            tilman Tilman Hausherr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: