Bug #1575
FormatException on game loading
100%
Description
What happens: FormatException during game loading. Progressbar just stops on Squad/Spaces/mk1PodCockpit/model. Game not crashed.
Text from Debug Console (screenshot in attach):
[Exception]: FormatException: Unknown char: . System.Double.Parse(System.String s, NumberStyles style, IFormatProvider provider) System.Single.Parse(System.String s) PartResourceDefinition.Load(.ConfigNode node) PartResourceDefinitionList.Add(.ConfigNode node) PartResourceLibrary.LoadDefinitions() GameDatabase+.MoveNext()
This only happens with Linux version (Ubuntu 13.04 32bit). I'm not sure about MacOS.
How to reproduce: Set the language of OS to any in which the decimal separator is a comma.
Workaround: Set English language.
Related issues
History
#2 Updated by sr over 10 years ago
- Status changed from New to Duplicate
- % Done changed from 0 to 100
Duplicates #427. Will refer from there to here for the log files.
#3 Updated by tryparse over 10 years ago
I'm not sure that I have the right to teach you, but if it helps ...
Looks like you're using the following code:
double d = double.Parse (".01234");
And it raises a FormatException if
CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator
is a comma.
This should solve the problem:
double d = double.Parse (".01234", CultureInfo.InvariantCulture);
#4 Updated by Vorpal over 10 years ago
I can confirm this issue using LANG=sv_SE.UTF-8. As a workaround I used
LC_ALL=C ./KSP.x86
to run KSP.
#5 Updated by DDDD over 10 years ago
Still an issue in 0.23 (in Ubuntu 13.10).
The workaround to run KSP through Steam is:
LC_ALL=C %command%
#6 Updated by [email protected] about 10 years ago
Still an issue in 0.23 (in Ubuntu 12.04)
Some times game crashing loading screen.
When im using LC_ALL=C KSP.x86_64 command.
#7 Updated by Nyamiou almost 10 years ago
Problem still there in 0.23.5.0 on Debian Sid. Putting "LC_ALL=C command" in Steam launching is a workaround for now.