Skip to content

"Load on startup" crash #45

@christopher-renders

Description

@christopher-renders

As title suggests, the fabric delivers a crash message when I set a profile to "load on startup", and then actually load the game.

It will apply almost all settings--save for the shader pack--when I reload.

Image

Here's the error in its entirety:

net.fabricmc.loader.impl.FormattedException: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 32 column 8 path $.render_settings.dimensionFogDistance.
See https://github.com/google/gson/blob/main/Troubleshooting.md#unexpected-json-structure
	at net.fabricmc.loader.impl.FormattedException.ofLocalized(FormattedException.java:63)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:482)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at com.modrinth.theseus.MinecraftLaunch.relaunch(MinecraftLaunch.java:63)
	at com.modrinth.theseus.MinecraftLaunch.main(MinecraftLaunch.java:28)
Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 32 column 8 path $.render_settings.dimensionFogDistance.
See https://github.com/google/gson/blob/main/Troubleshooting.md#unexpected-json-structure
	at knot//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:520)
	at knot//com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
	at knot//com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:199)
	at knot//com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:154)
	at knot//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$2.readIntoField(ReflectiveTypeAdapterFactory.java:267)
	at knot//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:558)
	at knot//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:516)
	at knot//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$2.readIntoField(ReflectiveTypeAdapterFactory.java:267)
	at knot//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:558)
	at knot//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:516)
	at knot//com.google.gson.Gson.fromJson(Gson.java:1361)
	at knot//com.google.gson.Gson.fromJson(Gson.java:1262)
	at knot//com.google.gson.Gson.fromJson(Gson.java:1199)
	at knot//net.trafficlunar.optionsprofiles.profiles.loaders.SodiumExtraLoader.load(SodiumExtraLoader.java:19)
	at knot//net.trafficlunar.optionsprofiles.profiles.Profiles.loadOptionFile(Profiles.java:276)
	at knot//net.trafficlunar.optionsprofiles.profiles.Profiles.loadProfile(Profiles.java:288)
	at knot//net.trafficlunar.optionsprofiles.profiles.Profiles.lambda$init$1(Profiles.java:41)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
	at java.base/java.util.Iterator.forEachRemaining(Unknown Source)
	at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
	at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
	at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)
	at knot//net.trafficlunar.optionsprofiles.profiles.Profiles.init(Profiles.java:34)
	at knot//net.trafficlunar.optionsprofiles.OptionsProfilesMod.lambda$init$0(OptionsProfilesMod.java:35)
	at knot//dev.architectury.event.fabric.EventHandlerImpl.lambda$registerClient$0(EventHandlerImpl.java:48)
	at knot//net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents.lambda$static$0(ClientLifecycleEvents.java:35)
	at knot//net.minecraft.class_310.handler$cba000$fabric-lifecycle-events-v1$onStart(class_310.java:12592)
	at knot//net.minecraft.class_310.method_1514(class_310.java:903)
	at knot//net.minecraft.client.main.Main.main(Main.java:267)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480)
	... 6 more
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 32 column 8 path $.render_settings.dimensionFogDistance.
See https://github.com/google/gson/blob/main/Troubleshooting.md#unexpected-json-structure
	at knot//com.google.gson.stream.JsonReader.unexpectedTokenError(JsonReader.java:1768)
	at knot//com.google.gson.stream.JsonReader.beginObject(JsonReader.java:469)
	at knot//com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:509)
	... 40 more

I did a little diving with chatgpt and it says it's confused by the object type in one of the files (specifically the dimensionFogDistance) which is pretty clear from the top of the crash log, but it seems the json for that section is written properly?

"dimensionFogDistance": {
      "minecraft:overworld": 0,
      "minecraft:the_nether": 0,
      "minecraft:the_end": 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions