SVG not working - and crashing Vassal

  • Operating System XP SP2
  • CPU Dual Core 2GHz
  • Memory 2G
  • Video Card GeForce 8600
  • Vassal version. (Go to Help and select About VASSAL) 3.1.10
  • Java version. 1.6.0_15
  • New Module
  • Exactly what steps are required to reproduce your problem. If you are reporting on a problem that you can’t reproduce consistently, include as much information as possible about what you were doing right before the error occurred.

When I place an SVG image for a counter it doesn’t show up. Even if I delete the counter, Vassal crashes with “Bad Data in Module error reading xxx.svg” when I try to save it.

The SVG comes from Illustrator CS3. (I attached it, but had to change the extension to zip to get it to upload.)

Thus spake “Saladin”:

Please post the image so we can try it.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

The image is attached. I just changed the extension from svg to zip because your board won’t allow svgs to be posted.

On Oct 1, 2009, at 2:27 PM, Saladin wrote:

It didn’t get attached.

There is this two-step process needed to actually attach the file.
You have to choose the file and then click “Add Attachment”.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

It is there on forum, however after renaming back to svg when I open it in
Illustrator I get invalid file, your svg may be corrupt

Post generated using Mail2Forum (mail2forum.com)

On Oct 1, 2009, at 3:12 PM, Tim McCarron wrote:

OK. I’ve looked at it using an XML editor (XML mode in Emacs) and the
file does not validate.
There are undefined XML namespace prefixes in use, in particular

<sodipodi:namedview id=“base”></sodipodi:namedview>

which appears (with the same id) 16 times in the file.

Was this file perhaps generated by inkscape?

I tried using inkscape, but had an X11 library version incompatibility
problem using the Apple X11 server.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

It is also a rather large file, with a number of items in it.

Attached is what gimp rendered for it.

A lot of garbage in there from the file I copied the counter from (I thought), but it came from Illustrator CS3. I’ll make a new file and try again.

The problem apparently is in the British Ensign that I downloaded from online as an svg and then placed in the counter image. When I remove that (and collapse all those unnecessary layers), it works!

I still have a problem however, that if I load an svg it doesn’t like (such as if I forget to collapse all the layers), it gives an error when saving - even after I replace the bad piece - or even delete the entire class.

Thus spake “Saladin”:

I’ll look into this problem when I return home on Monday.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Saladin”:

The problem with your SVG is that it contains about a dozen instances
of this:

<sodipodi:namedview id=“base”></sodipodi:namedview>

If I delete all such lines, it loads fine for me. There’s no need to
collapse layers to get it to work—if it works for you after doing
that, it’s only because these bad lines are removed in the process.

When I add your bad image to a module and try to save it, I get an
error dialog, but VASSAL does not crash for me. We need some more
details about what you’re seeing when this occurs.

I’ve put the problem with saving modules after trying to load faulty
SVG into the bug tracker:

sourceforge.net/tracker/?func=d … tid=594231

This is a fairly serious problem; it will definitely be fixed for 3.2,
but I’m not sure it will be fixed before that.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Saladin”:

The 3.1.12-svn6080 build contains a temporary fix for this problem. It’s
not an ideal fix, as the error message doesn’t really tell you what’s
happening—but now you’ll at least be able to save the module if you’ve
added a bad SVG file.

nomic.net/~uckelman/tmp/vassal/


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)