You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Eilein Grasp <bl...@digiverse.net> on 2004/07/14 02:54:00 UTC

NullPointerException with Filter

I have an SVG file saved from Illustrator that I've added a (blur) filter to (in the defs element) and a circle that references that filter. The SVG (which I'm sorry I can't quote here or upload right now) consists of text, tspan, path and group elements with this filtered circle on top. It all displays fine in the Adobe viewer, but in Batik's JSVGCanvas I get a NPE:

java.lang.NullPointerException	at org.apache.batik.gvt.filter.BackgroundRable8Bit.addBounds(Unknown Source)	at org.apache.batik.gvt.filter.BackgroundRable8Bit.getViewportBounds(Unknown Source)	at org.apache.batik.gvt.filter.BackgroundRable8Bit.getViewportBounds(Unknown Source)	at org.apache.batik.gvt.filter.BackgroundRable8Bit.getViewportBounds(Unknown Source)	at org.apache.batik.gvt.filter.BackgroundRable8Bit.getBounds2D(Unknown Source)	at org.apache.batik.ext.awt.image.renderable.PadRable8Bit.createRendering(Unknown Source)	at org.apache.batik.ext.awt.image.renderable.PadRable8Bit.createRendering(Unknown Source)	at org.apache.batik.ext.awt.image.renderable.GaussianBlurRable8Bit.createRendering(Unknown Source)	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source)	at org.apache.batik.ext.awt.image.renderable.PadRable8Bit.paintRable(Unknown Source)	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source)	at org.apache.batik.ext.awt.image.renderable.PadRable8Bit.paintRable(Unknown Source)	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source)	at org.apache.batik.ext.awt.image.renderable.FilterChainRable8Bit.paintRable(Unknown Source)	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source)	at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)	at org.apache.batik.gvt.ShapeNode.paint(Unknown Source)	at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)	at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)	at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)	at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)	at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)	at org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(Unknown Source)	at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)	at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)	at org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.genRect(Unknown Source)	at org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.copyData(Unknown Source)	at org.apache.batik.ext.awt.image.rendered.TranslateRed.copyData(Unknown Source)	at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(Unknown Source)	at org.apache.batik.gvt.renderer.DynamicRenderer.repaint(Unknown Source)	at org.apache.batik.gvt.renderer.StaticRenderer.repaint(Unknown Source)	at org.apache.batik.swing.gvt.GVTTreeRenderer.run(Unknown Source)

I'm trying to isolate the element responsible but it's quite a complex layout with lots of elements so meanwhile I would ask -- has anyone else had this problem ?

_____________________________________________________________
yourname@digiverse.net
http://www.digiverse.net

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: NullPointerException with Filter

Posted by Nikhil Dinesh <ni...@seas.upenn.edu>.
<snip> make that "viewbox"

On Tue, 13 Jul 2004, Nikhil Dinesh wrote:

> If your svg document doesnt have an explicit "viewport" declaration this
> might cause the exception. This is one source of NullPointerExceptions
> that Ive noticed.
>
> -Nikhil
>
> On Tue, 13 Jul 2004, Eilein Grasp wrote:
>
> > I have an SVG file saved from Illustrator that I've added a (blur) filter to (in the defs element) and a circle that references that filter. The SVG (which I'm sorry I can't quote here or upload right now) consists of text, tspan, path and group elements with this filtered circle on top. It all displays fine in the Adobe viewer, but in Batik's JSVGCanvas I get a NPE:
> >
> > java.lang.NullPointerException	at org.apache.batik.gvt.filter.BackgroundRable8Bit.addBounds(Unknown Source)	at org.apache.batik.gvt.filter.BackgroundRable8Bit.getViewportBounds(Unknown Source)	at org.apache.batik.gvt.filter.BackgroundRable8Bit.getViewportBounds(Unknown Source)	at org.apache.batik.gvt.filter.BackgroundRable8Bit.getViewportBounds(Unknown Source)	at org.apache.batik.gvt.filter.BackgroundRable8Bit.getBounds2D(Unknown Source)	at org.apache.batik.ext.awt.image.renderable.PadRable8Bit.createRendering(Unknown Source)	at org.apache.batik.ext.awt.image.renderable.PadRable8Bit.createRendering(Unknown Source)	at org.apache.batik.ext.awt.image.renderable.GaussianBlurRable8Bit.createRendering(Unknown Source)	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source)	at org.apache.batik.ext.awt.image.renderable.PadRable8Bit.paintRable(Unknown Source)	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source)	at org.apache.batik.ext.awt.image.renderable.PadRable8Bit.paintRable(Unknown Source)	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source)	at org.apache.batik.ext.awt.image.renderable.FilterChainRable8Bit.paintRable(Unknown Source)	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source)	at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)	at org.apache.batik.gvt.ShapeNode.paint(Unknown Source)	at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)	at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)	at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)	at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)	at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)	at org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(Unknown Source)	at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)	at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)	at org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.genRect(Unknown Source)	at org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.copyData(Unknown Source)	at org.apache.batik.ext.awt.image.rendered.TranslateRed.copyData(Unknown Source)	at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(Unknown Source)	at org.apache.batik.gvt.renderer.DynamicRenderer.repaint(Unknown Source)	at org.apache.batik.gvt.renderer.StaticRenderer.repaint(Unknown Source)	at org.apache.batik.swing.gvt.GVTTreeRenderer.run(Unknown Source)
> >
> > I'm trying to isolate the element responsible but it's quite a complex layout with lots of elements so meanwhile I would ask -- has anyone else had this problem ?
> >
> > _____________________________________________________________
> > yourname@digiverse.net
> > http://www.digiverse.net
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: batik-users-help@xml.apache.org
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Re: NullPointerException with Filter

Posted by Nikhil Dinesh <ni...@seas.upenn.edu>.
If your svg document doesnt have an explicit "viewport" declaration this
might cause the exception. This is one source of NullPointerExceptions
that Ive noticed.

-Nikhil

On Tue, 13 Jul 2004, Eilein Grasp wrote:

> I have an SVG file saved from Illustrator that I've added a (blur) filter to (in the defs element) and a circle that references that filter. The SVG (which I'm sorry I can't quote here or upload right now) consists of text, tspan, path and group elements with this filtered circle on top. It all displays fine in the Adobe viewer, but in Batik's JSVGCanvas I get a NPE:
>
> java.lang.NullPointerException	at org.apache.batik.gvt.filter.BackgroundRable8Bit.addBounds(Unknown Source)	at org.apache.batik.gvt.filter.BackgroundRable8Bit.getViewportBounds(Unknown Source)	at org.apache.batik.gvt.filter.BackgroundRable8Bit.getViewportBounds(Unknown Source)	at org.apache.batik.gvt.filter.BackgroundRable8Bit.getViewportBounds(Unknown Source)	at org.apache.batik.gvt.filter.BackgroundRable8Bit.getBounds2D(Unknown Source)	at org.apache.batik.ext.awt.image.renderable.PadRable8Bit.createRendering(Unknown Source)	at org.apache.batik.ext.awt.image.renderable.PadRable8Bit.createRendering(Unknown Source)	at org.apache.batik.ext.awt.image.renderable.GaussianBlurRable8Bit.createRendering(Unknown Source)	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source)	at org.apache.batik.ext.awt.image.renderable.PadRable8Bit.paintRable(Unknown Source)	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source)	at org.apache.batik.ext.awt.image.renderable.PadRable8Bit.paintRable(Unknown Source)	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source)	at org.apache.batik.ext.awt.image.renderable.FilterChainRable8Bit.paintRable(Unknown Source)	at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source)	at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)	at org.apache.batik.gvt.ShapeNode.paint(Unknown Source)	at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)	at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)	at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)	at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)	at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)	at org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(Unknown Source)	at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown Source)	at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)	at org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.genRect(Unknown Source)	at org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.copyData(Unknown Source)	at org.apache.batik.ext.awt.image.rendered.TranslateRed.copyData(Unknown Source)	at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(Unknown Source)	at org.apache.batik.gvt.renderer.DynamicRenderer.repaint(Unknown Source)	at org.apache.batik.gvt.renderer.StaticRenderer.repaint(Unknown Source)	at org.apache.batik.swing.gvt.GVTTreeRenderer.run(Unknown Source)
>
> I'm trying to isolate the element responsible but it's quite a complex layout with lots of elements so meanwhile I would ask -- has anyone else had this problem ?
>
> _____________________________________________________________
> yourname@digiverse.net
> http://www.digiverse.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org