[Bug]: Server config loading occasionally fails due to TOML format not being recognized by Night Config
Fuzss opened this issue ยท 0 comments
Minecraft Version
1.19.2
What happened?
Hey there, there've been many crash logs with the following stack trace lately:
com.electronwill.nightconfig.core.file.NoFormatFoundException: No suitable format for veinmining-server.toml
at com.electronwill.nightconfig.core.file.CommentedFileConfig.builder(CommentedFileConfig.java:218)
at com.illusivesoulworks.spectrelib.config.SpectreConfigTracker.lambda$read$6(SpectreConfigTracker.java:181)
at com.illusivesoulworks.spectrelib.config.SpectreConfigTracker.lambda$loadDefaultConfigs$2(SpectreConfigTracker.java:86)
at java.base/java.util.concurrent.ConcurrentHashMap$ValuesView.forEach(ConcurrentHashMap.java:4780)
at com.illusivesoulworks.spectrelib.config.SpectreConfigTracker.loadDefaultConfigs(SpectreConfigTracker.java:80)
at com.illusivesoulworks.spectrelib.config.SpectreConfigEvents.onLoadDefault(SpectreConfigEvents.java:30)
at com.illusivesoulworks.spectrelib.config.SpectreConfigEvents.onLoadDefaultAndLocal(SpectreConfigEvents.java:25)
at com.illusivesoulworks.spectrelib.SpectreClientFabricMod.prepareConfigs(SpectreClientFabricMod.java:58)
at net.minecraft.class_310.handler$ide000$spectrelib$init(class_310.java:35965)
at net.minecraft.class_310.<init>(class_310.java:456)
at net.minecraft.client.main.Main.method_44604(Main.java:205)
at net.minecraft.client.main.Main.main(Main.java:51)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:461)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
I remember this issue in my Forge Config Api Port mod, too (not sure if it looked exactly like that, but it was also related to the toml format being invalid). I solved the issue by specifically setting to toml format instance when building a new CommentedFileConfig
. There is a lengthy comment in my code explaining some things, maybe that helps.
In your case that would be here:
Forge does something here related to the TomlFormat
class, this missing on Fabric might be related to the issue:
How do you trigger this bug?
- Just load a world with vein mining installed, crash will happen rarely.
Loader
Fabric
Loader Version
fabric-loader-0.14.12-1.19.2
API Version
0.72.0+1.19.2
Mod Version
1.0.2+1.19.2