Open adam900710 opened 7 years ago
It's a regression, version 0.7.2.0 works fine.
236c3f05b1270145a0f18314fa6b1caca1937b7d is the first bad commit
Well, I forgot to mention I'm also using Chinese localisation, so I wonder other language is not affected and no tester exposed it yet.
difftool shows me some different in lines and whitespace difference (4 spaces vs 1 tab), but even after I manually modified them, it's still triggering the hang.
While copying en-us.cfg to overwrite zh-cn.cfg definitely fixed the problem, it's definitely the problem of zh-cn.cfg. Very strange here.
@sswelm - you need to sort this please, as it was introduced in your commit.
Extra info, I verified the dict from Squad in GameData/Squad/Localization/dictionary.cfg
, which has UTF-8 BOM, with CRLF as change line.
However the en-us.cfg
is without BOM, with LF only.
I'll try to convert the translation to the same format as Squad to see if it helps
Hi, this file is translated by me, well, in my mind, I think this is because you didn't have KSPFileLocalizer in your GameData.
Is that a mod or something else? At least I can't find such mod.
@EthanWang706 Any extra info about how to fix it?
Here, it's included inside KPBS or Feline Rover
Get from https://github.com/Nils277/KSPModFileLocalizer
Tried, no help. Still loading hang.
Also tried KSPModFileLocalizer from KPBS, still no help.
It feels like I can't fix it, I tried any way that I could think about, if I change it to English, the game will crash, maybe @sswelm @BobPalmer could fix it
We will very likely have to just remove the file if @sswelm cannot do a fix, since as noted, this was a file he introduced (and I had assumed tested).
I still have a few ideas I would like to test to see if we can identify the problem
Alright, there appears to be some translation in the USI and RealFuels section that are causing a crash. I suspect some illegal Chinese character were used, its hard to tell which one, but I will narrow it down
I figured out which Chinese localization were causing problems, I made a pull request of a localisation where I commented out the illigal chinese characters that were causing KSP to crash. I kope to fix the missing localisation later on
I just contact Squad for fixing this issue, it could be found here: https://forum.kerbalspaceprogram.com/index.php?/topic/167052-simple-translations-illegal/
This is pretty much being fixed, for ones that is hard to translate to Chinese, I replaced them with English
Submitted in SQUAD BugTracker #16477
It's been 7 years, and now there's finally a solution to this!
the problem was actually the missing abbreviation
field! not because of some illegal Chinese characters being used.
When the abbreviation
is absent, the game will call a method GetShortName(2)
, which returns displayName.Substring(0, 2)
. Since the length of displayName
is less than 2(the lead's displayName is "铅"), Substring
throws an exception!
So, the fix is simply adding the abbreviation
field within the RESOURCE_DEFINITION
!
For "Lead" example:
RESOURCE_DEFINITION
{
name = Lead
displayName = #LOC_CRP_Lead_DisplayName
abbreviation = #LOC_CRP_Lead_abbreviation // <== HERE!
density = 0.01134
unitCost = 0.067392
hsp = 128
flowMode = ALL_VESSEL
transfer = PUMP
isTweakable = True
isVisible = true
volume = 1
ksparpicon = RealFuels/Resources/ARPIcons/LeadBallast
}
unfortunately, this happens during the ConfigNode loading phase, so I believe it's not possible to use ModuleManager (MM) to apply a patch.
Version: 0.8.0.0 OS: Archlinux KSP version: 1.3.1 KSP.log:
Yes, I have some other small mods, but with only CommunityResourcePack mod, it will cause loading hang. Other mods are: [x] Science MechJeb Kerbal Alarm Clock