mojira.dev
MCL-22670

Game crashes when opening MC through Curseforge after update

Everytime I click play it crashes. Does not happen on any other modpack other than RL Craft. Have reinstalled the mod pack, have reinstalled Java, have reinstalled Curseforge, have reinstalled the MC Launcher itself. Me and my friend had both suddenly had the same exact issue only when the launcher itself automatically updated.

I ticked "Open Output log when game starts" to on and got this message:

Unable to launch
java.lang.RuntimeException: An error occurred trying to configure the Minecraft home at C:\Users**********\curseforge\minecraft\Instances\RLCraft for Forge Mod Loader

...

Caused by: java.io.IOException: mods is not a directory

I'm assuming it's crashing because it's trying to look in the wrong place? Either way I tried a bunch of things on the internet and they all came up dead ends. I believe this is an issue with the most recent MC Launcher update but could be wrong.

Currently using Forge version 14.24.5.2860. Using previous versions also did not fix the issue.

Linked issues

Attachments

Comments 6

This is caused by the most recent launcher update (2.3.481) changing something that causes the path returned by java.nio.file.FileSystems#getDefault to return the Install directory (also shown in the launcher_log.txt as the App Directory and Game data directory) rather than the Game Directory (the folder that has the saves folder in it). I have confirmed this using a remote debugger attached to MC.

Unlike when running in a vanilla enviroment, Curseforge tells the Minecraft Launcher to use a different directory to store things like the assets and versions folders in a seperate folder to 'instance' folders/files like saves, mods and options.txt, rather than the same one like is the launchers default behaviour (default behaviour is using AppData\Roaming\.minecraft for both core game files (like assets) and 'instance' files like saves and options.txt). CurseForge does this so only one copy of the core game files can be shared across multiple instances. You can do this without CurseForge too by changing the Game Directory per installation.

 

Downgrading the launcher by reinstalling it fixes the issue, until it updates again.

 

This may be reproduceable in a vanilla enviroment by making the Game Directory for an installation a different directory than .minecraft, although I am not sure if anything in vanilla uses FileSystems#getDefault to get a location to read/write files files somewhere.

If i can say, i have a custom modpack installer and i got a similar issue

I think latest update touched something in the way path are used

For example before the update, when i used my modpack, the log file path was : 

%appdata%/.minecraft/modpacks/MyModPack/logs/latest.log

but now it take the default minecraft path

Same for mods/ and maybe others files

How do I downgrade the launcher? I tried looking it up online but all I get is downgrading game versions which doesn't help me

I can confirm this is an 'issue' with vanilla everything too, although it is not as severe to cause a crash like modded environments, it still has resulted in changes to behaviour.

 

Steps for reproducing:

  1. Make a new installation in the launcher and change its game directory to somewhere other than the default .minecraft

  2. Launch this new profile and open a world. Say something in chat

  3. Now open the folder you set the game directory to. Notice it does not have a logs folder.

  4. Open the default .minecraft folder. Notice it does have a logs folder. Open that and then open the latest.log file

  5. See that this is the log from the world you joined and that your chat message is in there. 

Launcher log from my running of the above steps:

[media]

Before 2.3.481 the logs for each instance would be stored in the intance's Game Directory and not in the default .minecraft folder. (However I cannot test on earlier launcher versions with vanilla because I cannot figure out how to downgrade it). 

 

While this could be a purposeful change (as folders like saves, resourcepacks and files like options.txt are still in the instance directory), this is a big change for mods and breaks any that are launched using the vanilla launcher and with a game directory other than .minecraft set (which is a common thing to do so that mods do not affect any vanilla worlds and such). It encourages using alternative launchers because they do not break mods like this, and I know Mojang prefers if people use the vanilla launcher instead of alternative ones.

 

I also tried with a debugger attached to vanilla and the previously mentioned FileSystems#getDefault method is returning the path to .minecraft instead of the Game Directory set, like before.

The updated launcher now set the working directory to .minecraft directory instead of the game directory itself. This causes log files to be stored in .minecraft directory.

I'm not sure if this change was intentional or not though. 

I am unable to reproduce this behavior; the game starts as expected. Is this still an issue in 2.3.619?

migrated

(Unassigned)

Unconfirmed

Retrieved