Hi everyone,the latest security update of Oracle's JDK/JRE 1.7.0_25 breaks many if not all BufferedImageOp.filter implementations.
BATIK 1.7 uses these operations in several places sources/org/apache/batik/ext/awt/g2d/AbstractGraphics2D.java sources/org/apache/batik/ext/awt/image/renderable/ConvolveMatrixRable8Bit.java sources/org/apache/batik/ext/awt/image/renderable/MorphologyRable8Bit.java sources/org/apache/batik/ext/awt/image/rendered/AffineRed.java sources/org/apache/batik/ext/awt/image/rendered/Any2LsRGBRed.java sources/org/apache/batik/ext/awt/image/rendered/Any2LumRed.java sources/org/apache/batik/ext/awt/image/rendered/Any2sRGBRed.java sources/org/apache/batik/ext/awt/image/rendered/ProfileRed.java sources/org/apache/batik/svggen/SVGGraphics2D.javaand consequently BATIK may break down with unexpected "java.awt.image.ImagingOpException: Unable to transform src image" exceptions.
The only workaround I have been able to find so far is patching BATIK sources to no longer call BufferedImageOp.filter directly on the source and destination image, but to filter two ARGB BufferedImage copies.
A corresponding bug report http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8019201 has been filed with Oracle. However, the report does not mention the full extend of this problem - since filing the report, I have found Linux JDKs and additional BufferedImageOp implementations such as AffineTransformOp suffering from this problem, too.
A very simple way to reproduce the problem in BATIK is opening the attached SVG document in squiggle resulting in
java.awt.image.ImagingOpException: Unable to transform src imageat java.awt.image.AffineTransformOp.filter(AffineTransformOp.java:284) at org.apache.batik.ext.awt.image.rendered.AffineRed.genRect(AffineRed.java:193) at org.apache.batik.ext.awt.image.rendered.AffineRed.copyData(AffineRed.java:109) at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(PadRed.java:88) at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(PadRed.java:88) at org.apache.batik.ext.awt.image.rendered.Any2sRGBRed.copyData(Any2sRGBRed.java:166) at org.apache.batik.ext.awt.image.rendered.AbstractRed.getData(AbstractRed.java:526) at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:264) at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:455) at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:549)
at org.apache.batik.gvt.ShapeNode.paint(ShapeNode.java:143)at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165) at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509) at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165) at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509) at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165) at org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(CanvasGraphicsNode.java:159) at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509) at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165) at org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.genRect(GraphicsNodeRed8Bit.java:140) at org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.copyData(GraphicsNodeRed8Bit.java:116) at org.apache.batik.ext.awt.image.rendered.TileCacheRed.genRect(TileCacheRed.java:63) at org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.drawBlockInPlace(AbstractTiledRed.java:629) at org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.drawBlock(AbstractTiledRed.java:544) at org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.copyToRasterByBlocks(AbstractTiledRed.java:430) at org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.copyData(AbstractTiledRed.java:297) at org.apache.batik.ext.awt.image.rendered.TranslateRed.copyData(TranslateRed.java:105) at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(PadRed.java:88) at org.apache.batik.gvt.renderer.StaticRenderer.repaint(StaticRenderer.java:394) at org.apache.batik.gvt.renderer.StaticRenderer.repaint(StaticRenderer.java:344) at org.apache.batik.swing.gvt.GVTTreeRenderer.run(GVTTreeRenderer.java:123)
Kind regards, Thomas -- Thomas Behr phone: +49 7071 9709050 fax: +49 7071 9709051 yWorks GmbH Vor dem Kreuzberg 28 72070 Tuebingen Germany http://www.yworks.com Managing Directors: Sebastian Müller, Michael Pfahler Commercial Registry: Stuttgart, Germany, HRB 382340
<<attachment: test_ImagingOpException_v2.svg>>
--------------------------------------------------------------------- To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org