Ok, here we go. I figured that since my issue only occurred when the destructor was called, that perhaps the original example in #5 wasn't working because of the main scope.
So here we go, this is the simplest way to recreate the error:
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
void test();
int main()
{
test();
return 0;
}
void test()
{
sf::String s;
sf::Text t;
}
test(8044,0x7fff786ce000) malloc: *** error for object 0x7fff5a3c1a00: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
thats not all folks, another interesting thing is if i comment out the the string line, it appears to get caught in some sort of infinite loop as the program never ends:
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
void test();
int main()
{
test();
return 0;
}
void test()
{
//sf::String s;
sf::Text t;
}
however, comment out the text and only have String, and everything ends up working fine:
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
void test();
int main()
{
test();
return 0;
}
void test()
{
sf::String s;
//sf::Text t;
}
Process finished with exit code 0Just for fun, because I noticed the original error trace mentioned the VertexArray, I went ahead and threw that in there, but it didn't seem to have any affect on the results.
anyway, let me know what you think