This is not a direct answer to the question, but a solution to the problem. It turned out that a recent iCloud update caused this problem, see this post, for example:
https://discussions.apple.com/thread/5356698
So, there are two solutions, one of which renames ShellStreams.dll , and the other completely removes iClould (if it is not used in any case).
The actual protection that can be used makes setlocale() just thread-global instead of process-global:
_configthreadlocale(_ENABLE_PER_THREAD_LOCALE)
It worked in a simple test application, but not in the real world (so this is not a real solution for us).
The most reliable way to solve this problem if you cannot remove iCloud is to use the "_l" functions that work using a specific locale:
_locale_t localeInfo = _create_locale(LC_NUMERIC, "C"); _sprintf_l(string, format, localeInfo, number); _free_locale(localeInfo);
source share