[messages] Edit: [Developers] Re: Roadmap for VASSAL 4

Michael Kiefte mkiefte at dal.ca
Tue May 3 05:31:26 MST 2011

terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct NULL not valid

This is on Ubuntu

That's not the most helpful exception I've ever seen either.

- M.

On 3 May 2011 07:13, uckelman <uckelman at nomic.net> wrote:

> [This message has been edited.]
> I've converted the Python demo I made a few weeks ago to C++. I'm
> posting a link to an archive containing the source code here for anyone
> who wants to try it or have a look. The dependencies are only OpenGL,
> GLUT, and libjpeg. I haven't had time to do a Windows build yet; I
> intend to try that this evening. I'm assuming that anyone on Linux will
> be able to compile this with no problems; hopefully this is also the
> case on Macs.
> http://www.vassalengine.org/~uckelman/cpp-test.tar.bz2[1]
> The good:
> * Fast. The parts which are in software (as opposed to in the graphics
> hardware) are much, much faster than in Python. This is unsurprising,
> but nice to see. The only siginificant thing which happens in software
> in the demos is image loading. The map image I've been using for testing
> is 8149x3514. On my laptop, it takes about 5 seconds to load this image
> in Python; in C++, libjpeg loads it in under one second.
> * Very low RAM usage. Image data takes up close to 100% of the memory
> the demo uses. (This is similar to VASSAL.) The test map is about 81MB
> in memory. However, once we've carved it into texture tiles and handed
> those off to OpenGL, we can free all the memory we allocated to store
> image data---OpenGL stores textures in video RAM. The demo was using
> about 7MB RAM for me after image loading was finished; the max was
> around 150MB (for a few seconds) during tile carving.
> * Little code. The C++ demo is about 1200 lines, which is approximately
> twice the number that the Python demo has. Half of the extra "code"
> comes from lines which are blank or have only a curly brace on them (332
> lines); the rest comes from the code which gets data from libjpeg and
> from managing OpenGL handles properly rather than leaking them.
> The bad:
> * I'm not seeing any bad, yet, actually.
> The ugly:
> * Building for multiple platforms. I can (probably) make Windows builds
> on Linux using the mingw cross-compiler. I've done that once before, for
> mkhexgrid. I have no idea whether I can cross-compile on Linux for Mac
> OS. I'd very much like to be able to build for all platforms in once
> place.
> [1] http://www.vassalengine.org/~uckelman/cpp-test.tar.bz2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vassalengine.org/pipermail/messages/attachments/20110503/8d96c6ac/attachment.html>

More information about the messages mailing list