Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE: "href" is null in Use #41

Open
jschneider opened this issue Feb 8, 2019 · 1 comment
Open

NPE: "href" is null in Use #41

jschneider opened this issue Feb 8, 2019 · 1 comment

Comments

@jschneider
Copy link

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)
@blackears
Copy link
Owner

Would you be able to attach an svg file that demonstrates the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants