NPE and PL disable on server start-up
SlimeDog opened this issue ยท 5 comments
- This issue is not solved in a development build
Describe the bug
With PL dev build 647, the following error on server start-up, approximately half the time, on both Paper and Spigot 1.19.4. This error never occurred with PL up to and including dev build 645.
[10:34:56] [Server thread/INFO]: [ProtocolLib] Loading server plugin ProtocolLib v5.1.0-SNAPSHOT-647
[10:34:57] [Server thread/ERROR]: [ProtocolLib] Error initializing plugin 'ProtocolLib-5.1.0-b647.jar' in folder 'plugins' (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "com.comphenix.protocol.ProtocolConfig.isChatWarnings()" because the return value of "com.comphenix.protocol.ProtocolLibrary.getConfig()" is null
at com.comphenix.protocol.error.DetailedErrorReporter.reportDetailed(DetailedErrorReporter.java:394) ~[ProtocolLib-5.1.0-b647.jar:?]
at com.comphenix.protocol.error.DelegatedErrorReporter.reportDetailed(DelegatedErrorReporter.java:63) ~[ProtocolLib-5.1.0-b647.jar:?]
at com.comphenix.protocol.error.DelegatedErrorReporter.reportDetailed(DelegatedErrorReporter.java:87) ~[ProtocolLib-5.1.0-b647.jar:?]
at com.comphenix.protocol.ProtocolLib.onLoad(ProtocolLib.java:186) ~[ProtocolLib-5.1.0-b647.jar:?]
at io.papermc.paper.plugin.storage.ServerPluginProviderStorage.processProvided(ServerPluginProviderStorage.java:59) ~[paper-1.19.4.jar:git-Paper-549]
at io.papermc.paper.plugin.storage.ServerPluginProviderStorage.processProvided(ServerPluginProviderStorage.java:18) ~[paper-1.19.4.jar:git-Paper-549]
at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimpleProviderStorage.java:40) ~[paper-1.19.4.jar:git-Paper-549]
at io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enter(LaunchEntryPointHandler.java:36) ~[paper-1.19.4.jar:git-Paper-549]
at org.bukkit.craftbukkit.v1_19_R3.CraftServer.loadPlugins(CraftServer.java:431) ~[paper-1.19.4.jar:git-Paper-549]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:273) ~[paper-1.19.4.jar:git-Paper-549]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1104) ~[paper-1.19.4.jar:git-Paper-549]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[paper-1.19.4.jar:git-Paper-549]
at java.lang.Thread.run(Thread.java:1623) ~[?:?]
To Reproduce
Steps to reproduce the behavior:
- Update ProtocolLib to dev build 647
- Start server
- See error
Expected behavior
Clean start-up
Version Info
Provide your ProtocolLib install info with /protocol dump
through pastebin.
> version
[16:45:56 INFO]: This server is running Paper version git-Paper-549 (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) (Git: bc4a664)
You are running the latest version
Previous version: git-Paper-548 (MC: 1.19.4)
> version ProtocolLib
[16:45:59 INFO]: ProtocolLib version 5.1.0-SNAPSHOT-647
Cannot execute protocol dump
since ProtocolLib is disabled.
Additional context
Add any other context about the problem here.
Here is the output of protocol dump
on the same server, after a successful start-up
https://whitedog.straight8.com/drops/protocollib-dump-2023-06-07_16.53.05.txt
Looks like this is a logging issue that's unfortunately hiding the underlying issue. I've pushed a fix for the logging issue
[21:08:04] [Server thread/INFO]: [ProtocolLib] Loading server plugin ProtocolLib v5.1.0-SNAPSHOT-648
[21:08:05] [Server thread/ERROR]: [ProtocolLib] INTERNAL ERROR: Cannot load ProtocolLib.
If this problem hasn't already been reported, please open a ticket
at https://github.com/dmulloy2/ProtocolLib/issues with the following data:
Stack Trace:
java.lang.ArrayIndexOutOfBoundsException: Index 8 out of bounds for length 8
at ProtocolLib-5.1.0-b648.jar//com.comphenix.protocol.collections.IntegerMap.put(IntegerMap.java:48)
at ProtocolLib-5.1.0-b648.jar//com.comphenix.protocol.PacketTypeLookup.addPacketTypes(PacketTypeLookup.java:110)
at ProtocolLib-5.1.0-b648.jar//com.comphenix.protocol.PacketType.getLookup(PacketType.java:746)
at ProtocolLib-5.1.0-b648.jar//com.comphenix.protocol.PacketType.fromCurrent(PacketType.java:941)
at ProtocolLib-5.1.0-b648.jar//com.comphenix.protocol.injector.packet.PacketRegistry.associatePackets(PacketRegistry.java:257)
at ProtocolLib-5.1.0-b648.jar//com.comphenix.protocol.injector.packet.PacketRegistry.createNewRegister(PacketRegistry.java:233)
at ProtocolLib-5.1.0-b648.jar//com.comphenix.protocol.injector.packet.PacketRegistry.initialize(PacketRegistry.java:292)
at ProtocolLib-5.1.0-b648.jar//com.comphenix.protocol.injector.packet.PacketRegistry.getClientPacketTypes(PacketRegistry.java:327)
at ProtocolLib-5.1.0-b648.jar//com.comphenix.protocol.injector.PacketFilterManager.<init>(PacketFilterManager.java:120)
at ProtocolLib-5.1.0-b648.jar//com.comphenix.protocol.injector.PacketFilterBuilder.build(PacketFilterBuilder.java:120)
at ProtocolLib-5.1.0-b648.jar//com.comphenix.protocol.ProtocolLib.onLoad(ProtocolLib.java:175)
at io.papermc.paper.plugin.storage.ServerPluginProviderStorage.processProvided(ServerPluginProviderStorage.java:59)
at io.papermc.paper.plugin.storage.ServerPluginProviderStorage.processProvided(ServerPluginProviderStorage.java:18)
at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimpleProviderStorage.java:40)
at io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enter(LaunchEntryPointHandler.java:36)
at org.bukkit.craftbukkit.v1_19_R3.CraftServer.loadPlugins(CraftServer.java:431)
at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:273)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1104)
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320)
at java.base/java.lang.Thread.run(Thread.java:1623)
Dump:
Parameters:
[NULL]
Sender:
com.comphenix.protocol.ProtocolLib@265fe628[
statistics=<null>
packetTask=-1
tickCounter=0
configExpectedMod=-1
updater=com.comphenix.protocol.updater.SpigotUpdater@477f3f51
redirectHandler=<null>
commandProtocol=<null>
commandPacket=<null>
commandFilter=<null>
packetLogging=<null>
skipDisable=false
isEnabled=false
loader=io.papermc.paper.plugin.manager.DummyBukkitPluginLoader@643efe73
server=CraftServer{serverName=Paper,serverVersion=git-Paper-549,minecraftVersion=1.19.4}
file=plugins/ProtocolLib-5.1.0-b648.jar
description=org.bukkit.plugin.PluginDescriptionFile@55fe2bac
pluginMeta=org.bukkit.plugin.PluginDescriptionFile@55fe2bac
dataFolder=plugins/ProtocolLib
classLoader=PluginClassLoader{plugin=ProtocolLib v5.1.0-SNAPSHOT-648, pluginEnabled=false, url=plugins/ProtocolLib-5.1.0-b648.jar}
naggable=true
newConfig=YamlConfiguration[path='', root='YamlConfiguration']
configFile=plugins/ProtocolLib/config.yml
logger=com.destroystokyo.paper.utils.PaperPluginLogger@6a14bd4f
]
Version:
ProtocolLib v5.1.0-SNAPSHOT-648
Java Version:
20.0.1
Server:
git-Paper-549 (MC: 1.19.4)
@SlimeDog Please try build 649: https://ci.dmulloy2.net/job/ProtocolLib/649/. The problem should be fixed now