KSP-CKAN / CKAN

The Comprehensive Kerbal Archive Network
https://forum.kerbalspaceprogram.com/index.php?/topic/197082-*
Other
1.99k stars 348 forks source link

[Bug]: Updating from 3 year old version causes registry corruption (not related to old version or registry) #4212

Closed Hornsoup closed 1 month ago

Hornsoup commented 1 month ago

Is there an existing issue for this?

Operating System

Windows 11

CKAN Version

Latest

Games

KSP 1

Game Version

1.12

Did you make any manual changes to your game folder (i.e., not via CKAN)?

No response

Describe the bug

Updated CKAN from a version about 3 years old. After updating, the newer version corrupted the registry and now I can't use any version. I've deleted the entire CKAN folder but it still has the issue.

Steps to reproduce

  1. Use CKAN version from Sept 2021
  2. Download latest version.
  3. Registry entries are corrupted.

Relevant log output

Unhandled Exception: ValveKeyValue.KeyValueException: Found end of file when another token type was expected. ---> System.InvalidOperationException: Attempted to finalize object while in state InObjectBetweenKeyAndValue.
   at ValveKeyValue.Deserialization.KV1TextReader.FinalizeCurrentObject(Boolean explicit)
   at ValveKeyValue.Deserialization.KV1TextReader.FinalizeDocument()
   at ValveKeyValue.Deserialization.KV1TextReader.ReadObject()
   --- End of inner exception stack trace ---
   at ValveKeyValue.Deserialization.KV1TextReader.ReadObject()
   at ValveKeyValue.KVSerializer.Deserialize(Stream stream, KVSerializerOptions options)
   at CKAN.SteamLibrary.<>c__DisplayClass3_0.<LibraryPathGames>b__0(String acfFile)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()
   at System.Linq.Enumerable.<ConcatIterator>d__59`1.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at CKAN.SteamLibrary..ctor()
   at CKAN.GameInstanceManager..ctor(IUser user, IConfiguration configuration)
   at CKAN.CmdLine.MainClass.Execute(GameInstanceManager manager, CommonOptions opts, String[] args)
   at CKAN.CmdLine.MainClass.Main(String[] args)
HebaruSan commented 1 month ago

Duplicate of #4197