Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-1058

java.awt.image.ImagingOpException on latest java 7 when using Specularlightning

    XMLWordPrintableJSON

Details

    Description

      When using the following filter:

          <filter id="ElementSelectedFilter">
      			<feGaussianBlur in="SourceAlpha" stdDeviation="4" result="blur"/>
      			<feOffset in="blur" dx="4" dy="4" result="offsetBlur"/>
      			<feSpecularLighting in="blur" surfaceScale="5" specularConstant="1" 
                                specularExponent="10" lighting-color="white"  
                                result="specOut">
      				<fePointLight x="-5000" y="-10000" z="20000"/>
      			</feSpecularLighting>
      			<feComposite in="specOut" in2="SourceAlpha" operator="in" result="specOut"/>
      			<feComposite in="SourceGraphic" in2="specOut" operator="arithmetic" 
                         k1="0" k2="1" k3="1" k4="0" result="litPaint"/>
      			<feMerge>
      				<feMergeNode in="offsetBlur"/>
      				<feMergeNode in="litPaint"/>
      			</feMerge>
      		</filter>
      

      In java 1.7.0_40, the filter has no effect and batik is throwing exception below. I suspect oracle changed some thing in their imgLib. I tracked down the problem to the specularLightning element. If i remove it and everything after -> works well. If i add it and display it's result -> crash.

      on java 1.7.0_05 or java 1.6, the issue does not appear.

      Also, on a side note, after that, the refreshing of SVG element when you modify it in the batik updateRunnableQueue, does not work anymore, even if you remove the filter.

      java.awt.image.ImagingOpException: Unable to transform src image
      	at 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.AbstractRed.getData(AbstractRed.java:526)
      	at org.apache.batik.ext.awt.image.rendered.CompositeRed.genRect(CompositeRed.java:188)
      	at org.apache.batik.ext.awt.image.rendered.CompositeRed.copyData(CompositeRed.java:139)
      	at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(PadRed.java:88)
      	at org.apache.batik.ext.awt.image.rendered.CompositeRed.genRect(CompositeRed.java:179)
      	at org.apache.batik.ext.awt.image.rendered.CompositeRed.copyData(CompositeRed.java:139)
      	at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(PadRed.java:88)
      	at org.apache.batik.ext.awt.image.rendered.AbstractRed.getData(AbstractRed.java:526)
      	at org.apache.batik.ext.awt.image.rendered.CompositeRed.genRect(CompositeRed.java:188)
      	at org.apache.batik.ext.awt.image.rendered.CompositeRed.copyData(CompositeRed.java:139)
      	at org.apache.batik.ext.awt.image.rendered.Any2sRGBRed.copyData(Any2sRGBRed.java:166)
      	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:347)
      	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:455)
      	at org.apache.batik.ext.awt.image.renderable.PadRable8Bit.paintRable(PadRable8Bit.java:135)
      	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:440)
      	at org.apache.batik.ext.awt.image.renderable.PadRable8Bit.paintRable(PadRable8Bit.java:135)
      	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:440)
      	at org.apache.batik.ext.awt.image.renderable.FilterChainRable8Bit.paintRable(FilterChainRable8Bit.java:251)
      	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:440)
      	at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:549)
      	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.TranslateRed.copyData(TranslateRed.java:105)
      	at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(PadRed.java:88)
      	at org.apache.batik.gvt.renderer.DynamicRenderer.repaint(DynamicRenderer.java:244)
      	at org.apache.batik.bridge.RepaintManager.updateRendering(RepaintManager.java:91)
      	at org.apache.batik.bridge.UpdateManager.updateRendering(UpdateManager.java:509)
      	at org.apache.batik.bridge.UpdateManager.repaint(UpdateManager.java:572)
      	at org.apache.batik.bridge.UpdateManager$UpdateManagerRunHander.runnableInvoked(UpdateManager.java:870)
      	at org.apache.batik.util.RunnableQueue.runnableInvoked(RunnableQueue.java:543)
      	at org.apache.batik.util.RunnableQueue.run(RunnableQueue.java:251)
      	at java.lang.Thread.run(Thread.java:724)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            delbd David Delbecq
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: