Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a window with empty string title causes a crash #387

Closed
ritave opened this issue May 7, 2013 · 1 comment
Closed

Creating a window with empty string title causes a crash #387

ritave opened this issue May 7, 2013 · 1 comment

Comments

@ritave
Copy link

ritave commented May 7, 2013

Tested on OS X 10.6.8

Minimal example:

#include <SFML/Window.hpp>

int main()
{
    sf::Window w(sf::VideoMode(100,100),"");
}

The error is:

malloc: *** error for object 0x100074360: pointer being freed was not allocated

and happens in sf::String destructor as backtrace from gdb is as follows:

#0  0x00007fff889990b6 in __kill ()
#1  0x00007fff88a399f6 in abort ()
#2  0x00007fff88951195 in free ()
#3  0x0000000100001765 in __gnu_cxx::new_allocator<char>::deallocate (this=0x7fff5fbff68f, __p=0x100074360 "") at new_allocator.h:97
#4  0x00000001000017b1 in std::basic_string<unsigned int, std::char_traits<unsigned int>, std::allocator<unsigned int> >::_Rep::_M_destroy (this=0x100074360, __a=@0x7fff5fbff6ef) at basic_string.tcc:431
#5  0x0000000100001813 in std::basic_string<unsigned int, std::char_traits<unsigned int>, std::allocator<unsigned int> >::_Rep::_M_dispose (this=0x100074360, __a=@0x7fff5fbff6ef) at basic_string.h:238
#6  0x0000000100001844 in std::basic_string<unsigned int, std::char_traits<unsigned int>, std::allocator<unsigned int> >::~basic_string (this=0x7fff5fbff7a0) at basic_string.h:493
#7  0x000000010000186d in sf::String::~String (this=0x7fff5fbff7a0) at String.hpp:44
#8  0x0000000100001528 in main () at temp.cpp:5
@mantognini
Copy link
Member

See #5 and #384.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants