CTD -- NPE -- DungeonsWorldGen.generate -- Stylesheet default resources fail to initialize properly on first launch
Opened this issue · 0 comments
crash-2022-07-29_17.41.29-server.txt
dungeons2.log
Steps to reproduce:
- Install a fresh Curse Modded Minecraft 1.12.2, Forge 14.23.5.2859 profile and install Dungeons2!, or Import the following profile:
Dungeons2Test.zip - Attempt to create a new, single-player world, with the seed: 1
- CTD
Note, CTD doesn't happen on subsequent launches of the same world, even after deleting the world and creating it again.
After a CTD, it doesn't seem that the dungeon at the spawn location effectively spawns. If you delete the world, then create a world with the same name and the seed (1), then the dungeon near the spawn does generate.
This led me to investigate the code further.
The Crash Log points to this:
at com.someguyssoftware.dungeons2.worldgen.DungeonsWorldGen.generate(DungeonsWorldGen.java:274)
And the Dungeons2 Log points to this:
at com.someguyssoftware.dungeons2.style.StyleSheetLoader.exposeStyleSheet(StyleSheetLoader.java:249) [StyleSheetLoader.class:mc1.12.2-f14.23.5.2859-v1.7.6]
We know the try
on L249 is failing, and we get this message:
java.io.FileNotFoundException: C:\Users\Twistedlink\Documents\Twitch\Minecraft\Instances\Dungeons2Test\mods\dungeons2\styleSheet.json (The system cannot find the path specified)
On a hunch, I created a second modpack, with an override to supply the contents of the mods/dungeons2
directory before first launch:
Dungeons2TestOverrides.zip
If you import and run this profile, things work as intended, suggesting there's an issue with the mod attempting to use these stylesheet resources before they're successfully initialized.
I don't have the time to dig further at the moment (I don't have a development environment set up to do mod development), and this overrides workaround works for me. Additionally, anyone running this mod for the first time will likely crash once, but on subsequent runs, will be fine. It hampers the initial user experience, but it isn't game-breaking, despite being a CTD.