-
Notifications
You must be signed in to change notification settings - Fork 54
Installing Rift twice will cause the Minecraft Launcher to become corrupt #51
Comments
The problem is very likely that profiles.json brcomes corrupt because the installer uses RegeEx!!!! to insert the profile. |
@Janrupf What does Regular Expressions have to do with becoming corrupt? Sure, it's not the best thing to use, but it does work. As for why it's being corrupted, I have a few ideas and will have to look into it further. @MrCrayfish did you already have a Rift profile made inside the launcher when you were making said tutorial? Like, was it still there when you made the tutorial? |
With the RegEx I mean it just replaces/adds and doesn't check for already existing profiles. Couldn't Gson just be used for reading the profile data? |
Yes, I think using a structured parser/writer like GSON is better than manually inserting/replacing values. |
@ZombieHDGaming Yes, the Rift profile was already there before I recorded the tutorial. That's how I encountered the issue. |
Unfortunately I don't have a backup of my profiles json but I did have a lot of configurations and potentially the Regex captured something wrong. |
I sort of rambled here. If you put your profiles.json in a gist we can probably figure out what's wrong. Most likely you'll be able to look through your profiles.json and spot something very wrong. This is also something to bring up Mojang, because it seems like there's no case for profiles.json being invalid. Ideally, the launcher should attempt to fix formatting, and if it can't do so with perfect confidence, create two new files. One is just the profiles.json as fixed as it can get it, with anything it can't fix removed, and another new one. Then it should explain the user that it was corrupted, and parse the working files to show them what profiles are in there, so they can choose which one is correct. And it can probably also work backwards from the versions folder, and create simple profiles for non-vanilla versions that don't have one. You could also include a json template for a profile in the jar for that version, and have the launcher use that by default. So at this point, you have a jar to install the profile and set up the folders, and a profile template for if the jar is installed manually. Also, Optifine does a thing where when it's the mods folder, it acts like a Forge mod, but when it's double clicked it creates a version without Forge installed. Rift could probably do something similar. When the jar gets run by the Minecraft launcher, after being put in the versions folder, it downloads the appropriate vanilla version from Mojang's servers, and applies the patches, then replaces itself. If it gets launched by Forge from the mods folder, it checks compatibility with that version of Forge and makes a patched jar. If it's not compatible, it downloads the right version of Forge and installs that. |
It has come to my attention while recording a tutorial on how to install Rift that upon installing it again, it corrupted my launcher. Not bricked, but all current session remove and all my profiles gone. Essentially factory settings.
I will try this again soon to see if it is a genuine problem and not a once off.
The text was updated successfully, but these errors were encountered: