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

NegativeArraySizeException in radial shading

    Details

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

      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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: