https://bugs.winehq.org/show_bug.cgi?id=56854
Bug ID: 56854 Summary: VCarve 12 pops up 100+ error dialogs on start in some non-English locales Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com Distribution: ---
VCarve 12 pops up 100+ error dialogs on start in some non-English locales. More specifically this happens when the decimal separator is not a dot, for instance for French (fr_FR.UTF-8) where it is a comma. What happens is the following:
* VCarve has some built-in resource strings containing parameters in XML format. * Among the parameters some are scaling factors such as "0.0166" and "0.001". * VCarve calls atof() to parse those but in locales where the decimal separator is not a dot it gets 0. * VCarve then pops up an error dialog complaining the resource is invalid because 0 is not a valid scaling factor. * atof() would succeed parsing the string if it was using the C locale. * However VCarve calls setlocale() many times and one of the last is setlocale(LC_ALL, "French_France.1252") which is why atof() expects a comma.
Further notes: * As far as I can tell atof() is called by the application (or Visual C++ 2015 library) not Wine code. * VCarve calls setlocale() many times. It gets the locale name from a setlocale(LC_ALL, "") call but keeps calling setlocale() many times after. * Shortly before the failing atof() call it does: setlocale(LC_ALL, NULL); setlocale(LC_ALL, "C"); setlocale(LC_ALL, "French_France.1252"); * VCarve has other threads that also manipulate the locale. However all the above calls happen in the same thread. * Another VCarve thread calls setlocale() between pairs of _configthreadlocale(_ENABLE_PER_THREAD_LOCALE) and _configthreadlocale(_DISABLE_PER_THREAD_LOCALE). But these calls don't necessarily overlap with the failing atof() and and preceding setlocale(LC_ALL, "French_France.1252").
The failure can be reproduced with the trial Pro edition and happens in both 64-bit and 32-bit versions.
https://bugs.winehq.org/show_bug.cgi?id=56854
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |http://www.vectric.com/prod | |ucts/vcarve/trial.html Keywords| |download