Live data from Hacker News

KSP2 is spamming the Windows Registry until the game stops working

forum.kerbalspaceprogram.com

171–180 of 306 posts

Re: KSP2 is spamming the Windows Registry until the game stops working

#171
post #30

Honestly when the brains come together on hackernews to reverse engineer and unfuck a high profile videogame I get unreasonably excited. The guy that fixed the GTAV loading times via identifying a broken JSON loop downloading cosmetics was astonishing to me

People doing work on their own free time to fix a corporation's mistakes for them gets you excited?

He did say "unreasonably"

Re: KSP2 is spamming the Windows Registry until the game stops working

#172

Earlier quoted context omitted.

KSP1 is really complete, especially if you are using OKAN and common mods that people install. I don't understand what they are trying to do with KSP2 to begin with. Skeptical from the start and it somehow turned out worse.

The only complaint for modded KSP1 I have is loading times. I'm surprised devs didn't properly optimized that part.

that's a reasonable trade-off, to make a game that is so extensibly mod-able.

Re: KSP2 is spamming the Windows Registry until the game stops working

#173

Earlier quoted context omitted.

Where do you store where the application-specific KV stores are located? Are you just going to hard-code it so the application cannot be moved or installed elsewhere or on external drives? Where does the OS store its own settings? There are a lot of problems with software "shotgunning" their junk across the system. This isn't exclusive to the Registry or even a specific OS unfortunately. Just go look at what configur…

macOS has a folder called Library where this stuff is supposed to go. It's not enforced by decree, with many apps doing their own horrible thing. Ultimately, its macOS' culture that mostly makes apps puts their settings and other resident details in Library. I'm not knowledgeable enough to know why a culturally enforced folder is far worse than the database that Windows has. Care to enlighten me?

Linux has ~/.local, ~/.config, and ~/.cache for user-specific program files. Sadly many programs don't respect these and pollute your home directory instead.

Re: KSP2 is spamming the Windows Registry until the game stops working

#174

Everyone seems to love shitting on KSP2, when the same people forget what KSP1 was like in Alpha. No science, shitty graphics, excessively wobbly rockets, inconsistent orbits, (other than graphics) seems familiar? It took a looooong time for KSP1 to get where it is now, it will also take awhile for KSP2 to be as polished. Chill out.

So you're saying the KSP2 devs had the benefit of being able to look at the past mistakes and issues of their predecessor, and still failed to learn from it?

Stop defending the billion dollar corporations, please.

Re: KSP2 is spamming the Windows Registry until the game stops working

#175
post #134

Earlier quoted context omitted.

The performance part is questionable, as is the discoverability: Programs write binary blobs to impossible-to-find keys and, as we see here, there's nothing preventing a severe loss of performance if the program writes too much to the registry. It can only be examined with specialized tools, and, due to the binary values written to it, it might not be meaningfully editable at all.

There's also no mechanism for the OS to offer the user the ability to purge registry entries when a program is uninstalled, so the registry just bloats further and further.

Registry bloat was one of the reasons why reinstalling Windows used to speed up computers in the 95-2000 times.

Re: KSP2 is spamming the Windows Registry until the game stops working

#176
post #104

Earlier quoted context omitted.

> what is the windows registry and why do things need to write to it? It's a centralized, high-performance small key value store that's the alternative to writing a million config files in random places. It's arguably much better in my experience. E.g. one of the never-ending headaches I always have on Linux is updating config files when a package updates. There's no automatic file merge in general (hence .pacnew and…

What's always annoyed me with many operating systems is this need to organize based on function instead of domain. If I install an application named "Bob" then I want ALL of Bob's configuration to live within Bob. I don't want it split between different registry keys or /usr/local, /etc/, /var, /lib, etc. I'm fine with there being conventions and categorizations, but I'd like to root node to be the application itself…

[dead]

Re: KSP2 is spamming the Windows Registry until the game stops working

#177

Earlier quoted context omitted.

> what is the windows registry and why do things need to write to it? It's a centralized, high-performance small key value store that's the alternative to writing a million config files in random places. It's arguably much better in my experience. E.g. one of the never-ending headaches I always have on Linux is updating config files when a package updates. There's no automatic file merge in general (hence .pacnew and…

"high-performance" We might have differing opinions about that. (I've got experience for example in Windows kernel mode drivers and service development.)

[dead]

Re: KSP2 is spamming the Windows Registry until the game stops working

#178

Earlier quoted context omitted.

> REALLY fucking sucks at being database, and slows down quickly with sizing up. This is over 20-years out of date.

Then why does KSP2 spamming the registry with orphaned entries eventually cause KSP2 to hang on launch?

[dead]

Re: KSP2 is spamming the Windows Registry until the game stops working

#179
post #76

Earlier quoted context omitted.

Coming from a Linux background, what is the windows registry and why do things need to write to it? All I ever read about it seem to be horror stories. Can't you store stuff alongside the install? Or in some user data location?

The database-backed configuration mechanism makes a ton of sense, and if you squint, the filesystem is really kind of a database anyway. With the registry, there’s a lot you get for free—you can set defaults system-wide, you don’t have to deal with parsing, you can get new values without re-parsing a file, etc. A lot of the horror stories came from earlier versions of Windows which had problems with reliability. If y…

[dead]

Re: KSP2 is spamming the Windows Registry until the game stops working

#180
post #4

One of the comments mentions this: "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" So, somebody didn't notice a "changes every game" instance ID was in the path and/or data. They thought…

“create_or_update pattern considered harmful,” so they say. Actually I kind of do believe this, but separating the two doesn’t always solve the whole problem if you’re creating on every startup rather than only once on, say, profile creation or new game or something.

I would say, using something that doesn't belong to you as a primary key considered harmful. Create or update is a good pattern for robustness (eg so a troubleshooting user won't brick the app by deleting or renaming the key), if you can guarantee the uniqueness of the primary key. You can't constrain some identifier from a different system.
Post reply on HN