slipcor / TreeAssist

https://www.spigotmc.org/resources/treeassist.67436/
GNU General Public License v3.0
34 stars 19 forks source link

Crashes on config load on Spigot 1.17.1 #81

Closed justdave closed 2 years ago

justdave commented 3 years ago

I'm running Spigot 1.17.1 build 3277

Trying to chop trees down doesn't work, and trying to reload the config (with the default config pasted in off the wiki just to make sure) results in a java backtrace in the log:

>treeassist reload
[02:53:35] [Server thread/WARN]: java.lang.NullPointerException: Cannot invoke "net.slipcor.treeassist.yml.TreeConfig.getYamlConfiguration()" because the return value of "java.util.Map.get(Object)" is null
[02:53:35] [Server thread/WARN]:        at net.slipcor.treeassist.yml.ConfigV7Updater.commit(ConfigV7Updater.java:136)
[02:53:35] [Server thread/WARN]:        at net.slipcor.treeassist.yml.MainConfig.load(MainConfig.java:189)
[02:53:35] [Server thread/WARN]:        at net.slipcor.treeassist.commands.CommandReload.commit(CommandReload.java:27)
[02:53:35] [Server thread/WARN]:        at net.slipcor.treeassist.TreeAssist.onCommand(TreeAssist.java:236)
[02:53:35] [Server thread/WARN]:        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[02:53:35] [Server thread/WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149)
[02:53:35] [Server thread/WARN]:        at org.bukkit.craftbukkit.v1_17_R1.CraftServer.dispatchCommand(CraftServer.java:790)
[02:53:35] [Server thread/WARN]:        at org.bukkit.craftbukkit.v1_17_R1.CraftServer.dispatchServerCommand(CraftServer.java:775)
[02:53:35] [Server thread/WARN]:        at net.minecraft.server.dedicated.DedicatedServer.handleCommandQueue(DedicatedServer.java:475)
[02:53:35] [Server thread/WARN]:        at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:439)
[02:53:35] [Server thread/WARN]:        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1217)
[02:53:35] [Server thread/WARN]:        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1050)
[02:53:35] [Server thread/WARN]:        at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:305)
[02:53:35] [Server thread/WARN]:        at java.base/java.lang.Thread.run(Thread.java:831)
[02:53:35] [Server thread/INFO]: [TreeAssist] §aTreeAssist has been reloaded.

It gets a different backtrace (but looks like the same crash) when the server starts:

[03:12:45] [Server thread/INFO]: [TreeAssist] Loading TreeAssist v7.2.37
[03:12:45] [Server thread/INFO]: [TreeAssist] Loading main config file: /config.yml
[03:12:45] [Server thread/WARN]: java.lang.NullPointerException: Cannot invoke "net.slipcor.treeassist.yml.TreeConfig.getYamlConfiguration()" because the return value of "java.util.Map.get(Object)" is null
[03:12:45] [Server thread/WARN]:        at net.slipcor.treeassist.yml.ConfigV7Updater.commit(ConfigV7Updater.java:136)
[03:12:45] [Server thread/WARN]:        at net.slipcor.treeassist.yml.MainConfig.load(MainConfig.java:189)
[03:12:45] [Server thread/WARN]:        at net.slipcor.treeassist.TreeAssist.onLoad(TreeAssist.java:345)
[03:12:45] [Server thread/WARN]:        at org.bukkit.craftbukkit.v1_17_R1.CraftServer.loadPlugins(CraftServer.java:414)
[03:12:45] [Server thread/WARN]:        at net.minecraft.server.dedicated.DedicatedServer.init(DedicatedServer.java:233)
[03:12:45] [Server thread/WARN]:        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1010)
[03:12:45] [Server thread/WARN]:        at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:305)
[03:12:45] [Server thread/WARN]:        at java.base/java.lang.Thread.run(Thread.java:831)
justdave commented 2 years ago

We worked this out on Discord, and I believe this was fixed in v7.2.39

slipcor commented 2 years ago

yes! nice :D