Project

General

Profile

Bug #1575

FormatException on game loading

Added by tryparse over 10 years ago. Updated almost 10 years ago.

Status:
Duplicate
Severity:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
10/18/2013
% Done:

100%

Version:
Platform:
Linux
Expansion:
Language:
English (US)
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

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.

FormatException screenshot .png (639 KB) FormatException screenshot .png [email protected] tryparse, 10/18/2013 09:20 AM
KSP.log (68.2 KB) KSP.log [email protected] tryparse, 10/18/2013 09:20 AM
Player.log (174 KB) Player.log [email protected] tryparse, 10/20/2013 02:22 PM
KSP.log (68.2 KB) KSP.log [email protected] [email protected], 01/30/2014 12:34 AM
1821

Related issues

Is duplicate of Kerbal Space Program - Bug #427: Linux: Parsing of float values in Part config files dependent on localeClosed03/17/2013

History

#1 Updated by tryparse over 10 years ago

+Player.log

#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.

Also available in: Atom PDF