svgSalamander
svgSalamander copied to clipboard
NPE: "href" is null in Use
I am not sure what exactly is the cause for this problem. But debugging shows that the "href" in the class "Use" is null.
Searching in the SVG (which I may not share) shows this:
<use
href="#Flags"
id="MyId"
x="0"
y="0"
width="100%"
height="100%"
transform="translate(-284.35164,225.73852)" />
This is a file created by inkscape which seems to reference that part:
<defs
id="defs1908">
<symbol
id="Flags"><g [...]
java.lang.NullPointerException
at com.kitfox.svg.SVGUniverse.getElement(SVGUniverse.java:336)
at com.kitfox.svg.SVGUniverse.getElement(SVGUniverse.java:308)
at com.kitfox.svg.Use.getBoundingBox(Use.java:157)
at com.kitfox.svg.Group.calcBoundingBox(Group.java:271)
at com.kitfox.svg.Group.getBoundingBox(Group.java:252)
at com.kitfox.svg.Group.calcBoundingBox(Group.java:271)
at com.kitfox.svg.Group.getBoundingBox(Group.java:252)
at com.kitfox.svg.Group.calcBoundingBox(Group.java:271)
at com.kitfox.svg.Group.getBoundingBox(Group.java:252)
at com.kitfox.svg.SVGRoot.getBoundingBox(SVGRoot.java:380)
at com.kitfox.svg.SVGRoot.prepareViewport(SVGRoot.java:180)
at com.kitfox.svg.SVGRoot.build(SVGRoot.java:159)
at com.kitfox.svg.SVGRoot.updateTime(SVGRoot.java:467)
at com.kitfox.svg.SVGDiagram.updateTime(SVGDiagram.java:243)
at com.kitfox.svg.SVGUniverse.loadSVG(SVGUniverse.java:610)
at com.kitfox.svg.SVGUniverse.loadSVG(SVGUniverse.java:466)
at com.kitfox.svg.SVGUniverse.getDiagram(SVGUniverse.java:401)
at com.kitfox.svg.SVGUniverse.getDiagram(SVGUniverse.java:365)
Would you be able to attach an svg file that demonstrates the problem?