Create account / Log in

Internal error

Issues with the Vassal engine.

Moderators: uckelman, Tim M

Internal error

Postby scs » September 13th, 2016, 9:28 am

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
scs
 
Posts: 52
Joined: August 3rd, 2010, 10:01 am
Location: San Diego, CA

Re: Internal error

Postby scs » September 13th, 2016, 9:48 am

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
Attachments
errorLog.txt
(73.53 KiB) Downloaded 171 times
scs
 
Posts: 52
Joined: August 3rd, 2010, 10:01 am
Location: San Diego, CA

Re: Internal error

Postby scs » September 14th, 2016, 6:41 am

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="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<rect x="0" y="0" height="50" width="50"
style="fill: #2020ff"/>
<text xml:space='preserve' x="5" y="12" fill="#000000"
style="font-family:Courier-Bold;font-size:13">xxx</text>
<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
h="2"/>
</svg>
Attachments
svg-plus-small168_new.vmod
(67.3 KiB) Downloaded 134 times
scs
 
Posts: 52
Joined: August 3rd, 2010, 10:01 am
Location: San Diego, CA

Re: Internal error

Postby scs » September 14th, 2016, 7:48 am

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="http://www.w3.org/2000/svg"
< xmlns="http://www.w3.org/2000/svg"
< xmlns:xlink="http://www.w3.org/1999/xlink"
< width="50" height="50">
< <g>
---
> <svg xmlns="http://www.w3.org/2000/svg"
> xmlns:xlink="http://www.w3.org/1999/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.
scs
 
Posts: 52
Joined: August 3rd, 2010, 10:01 am
Location: San Diego, CA

Re: Internal error

Postby scs » September 14th, 2016, 7:59 am

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
Attachments
german124_svg.txt
(837 Bytes) Downloaded 232 times
scs
 
Posts: 52
Joined: August 3rd, 2010, 10:01 am
Location: San Diego, CA

Re: Internal error

Postby uckelman » September 16th, 2016, 9:59 pm

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.
User avatar
uckelman
Site Admin
 
Posts: 8880
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Internal error

Postby scs » September 17th, 2016, 3:50 am

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
scs
 
Posts: 52
Joined: August 3rd, 2010, 10:01 am
Location: San Diego, CA


Return to Technical Support & Bugs

Who is online

Users browsing this forum: uckelman and 5 guests