Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Text.setString("") crashes on mac
Print
Pages: [
1
]
Author
Topic: Text.setString("") crashes on mac (Read 2185 times)
0 Members and 1 Guest are viewing this topic.
texus
Hero Member
Posts: 505
Text.setString("") crashes on mac
«
on:
March 31, 2012, 02:08:40 pm »
I noticed that calling Text.setString with an empty string gives my a SIGABRT.
However, when passing '\0' instead of "" it worked correctly.
The SIGABRT comes from "/usr/include/c++/4.2.1/ext/new_allocator.h" on line 97, which is the deallocate function.
I am working on Mac OS X Lion with Xcode 4.3.2.
Logged
TGUI
: C++ SFML GUI
Laurent
Administrator
Hero Member
Posts: 32498
Re: Text.setString("") crashes on mac
«
Reply #1 on:
March 31, 2012, 07:00:22 pm »
https://github.com/SFML/SFML/issues/5
?
Logged
Laurent Gomila - SFML developer
texus
Hero Member
Posts: 505
Re: Text.setString("") crashes on mac
«
Reply #2 on:
March 31, 2012, 07:12:12 pm »
It is indeed the same bug.
I forgot to look at the bug tracker, I only quickly searched on the forum.
Thanks for pointing me to the right place.
Logged
TGUI
: C++ SFML GUI
MonkeyKnight
Newbie
Posts: 14
Re: Text.setString("") crashes on mac
«
Reply #3 on:
May 02, 2012, 05:53:39 pm »
Texus,
What I have done is extend the sf::Text class, and add setString("something"); in the destructor. There may be some pitfalls, and I understand it s a hack. But it is a workaround that has been seeming to work until the actual bug is fixed.
Logged
texus
Hero Member
Posts: 505
Re: Text.setString("") crashes on mac
«
Reply #4 on:
May 02, 2012, 07:17:30 pm »
It would be better not to use such a hack.
The current workaround "Add -D_GLIBCXX_FULLY_DYNAMIC_STRING=1 to CMAKE_CXX_FLAGS" is better in my opinion.
Logged
TGUI
: C++ SFML GUI
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Text.setString("") crashes on mac