Testing JSFML on a university machine, I ran into an access violation when setting an empty string on a Text. I added some debug info output and it turned out this way:
http://pastebin.com/fJHQHFdtThe native method that sets the string on the sf::Text object suceeds, however, after doing so it crashes. Apparently, the destructor of the locally allocated sf::String runs into a free() call for something that was never allocated.
The operating system on the machine in question is Debian Squeeze. More exactly:
$ cat /etc/lsb-release
DISTRIB_ID=Debian
DISTRIB_RELEASE=6.0
DISTRIB_CODENAME=squeeze
DISTRIB_DESCRIPTION="Debian 6.0.6"
$ uname -a
Linux fiws185 2.6.39-bpo.2-686-pae #1 SMP Fri Feb 3 17:37:38 CET 2012 i686 GNU/Linux
I failed to reproduce this in a VM with Debian Squeeze (slightly older and modded Kernel version) and I have never observed this on Windows (obviously, as it seems to be something in glibc that fails).
The code in question is this:
https://github.com/pdinklag/JSFML/blob/master/src/cpp/JNI/org_jsfml_graphics_Text.cpp#L75In Java, a minimal code sample to reproduce the problem would be:
new Text().setString("");
I assume that a C program as simple as that would result in the same error, but I did not have the time yet to set up an SFML working environment on that system yet (compiling SFML on it won't be possible due to the lack of rights to install dev packages).
Can anybody give me a hint on what may be going wrong or can anybody maybe even confirm this?