copygirl / WearableBackpacks

Minecraft mod which adds beautiful, balanced backpacks
MIT License
61 stars 35 forks source link

Crash when starting up with invalid config settings #126

Closed FireFlang closed 4 years ago

FireFlang commented 4 years ago

I was loading forge up and the game crashed saying that wearable backpacks caused it. This has never happened before until today. crash-2019-10-15_14.58.29-client.txt

copygirl commented 4 years ago

Have you edited the configuration outside of the game, inside it, or not at all? It's failing to load one of the settings, I believe it's the backpack durability.

We should probably handle this error more gracefully, but I currently don't see an easy way to let the player know about illegal values in config settings that isn't outright crashing with a hopefully more useful message. If we just print a non-fatal error, nobody will see it.

FireFlang commented 4 years ago

I have done the configuration inside of the game and I made the durability really high, so that might be the problem but I don't know how to change it back.

ChloeDawn commented 4 years ago

Settings with ranges are not range-checked when setting them at runtime, only when parsing from file. To resolve this crash (until the bug is fixed) you will need to edit the config file in the configs folder of your game directory and change the durability to a value between 0 and 32000.

FireFlang commented 4 years ago

It worked the problem was the durability. Thank you for helping me!

copygirl commented 4 years ago

@ChloeDawn They should be range-checked when editing them in the config screen. I thought I made it so it prevents you from clicking "done" if there's any invalid values. But I could be wrong.

@FireFlang If you want backpacks to never break you can also set the durability to 0.