Crashing on Empty Quest Set
LukaPix opened this issue ยท 5 comments
I really don't know what is happening anymore..
I just added more empty sets to my questbook, named them and restartet my game,
after that the game crashes upon joining a world.
I had the character "&" in some of the quest titles but it let me save them from ingame without any warnings.
I tried changing them to "and" in every set i used them in by hand in the config files and also adjusted it in the "sets.json" still crashing.
Also HQM tells me it is crashing on a quest set, which is literally completely empty.
[05:08:10] [Server thread/ERROR] [Hardcore Questing Mode]: Error loading quest set: Actual_litteral_Rocket_Science.json com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $ at com.google.gson.Gson.fromJson(Gson.java:899) ~[Gson.class:?] at hardcorequesting.io.SaveHandler.loadQuestSet(SaveHandler.java:213) [SaveHandler.class:?] at hardcorequesting.io.SaveHandler.loadAllQuestSets(SaveHandler.java:205) [SaveHandler.class:?] at hardcorequesting.quests.QuestSet.loadAll(QuestSet.java:58) [QuestSet.class:?] at hardcorequesting.quests.QuestLine.loadAll(QuestLine.java:154) [QuestLine.class:?] at hardcorequesting.quests.QuestLine.init(QuestLine.java:169) [QuestLine.class:?] at hardcorequesting.quests.QuestLine.loadWorldData(QuestLine.java:101) [QuestLine.class:?] at hardcorequesting.event.WorldEventListener.onLoad(WorldEventListener.java:23) [WorldEventListener.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_662_WorldEventListener_onLoad_Load.invoke(.dynamic) [?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) [ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?] at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_181] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_181] at net.optifine.reflect.Reflector.call(Reflector.java:972) [Reflector.class:?] at net.optifine.reflect.Reflector.postForgeBusEvent(Reflector.java:1247) [Reflector.class:?] at net.optifine.reflect.Reflector.postForgeBusEvent(Reflector.java:1233) [Reflector.class:?] at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:151) [chd.class:?] at net.minecraft.server.integrated.IntegratedServer.init(IntegratedServer.java:233) [chd.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_181] Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $ at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385) ~[JsonReader.class:?] at hardcorequesting.io.adapter.QuestAdapter$5.read(QuestAdapter.java:438) ~[QuestAdapter$5.class:?] at hardcorequesting.io.adapter.QuestAdapter$5.read(QuestAdapter.java:397) ~[QuestAdapter$5.class:?] at com.google.gson.Gson.fromJson(Gson.java:887) ~[Gson.class:?] ... 20 more
We're aware of the issues the json saving can have and we wanna fix everything we find. Currently this isn't very easy, but we have to add proper checks and actions when we find corruption
I got everything to work again by manually removing the corrupted characters and replacing it with the right syntax {"name":"example","quests":[],"reputationBar":[]} by hand.
Since none of the not emtpy sets corrupted it's not a big deal, but i am scared of all my quests corrupting..
Unfortunately the file format is not immune to corruption. Given the fact that nobody is working on the project at the minute (at least for 1.12.2), I would recommend making regular back-ups of your quest books.
Alternately, you could try one of the other mods that are available.