Traveler's Backpack [Fabric]

Traveler's Backpack [Fabric]

15M Downloads

Crashes on 1.20.1 all version >= 9.1.19

swmmrman opened this issue ยท 2 comments

commented
  1. ALWAYS PROVIDE INFORMATION ABOUT MODLOADER (Fabric / Forge) AND MOD VERSION (For Example 1.19.2-8.2.10)

Fabric loader version 0.16.10-1.20.1 using bundled or system java.
Only mods
Fabric API 0.92.3 + 1 other version
cloth config 11.1.136 + 1 other version
cardinal components 5.2.3
Any travlersbackpack > 9.1.18

  1. Describe the bug

Game crashes on load. Null pointer, empty json key. Caused by a blank config file.

Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Map.containsKey(Object)" because "jsonMap" is null
at knot//com.tiviacz.travelersbackpack.TravelersBackpack.readOldCommonConfig(TravelersBackpack.java:125)
at knot//com.tiviacz.travelersbackpack.TravelersBackpack.onInitialize(TravelersBackpack.java:42)
at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:399)

  1. Write steps to reproduce the bug

update Travlers backpack from 9.1.18. Attempt to launch game.

  1. What is expected behaviour

Not crashing.

  1. Screenshots (If applicable)

None. Fix instead.

  1. Fix??

while gathering as much info as i could, I looked closely at the error and realized, the issue is in the config file.
renamed config file and allowed a new one to generate.
Now it launches.
Checked the old file looking for a missing key.
The old config file is empty.
Checked the config file on a second computer. Also empty.
Seems at some point, something blanked my TB config files.
Maybe add a check for a blank file, and remake it if empty, but present.

commented

Seems like something wrong happened with config file, in the most cases if config is detected it's not blank, but I will make additional check to prevent this in the next update