Spelunkery

Spelunkery

80.4k Downloads

Game crashes on startup because of Spelunkery

gesuyl opened this issue ยท 1 comments

commented

Describe the bug:
Game crashes on startup. I've played with these mods before and everything was fine, today all of a sudden the game decided to not launch. Neither of the mods (Fabric API, Spelunkery, moonlight lib) seem to have been updated today, so i'm not sure what exactly has changed. I know that the crash is caused by Spelunkery because when I disable it in the Modrinth app the game starts successfully, although I haven't loaded up a world as to not corrupt the save.

Judging by my superficial review of the crash report, it seems that it is caused by a suppressed error java.lang.NoClassDefFoundError: Could not initialize class com.ordana.spelunkery.configs.CommonConfigs, which in turn causes java.lang.ExceptionInInitializerError: Exception com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 51 column 2 path $ [in thread "Render thread"].

Versions:
Minecraft version: 1.20.1
Spelunkery version: 1.20.1-0.3.13
Moonlight Lib version: fabric_1.20-2.13.36
Fabric API version: 0.92.2
Fabric Loader version: 0.16.9

Other mods:
Full mods list (taken from latest.log): https://mclo.gs/xXBD25T

Logs:
Crash report: https://mclo.gs/TAC58pJ
latest.log (with Spelunkery enabled): https://mclo.gs/3kSoctp
latest.log (with Spelunkery disabled): https://mclo.gs/IWnQX88

To Reproduce:

  1. Attempt to start the game
  2. Get a crash

Expected behavior:
Game starts.

Additional info:
I'm playing a modified version of Landscapes Reimagined Genesis 3 modpack. I've added and removed some mods, and was able to run the game with no issues. No changes have been made prior to the crashes happening.

I've also tried downgrading versions of Fabric, Spelunkery, and Moonlight lib to no avail.

commented

Update:
solved the issue, but not sure what part of code causes it. The spelunkery-common.java configuration file stored in (in my case) profiles/{profile_name}/config had an extra closing bracket:

{
  "#README": "This config file does not support comments. To see them configure it in-game using YACL or Cloth Config",
  "misc": {
    "spelunkery_creative_tab": false,
    "diamond_grindstone_deplete_chance": 64,
    "parachute_opening_delay": 10,
    "enable_mores": true,
    "enable_rough_gems": true,
    "enable_raw_nuggets": true,
    "ores_drop_base_stone": false
  },
  "utilities": {
    "hammer_and_chisel_charge_time": 20,
    "tuning_fork_range": 128,
    "echo_fork_range": 16,
    "echo_fork_cooldown": 600,
    "echo_glow_duration": 1200,
    "sculk_drops_with_shears": true,
    "magnet_range": 8,
    "magnetite_range": 64
  },
  "nether_portals_and_portal_fluid": {
    "flint_and_steel_portal_lighting": true,
    "portal_destruction_crying_obsidian": true,
    "portal_creation_sound": true,
    "portal_destruction_sound": true,
    "portal_fluid_drinking": true,
    "instant_teleportation": true,
    "piglins_give_crying_obsidian": true,
    "dimensional_tears_from_crying_obsidian": false,
    "dimensional_tears_from_respawn_anchor": true,
    "portal_fluid_ocean": true,
    "end_ocean_bucketable": false
  },
  "slimes": {
    "slimes_spawn_in_all_caves": true,
    "create_slimes_in_cauldrons": true,
    "slimes_friendly_to_players_with_regeneration": true,
    "slimes_always_friendly": false,
    "slime_eating_cooldown": 150,
    "enable_slime_growth": true,
    "slime_growth_chance": 10,
    "slime_growth_max": 5
  },
  "worldgen": {
    "stone_stripe_features": true,
    "sporophytes_in_lush_caves": true,
    "dark_forest_portabellas": true
  }
}
}

This is what Caused by: java.lang.ExceptionInInitializerError: Exception com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 51 column 2 path $ [in thread "Render thread"] in the crash report was refering to.

I went into the config file and manually removed the redundant bracket, saved the file and the game launched at last. This should be an easy fix to implement.