Internal error

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.

Thanks.
Stewart Strait

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]
Finish
Click on Pieces
Click on German Panzer (which is a panel inside the tabbed panel Pieces}

Thanks
Stewart Strait

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



xxx
39
7 7 6


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:

1,7c1,4
< <?xml version="1.0" encoding="UTF-8" standalone="no"?>
< <svg
< xmlns:svg=“SVG namespace
< xmlns=“SVG namespace
< xmlns:xlink=“XLink namespace
< width=“50” height=“50”>
<


height=“50” width=“50”

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

I’ve attached the new,good SVG file.

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

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.

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