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

empty locale might crash #9

Open
kritzikratzi opened this issue Feb 20, 2018 · 3 comments
Open

empty locale might crash #9

kritzikratzi opened this issue Feb 20, 2018 · 3 comments
Assignees

Comments

@kritzikratzi
Copy link
Collaborator

static std::locale loc = std::locale("");

not sure what changed on my system, and not sure when, but currently just doing std::locale("") triggers a SIGABRT. changing it to std::locale("C") fixes it for now.

not pushing because i have no clue what's going on (on another note, the locale could probably be stored in a static variable, might give a tiny speedup to not recreate every time).

@kritzikratzi
Copy link
Collaborator Author

ps. also OF had this issue: openframeworks/openFrameworks#3966

they seem to have fixed it by using the no-args constructor std::locale loc;
https://github.com/openframeworks/openFrameworks/blob/22a42144bc57393bd2f12b607f44e756fa06a1f1/libs/openFrameworks/utils/ofUtils.cpp#L907

@kritzikratzi kritzikratzi self-assigned this Feb 20, 2018
@armadillu
Copy link
Owner

hmm no idea, this looks like something I probably copied & pasted from stack overflow... what platform are you getting this on?

@kritzikratzi
Copy link
Collaborator Author

osx 10.10.x (my old laptop)

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

No branches or pull requests

2 participants