Page 1 of 1

Internal error

PostPosted: September 13th, 2016, 9:28 am
by scs
I was clicking on the tab "German Panzer" for some of the game pieces in a module I built
and got an internal error. The module is 11.3 MB. Attached is the error log.

Stewart Strait

Re: Internal error

PostPosted: September 13th, 2016, 9:48 am
by scs
My attempt to attach the file failed, so I renamed it and got it to attach.
My computer is a generic or custom Linux box running Ubuntu 12.04.5 .
I was using Vassal-3.2.16 .
Vassal tried and failed to send an error description to the developers.
I'm not sure how to upload or email the offending module, which is about 11 MB.

The sequence of steps to reproduce the error was
Open Module
[start new game offline was selected]
Click on Pieces
Click on German Panzer (which is a panel inside the tabbed panel Pieces}

Stewart Strait

Re: Internal error

PostPosted: September 14th, 2016, 6:41 am
by scs
A small module is attached which may reproduce the problem.

It gives a somewhat similar error by adding a single SVG game piece to a small previously-ok module.
My previous internal error had all SVG images for game pieces.
In the new example VASSAL gave a non-fatal error message when I clicked FInish, another one when
I clicked Pieces, and had a fatal internal error when I highlighted the one SVG piece. The other pieces are PNG.

I'm attaching the small module.

Below is the SVG file. If it is the problem, proposed fixes would be helpful. Since I probably have hundreds of SVG game piece
images to fix, I hope to fix the script I wrote that generated them.
The module calls it German_124.svg .
It may be irrelevant, but there's no overall height or width, nor any viewBox.
Nevertheless gthumb and the ImageMagick utility "display" have no trouble showing it.

Thanks very much.
Stewart Strait

<svg xmlns=""
<rect x="0" y="0" height="50" width="50"
style="fill: #2020ff"/>
<text xml:space='preserve' x="5" y="12" fill="#000000"
<text xml:space='preserve' x="48" y="32" fill="#000000" transform="rotate(270 48,32)"
style="font-family:Courier-Bold;font-size:13"> 39</text>
<text xml:space='preserve' x="2" y="48"
style="font-family:Courier-Bold;font-size:14">7 7 6</text>
<rect x="3" y="14" height="16" width="26"
stroke="#000000" fill="none"/>
<path d="M 11 17 A 5 5 0 0 0 11 27 L 21 27 A 5 5 0 0 0 21 17 Z" fill="none" stroke="#000000" strokewidt

Re: Internal error

PostPosted: September 14th, 2016, 7:48 am
by scs
It seems to be the fault of the SVG game piece image file, not VASSAL.

I have only tried the small example, but imitating the headers from an SVG game piece in
Uckelman's "The Longest Day" module gave SVG acceptable to VASSAL. I don't understand
most of the details of why this is needed, but it seems to work.

The required changes were:

< <?xml version="1.0" encoding="UTF-8" standalone="no"?>
< <svg
< xmlns:svg=""
< xmlns=""
< xmlns:xlink=""
< width="50" height="50">
< <g>
> <svg xmlns=""
> xmlns:xlink="">
> height="50" width="50"
> <g>

This means begin your SVG file with the lines prefixed with "< " and remove lines beginning with "> ".

I've attached the new,good SVG file.

Re: Internal error

PostPosted: September 14th, 2016, 7:59 am
by scs
VASSAL doesn't object to the SVG file, but the forum software won't let me attach it because it can't determine its
dimensions, despite the height and width statements. I renamed it to a text file and attached it.

Sorry for all the errors.
Stewart Strait

Re: Internal error

PostPosted: September 16th, 2016, 9:59 pm
by uckelman
The cause of your problem is that the svg element lacks widht and height attributes. VASSAL needs those in order to determine the unscaled size of the image.

Re: Internal error

PostPosted: September 17th, 2016, 3:50 am
by scs
Unless Uckelman has some objection, I'm going to recommend that people imitate the xmlns lines in his TLD module's SVG files,
as well as the height and width. Adding just the height and width lines didn't seem to fix the problem, at least if my
bit of experimentation can be trusted.

At any rate it looks like my SVG files work in
VASSAL now. If I have to attach more SVG to forum messages I'll try to be careful of error messages, especially for SVG that
VASSAL doesn't like.

I was too credulous assuming that my SVG was ok merely because the linux utility gthumb and the ImageMagick utility display could handle it. These utilities seem to be too permissive to use for verification.

Thanks for the help.
Stewart Strait