Details

    • Type: Bug Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: renderer/pcl
    • Labels:
      None
    • Environment:
      Operating System: Windows XP
      Platform: PC
    • External issue ID:
      48062

      Description

      When using multiple threads to render the attached IF XML to PCL using the
      Painter the following exception occurs. The exception does not occur when only
      a single thread is used. In a quick debugging session we observed that when the
      error occurs the method PCLPainter.getTextBoundingBox returns a rectangle with
      negative width

      java.lang.NegativeArraySizeException
      at java.awt.image.DataBufferByte.<init>(DataBufferByte.java:42)
      at java.awt.image.Raster.createInterleavedRaster(Raster.java:253)
      at java.awt.image.Raster.createInterleavedRaster(Raster.java:194)
      at
      org.apache.xmlgraphics.image.loader.impl.ImageConverterG2D2Bitmap.createGrayBufferedImageWithAlpha(ImageConve
      rterG2D2Bitmap.java:170)
      at
      org.apache.xmlgraphics.image.loader.impl.ImageConverterG2D2Bitmap.paintToBufferedImage(ImageConverterG2D2Bitm
      ap.java:108)
      at
      org.apache.xmlgraphics.image.loader.impl.ImageConverterG2D2Bitmap.convert(ImageConverterG2D2Bitmap.java:74)
      at
      org.apache.xmlgraphics.image.loader.pipeline.ImageProviderPipeline.execute(ImageProviderPipeline.java:173)
      at
      org.apache.xmlgraphics.image.loader.ImageManager.convertImage(ImageManager.java:330)
      at
      org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:209)
      at
      org.apache.fop.render.pcl.PCLPainter.paintMarksAsBitmap(PCLPainter.java:304)
      at
      org.apache.fop.render.pcl.PCLPainter.drawTextAsBitmap(PCLPainter.java:489)
      at org.apache.fop.render.pcl.PCLPainter.drawText(PCLPainter.java:329)
      at
      org.apache.fop.render.intermediate.IFParser$Handler$TextHandler.endElement(IFParser.java:487)
      at
      org.apache.fop.render.intermediate.IFParser$Handler.endElement(IFParser.java:277)

      1. input.if
        45 kB
        Chris Bowditch

        Activity

        Hide
        Glenn Adams added a comment -

        resetting P2 open bugs to P3 pending further review

        Show
        Glenn Adams added a comment - resetting P2 open bugs to P3 pending further review
        Hide
        Jeremias Maerki added a comment -

        I can't reproduce the multi-threading problem with various JVMs and settings (3 to 11 threads, client and server VMs etc.) on a Core2Duo.

        Show
        Jeremias Maerki added a comment - I can't reproduce the multi-threading problem with various JVMs and settings (3 to 11 threads, client and server VMs etc.) on a Core2Duo.
        Hide
        Chris Bowditch added a comment -

        Sometimes rendering to PCL also fails with the following error:

        java.lang.ArrayIndexOutOfBoundsException
        at javax.media.jai.PlanarImage.cobbleByte(PlanarImage.java:2785)
        at javax.media.jai.PlanarImage.getData(PlanarImage.java:2067)
        at javax.media.jai.PlanarImage.getData(PlanarImage.java:1922)
        at javax.media.jai.RenderedOp.getData(RenderedOp.java:2222)
        at org.apache.fop.render.pcl.PCLGenerator.paintMonochromeBitmap(PCLGenerator.java:803)
        at org.apache.fop.render.pcl.PCLGenerator.paintBitmap(PCLGenerator.java:757)
        at org.apache.fop.render.pcl.PCLImageHandlerRenderedImage.handleImage(PCLImageHandlerRenderedImage.java:68)
        at org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:227)
        at org.apache.fop.render.pcl.PCLPainter.paintMarksAsBitmap(PCLPainter.java:305)
        at org.apache.fop.render.pcl.PCLPainter.drawTextAsBitmap(PCLPainter.java:490)
        at org.apache.fop.render.pcl.PCLPainter.drawText(PCLPainter.java:330)
        at org.apache.fop.render.intermediate.IFParser$Handler$TextHandler.endElement(IFParser.java:569)
        at org.apache.fop.render.intermediate.IFParser$Handler.endElement(IFParser.java:352)
        at com.thunderhead.util.xml.BufferedContentHandler.endElement(BufferedContentHandler.java:106)

        Show
        Chris Bowditch added a comment - Sometimes rendering to PCL also fails with the following error: java.lang.ArrayIndexOutOfBoundsException at javax.media.jai.PlanarImage.cobbleByte(PlanarImage.java:2785) at javax.media.jai.PlanarImage.getData(PlanarImage.java:2067) at javax.media.jai.PlanarImage.getData(PlanarImage.java:1922) at javax.media.jai.RenderedOp.getData(RenderedOp.java:2222) at org.apache.fop.render.pcl.PCLGenerator.paintMonochromeBitmap(PCLGenerator.java:803) at org.apache.fop.render.pcl.PCLGenerator.paintBitmap(PCLGenerator.java:757) at org.apache.fop.render.pcl.PCLImageHandlerRenderedImage.handleImage(PCLImageHandlerRenderedImage.java:68) at org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:227) at org.apache.fop.render.pcl.PCLPainter.paintMarksAsBitmap(PCLPainter.java:305) at org.apache.fop.render.pcl.PCLPainter.drawTextAsBitmap(PCLPainter.java:490) at org.apache.fop.render.pcl.PCLPainter.drawText(PCLPainter.java:330) at org.apache.fop.render.intermediate.IFParser$Handler$TextHandler.endElement(IFParser.java:569) at org.apache.fop.render.intermediate.IFParser$Handler.endElement(IFParser.java:352) at com.thunderhead.util.xml.BufferedContentHandler.endElement(BufferedContentHandler.java:106)
        Hide
        Chris Bowditch added a comment -

        Attachment input.if has been added with description: IF XML

        Show
        Chris Bowditch added a comment - Attachment input.if has been added with description: IF XML

          People

          • Assignee:
            Unassigned
            Reporter:
            Chris Bowditch
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development