I try to make a module with a map based on an .svg file but Vassal does report errors while loading the .svg file and I have no idea on how to fix things. I googled around and searched archives but could not find a solution. Any advise is welcome.
This is what I did. (system en file details are availabe at the end of this message).
I created a simple .svg file with Inkscape v0.91, the image contains two objects, a white rectacle and a red circle in it.
I use that as a map file in Vassal v3.2.16
When I try to start a new game with the file as map the screen reports a loading problem and the log gives me the details.
An attribute in the root tag of the XML file is not accepted.
So I don’t think that the `problem’ is with my machine but I’m looking for version mismatches. Does the current version of Inkscape work with the current version of Vassal? Or is this a known issue? (If so, it is not discussed much, no hits on it in Google)
- Bad Data in Module: Error reading image testdrawing.svg
2016-06-24 16:49:48,561 [1-AWT-EventQueue-0] WARN VASSAL.tools.ErrorDialog - Error reading image: testdrawing.svg
2016-06-24 16:49:48,564 [1-AWT-EventQueue-0] ERROR VASSAL.tools.ErrorDialog -
VASSAL.tools.image.ImageIOException: images\testdrawing.svg
at VASSAL.tools.image.svg.SVGImageUtils.getImageSize(SVGImageUtils.java:115) ~[Vengine.jar:na]
...
at java.awt.EventDispatchThread.run(Unknown Source) [na:1.8.0_91]
Caused by: java.lang.NumberFormatException: For input string: "210mm"
at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source) ~[na:1.8.0_91]
at sun.misc.FloatingDecimal.parseFloat(Unknown Source) ~[na:1.8.0_91]
at java.lang.Float.parseFloat(Unknown Source) ~[na:1.8.0_91]
at VASSAL.tools.image.svg.SVGImageUtils.getImageSize(SVGImageUtils.java:107) ~[Vengine.jar:na]
...
Looks like the ‘floating point’ format for the image in the root tag (!?) is not acceptable.
<svg ... width="210mm" ...
Any suggersion to get this working is welcome.
Kind regards,
André Steenveld.
Machine details: (I also tested this on a laptop with different specs, same results)
ASSUS X99-E, i7-5960X at 3GHz, 64GB RAM
NVIDIA GeForce GTX 980 Ti with Dell P2415W(HDMI)
Windows 10 Pro, Java version 1.8.0_91
Here are the top lines from the VASSAL log
2016-06-24 16:54:44,021 [0-main] INFO VASSAL.launch.StartUp - Starting
2016-06-24 16:54:44,023 [0-main] INFO VASSAL.launch.StartUp - OS Windows 10 10.0
2016-06-24 16:54:44,023 [0-main] INFO VASSAL.launch.StartUp - Java version 1.8.0_91
2016-06-24 16:54:44,023 [0-main] INFO VASSAL.launch.StartUp - VASSAL version 3.2.16
2016-06-24 16:54:44,082 [0-AWT-EventQueue-0] INFO VASSAL.launch.ModuleManager - Manager
2016-06-24 16:54:44,435 [0-SwingWorker-pool-30550028-thread-1] INFO VASSAL.launch.AbstractLaunchAction - Loading module file T:\andre\Vassal\Urr\SoUrr-0.1.vmod
2016-06-24 16:54:44,487 [0-SwingWorker-pool-30550028-thread-1] INFO VASSAL.launch.TilingHandler - No images to tile.
2016-06-24 16:54:44,488 [0-SwingWorker-pool-30550028-thread-1] INFO VASSAL.launch.AbstractLaunchAction - Loading module Siege of Urr
2016-06-24 16:54:44,493 [0-SwingWorker-pool-30550028-thread-1] INFO VASSAL.tools.io.ProcessLauncher - launching E:\Program Files (x86)\Java\jre1.8.0_91\bin\java -Xms256M -Xmx1024M -DVASSAL.id=1 -DVASSAL.port=13549 -Duser.home=C:\Users\andre -Duser.dir=C:\Program Files\VASSAL-3.2.16 -cp lib\Vengine.jar VASSAL.launch.Player --load -- T:\andre\Vassal\Urr\SoUrr-0.1.vmod
2016-06-24 16:54:44,902 [1-main] INFO VASSAL.launch.StartUp - Starting
2016-06-24 16:54:44,905 [1-main] INFO VASSAL.launch.StartUp - OS Windows 10 10.0
2016-06-24 16:54:44,906 [1-main] INFO VASSAL.launch.StartUp - Java version 1.8.0_91
2016-06-24 16:54:44,906 [1-main] INFO VASSAL.launch.StartUp - VASSAL version 3.2.16
2016-06-24 16:54:44,906 [1-main] INFO VASSAL.launch.Launcher - Player
2016-06-24 16:54:45,923 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - VASSAL images folder found at jar:file:/C:/Program%20Files/VASSAL-3.2.16/lib/Vengine.jar!/images/
2016-06-24 16:54:45,926 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family network-server created for network-server.png
2016-06-24 16:54:45,926 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family go-down created for go-down.png
2016-06-24 16:54:45,926 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family network-idle created for network-idle.png
2016-06-24 16:54:45,926 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family VASSAL created for VASSAL.png
2016-06-24 16:54:45,926 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family calculator created for calculator.png
2016-06-24 16:54:45,927 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family go-up created for go-up.png
2016-06-24 16:54:45,927 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family VASSAL-jabber created for VASSAL-jabber.png
2016-06-24 16:54:45,927 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family jabber created for jabber.png
2016-06-24 16:54:45,927 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family bug created for bug.png
2016-06-24 16:54:45,927 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family yes created for yes.svg
2016-06-24 16:54:45,927 [1-IconFactory-preload] INFO VASSAL.tools.icon.IconFactory - Icon family no created for no.svg
...
Here is the raw XML data from the immage.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="210mm"
height="297mm"
viewBox="0 0 744.09448819 1052.3622047"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="testdrawing.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35"
inkscape:cx="-52.142857"
inkscape:cy="520"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#f9f9f9;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect4136"
width="431.42856"
height="288.57144"
x="105.71429"
y="132.3622" />
<ellipse
style="fill:#ff0000;stroke:#000000;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4138"
cx="330"
cy="273.79077"
rx="107.14286"
ry="104.28571" />
</g>
</svg>
Java configuration: