SFML community forums
Help => Graphics => Topic started by: D on January 15, 2012, 01:13:11 am
-
Hi. I compiled SFML2 main branch (from github) today, and discovered a bug that is caused by freeing a non-allocated pointer. The bug occurs after initializing a empty sf::String and when the program is calling its destructor:
#include <SFML/System.hpp>
int main()
{
sf::String s;
return 0;
}
~ ยป ./a.out
a.out(27893) malloc: *** error for object 0x100035300: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
I did a quick glance through SFML's source code, but discovered nothing suspicious. sf::String is just a wrapper around std::basic_string<Uint32> after all...
I'm running OS X 10.6.8, SFML and the executable is in x86_64. Compiling the program in i386 architecture made no difference. I haven't been able to test this on other machines yet.
-
It's a known bug, but it seems to be Apple's fault: https://github.com/SFML/SFML/issues/5
-
Yes, this is indeed issue #5. I just added some more information and a solution to the issue on github.
But still no news from Apple one year after filling a bug repport...
-
Thanks for replies. I didn't go through the issues list, sorry about that. Good to know that the problem lies in Apple's side, although it may take a long time before they will fix it, or if they will...