Jump to content

KSP2 is Spamming the Windows Registry Over Weeks/Months Until the Game Will Stop Working Permanently


Anth

Recommended Posts

Reported Version: v0.1.4 (latest) | Mods: none | Can replicate without mods? Yes 
OS: Windows 10 | CPU: i9 9900K | GPU: 3070ti | RAM32GB

Main Issue:
KSP2 will throw a PlayerPrefsException error when the game's registry Key/Entries is filled up with too much information,
At that point KSP2 will never again complete the initial load into the main menu.

Whats Happening:
KSP2 is adding information every time a SOI change happens or if a save file has been loaded. 
It all appears to be similar information repeated again and again.

Screenshot of Spam:

Spoiler

Registry.png.e513540784dfdcc0b12141462743c5eb.png

Timeline:
24 February 2023:
0.1.0.0 to 0.1.2.0 KSP2 started fine.
22 July 2023:
0.1.3.0 the PlayerPrefsException started happening but I wasn't sure what the cause was.
I fixed it by creating a new local account on my computer.
23 September 2023:
It happened again with the new local account.

Important Information:
It only took two months to get to this point this last time.
Once others start playing KSP2 more regularly it will only be a matter of time until others have the same problem.

 

 

Workaround:
Delete using regedit:
HKEY_CURRENT_USER\SOFTWARE\Intercept Games\
Be warned though, deleting the wrong thing can stop applications from working, or even break the entire operating system.


Files:
The following is the registry entries for 0.1.0.0 until when 0.1.3.0 stopped the game from loading into the main menu (322mb):
(Changed from reg file to text file)
KSP2RegistryEntries.txt

Log file created yesterday:
Ksp2.log

Unity Links:
PlayerPrefs Information:
https://docs.unity3d.com/ScriptReference/PlayerPrefs.html

PlayerPrefsException error:
https://docs.unity3d.com/ScriptReference/PlayerPrefsException.html

Edited by Anth12
Link to comment
Share on other sites

There are 260,962 chunks of that spam in the registry entry file , and it is all location and rotation data. 
{"LatLong":{"x":-0.8384310007095337,"y":-75.07933807373047},"RotationEuler":{"x":0.0,"y":0.0,"z":0.0},"Rotation":88.0,"VerticalOffset":0.0,"LocalScale":{"x":800.0,"y":120.0,"z":800.0}}

{"LatLong":{"x":-0.8447363972663879,"y":-75.01181030273438},"RotationEuler":{"x":0.0,"y":0.0,"z":0.0},"Rotation":83.0,"VerticalOffset":0.0,"LocalScale":{"x":700.0,"y":150.0,"z":800.0}}

{"LatLong":{"x":-0.814041793346405,"y":-75.11915588378906},"RotationEuler":{"x":0.0,"y":0.0,"z":0.0},"Rotation":140.0,"VerticalOffset":0.0,"LocalScale":{"x":500.0,"y":200.0,"z":600.0}}

Link to comment
Share on other sites

Alright, doing some investigating it seems that they are saving the Pqs preferences based off of the instance ID of the pqs object, which, according to unity's own documentation, changes between runs of the game, hence why its saving 10 trillion different copies of the same data

Update: On doing even more investigating, I have come to the conclusion that it is vestigial side effects of part of an editor tool that wasn't supposed to be in the game, and could easily just be removed

Edited by cheese3660
Concluded what it was
Link to comment
Share on other sites

Upvoted.

I agree with others. This should be moved to the very top of the priority list immediately. @Dakota, perhaps we need a new category for bugs that cause chaos outside the game? This is a whole other level of Not OK, transcending the impact of any other class of bug. It's universal in its horrible badness. Other bugs, even really persistent and nasty ones like wobbly rockets, orbital decay, etc., can constrain the kind of craft you build or mission plans, but this is a class of bug that can make the game simply not start at all, and worse it does so by creating an issue for the OS.

I hope the fix for this one is simple!

Link to comment
Share on other sites

Wow, this is crazy. It took my system (installed on a pretty fast M.2 SSD) about 5 seconds to load and display the registry node (and I hardly play KSP 2 ever). I had so many entries that I was wondering how my system still works....

Please fix this. The registry is a crucial part of the operating system and seeing it being (ab)used to store masses of not needed data is "concerning" (the only word I can think of that does not get me banned here instantly....).

I will not touch this game anymore until this is confirmed to be fixed. Thank you so much, @Anth12 for finding and reporting this bug!

Link to comment
Share on other sites

ARE THEY INSANE??!!

I know professional developers who recommend .ini files over the registry “so you can never get blamed for messing up the registry” and [snip] use it as if it where a Temp file?! And that is on top of gargantuan game save files? “Save files were getting too big so we're using the registry instead.” Wow. You couldn't come up with this when asked for a list of  “stupid things no developer ever should do” and yet here we are. I'm liquided they're wrecking the KSP legacy but now I'm  PO'd they're trying to wreck my PC as well.

I have the habit of briefly playing KSP2 after each update until I get disgusted with it (that doesn't take long, as you can imagine). Now I even don't want to do that and I'm seriously considering uninstalling the game until this is fixed.

In my (and assuming everyone's)  book this is not something that can wait two months until the next patch; fixing this warrants its own hot patch rolled out as fast as humanly possible. I didn't think anything could surpass the current state of the game as a bad reflection on the dev team, but here it is. They truly outdid themselves.

@Anth12 thank you for uncovering this.

Edited by Vanamonde
Link to comment
Share on other sites

What a bunch of "Hacks".  

This should be stickied on the Store page under the KSP2 Steam reviews so people can be aware before buying.  Maybe someone should let the Steam admins know.

Why am I not surprised.

 

And Thank you for finding this.

Link to comment
Share on other sites

39 minutes ago, Kerbart said:

and these clowns use it as if it where a Temp file?!

This does not seem to be the case here, what they were doing makes sense, using unities player preferences to store what should be a small amount of stuff, but their implementation of it has a bug that makes it that they are storing it in a different key each time

Link to comment
Share on other sites

TBH, I wouldn't feel safe running this title on my personal computer.  It has been uninstalled for 3 months.

This kind of reinforces some people's opinions that the engineering team on KSP2 are not competent enough to finish this game regardless of how long they take.   

Link to comment
Share on other sites

Outa curiosity..   Who in their right mind is so fond of KSP2 right now, they will risk running a game that is spamming the registry and then on top of it, run some random person's code to delete blocks of reg data?

Unreal and absolutely pathetic.  

Edited by Buzz313th
Link to comment
Share on other sites

1 hour ago, cheese3660 said:

This does not seem to be the case here, what they were doing makes sense, using unities player preferences to store what should be a small amount of stuff, but their implementation of it has a bug that makes it that they are storing it in a different key each time

Your argument has merit, but what stands is that they were exceptionally careless in checking what was written to the registry. Your sleuthing suggets an instance ID which sounds to me as something very volatile and changing — how could they use that? Was this simply a typo? And what else did they get wrong? It's not an exact vote of confidence for the code.

Link to comment
Share on other sites

1 hour ago, cheese3660 said:

This does not seem to be the case here, what they were doing makes sense, using unities player preferences to store what should be a small amount of stuff, but their implementation of it has a bug that makes it that they are storing it in a different key each time

I would argue that using the registry for this type of data isn’t the place it should be in the first place since I don’t see how it is relevant to the overall application instead of a particular save. 

Link to comment
Share on other sites

×
×
  • Create New...