Hello,
it occurs to me that I have got a nasty problem with String2D.
Whenever the text length of the String2D object is greater than 15, the program crashes when reading the text from the Text property (the problem seems to lie in the layer between the .Net and C libraries). The proper error message would be
Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein Hinweis darauf, dass anderer Speicher beschädigt ist.
bei SFML.Graphics.String2D.sfString_GetText(IntPtr This)
bei SFML.Graphics.String2D.get_Text()
As one might see, this is German. The translation would be something like "It was tried to read or write protected memory. This often is caused by corrupted memory." More or less at least
Consider the following code:
String2D str = new String2D();
str.Text = "1234567890123456"; // str.Length == 16
string a = str.Text; // Crash
What makes me a bit surprised is the fact, there is no problem at all, unless the String2D.Text.Length is greater 15. Also, this only happens in the get Element of the Text property. The text can be set accurate and is also properly displayed, when invoked by a Draw command.
Now I am wondering whether this is a known bug or feature (?) or am I simply missing something to config? I even tried to change the standard font to something else, as I read there was a problem with the standard font (I image that had something to do with SFML 1.6 as I stumbled upon that problem, when I was programming in C++).
Note: I am currently using Windows Vista, Visual Studio 2008 Prof. with SFML.Net 1.6.