Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      We have an issue in our Java editor for OpenStreetMap (http://josm.openstreetmap.de/ticket/8742) where we are unable to load an SVG file.

      The issue is an NPE caused in TSpan class:
      {{
      java.lang.NullPointerException
      at com.kitfox.svg.Tspan.addShape(Tspan.java:172)
      at com.kitfox.svg.Text.buildSysFont(Text.java:420)
      at com.kitfox.svg.Text.buildFont(Text.java:271)
      at com.kitfox.svg.Text.build(Text.java:236)
      at com.kitfox.svg.Text.updateTime(Text.java:561)
      at com.kitfox.svg.Group.updateTime(Group.java:309)
      at com.kitfox.svg.Group.updateTime(Group.java:309)
      at com.kitfox.svg.Group.updateTime(Group.java:309)
      at com.kitfox.svg.SVGRoot.updateTime(SVGRoot.java:296)
      at com.kitfox.svg.SVGDiagram.updateTime(SVGDiagram.java:230)
      at com.kitfox.svg.SVGUniverse.loadSVG(SVGUniverse.java:593)
      at com.kitfox.svg.SVGUniverse.loadSVG(SVGUniverse.java:459)
      at com.kitfox.svg.SVGUniverse.getDiagram(SVGUniverse.java:393)
      at com.kitfox.svg.SVGUniverse.getDiagram(SVGUniverse.java:363)
      }}

      y appears to be null here:

          public void addShape(GeneralPath addShape) throws SVGException
          {
              if (x != null)
              {
                  cursorX = x[0];
                  cursorY = y[0];
              } else if (dx != null)
              {
                  cursorX += dx[0];
                  cursorY += dy[0];
              }
      

      We currently use an old version of svgsalamander (r97 svn) but upgrading to current release (0.1.17, r156) soes not resolve the issue.

        Activity

        Hide
        donvip added a comment -
        Show
        donvip added a comment - File is attached here: http://josm.openstreetmap.de/raw-attachment/ticket/8742/svg_test.zip
        Hide
        kitfox added a comment -

        I updated the code. This should be handled now.

        Show
        kitfox added a comment - I updated the code. This should be handled now.

          People

          • Assignee:
            Unassigned
            Reporter:
            donvip
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: