Doclic / NoEncryption

Removes signatures from Minecraft chat messages
GNU General Public License v3.0
226 stars 18 forks source link

PlayerQuitEvent #89

Closed theojouvin closed 1 year ago

theojouvin commented 1 year ago

Are you using the latest version of NoEncryption?

Is there an existing issue for this?

NoEncryption Version

5.0

Minecraft Version

1.19.4

Server Type/Build

Paper version git-Paper-484 (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) (Git: 7a96bf2)

Plugins in Use

[07:08:26 INFO]: Server Plugins (29): [07:08:26 INFO]: Bukkit Plugins: [07:08:26 INFO]: - BungeePortals, BuycraftX, ChatControl, ChestCommands, CoreProtect, EchoPet, Essentials, EssentialsChat, EssentialsSpawn, FeatherBoard [07:08:26 INFO]: Fireworks, GAL, HiveJumpPads, HolographicDisplays, ItemJoin, LiteBans, LuckPerms, Multiverse-Core, NoEncryption, NoOffhand [07:08:26 INFO]: PlaceholderAPI, PlugManX, ProtocolLib, TitleManager, *tpLogin, Vault, Votifier, WorldEdit, WorldGuard

Startup/Running Logs

[07:05:59 ERROR]: Could not pass event PlayerQuitEvent to NoEncryption v5.0
java.lang.NullPointerException: Cannot invoke "io.netty.channel.Channel.eventLoop()" because "serverChannel" is null
        at me.doclic.noencryption.PlayerListener.onPlayerQuit(PlayerListener.java:122) ~[NoEncryption.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor237.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:git-Paper-484]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.19.4.jar:git-Paper-484]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.19.4.jar:git-Paper-484]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.server.players.PlayerList.remove(PlayerList.java:585) ~[paper-1.19.4.jar:git-Paper-484]
        at net.minecraft.server.players.PlayerList.remove(PlayerList.java:570) ~[paper-1.19.4.jar:git-Paper-484]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:2111) ~[?:?]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:2090) ~[?:?]
        at net.minecraft.network.Connection.handleDisconnection(Connection.java:795) ~[?:?]
        at net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:254) ~[?:?]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1576) ~[paper-1.19.4.jar:git-Paper-484]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:447) ~[paper-1.19.4.jar:git-Paper-484]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1397) ~[paper-1.19.4.jar:git-Paper-484]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1174) ~[paper-1.19.4.jar:git-Paper-484]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[paper-1.19.4.jar:git-Paper-484]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Reproducible Test

Disconnect from server.

Anything else?

No response

theojouvin commented 1 year ago

Not sure what caused this, but it is no longer happening. I made no changes. Not complaining!

theojouvin commented 1 year ago

Nevermind, still happening. Seems the server has to be running for a minute or two before the error appears when disconnecting.

Tomographix commented 1 year ago

Also having the same issue on my 1.19.4 PaperClip server.

NyaomiDEV commented 1 year ago

Reproduced today on Paper 1.19.3

[19:06:57 ERROR]: Could not pass event PlayerQuitEvent to NoEncryption v5.0
java.lang.NullPointerException: Cannot invoke "io.netty.channel.Channel.eventLoop()" because "serverChannel" is null
    at me.doclic.noencryption.PlayerListener.onPlayerQuit(PlayerListener.java:110) ~[NoEncryption-1.19.3-5.0.jar:?]
    at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor255.execute(Unknown Source) ~[?:?]
    at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]
    at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:git-Paper-446]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]
    at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.19.3.jar:git-Paper-446]
    at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.19.3.jar:git-Paper-446]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.19.3-R0.1-SNAPSHOT.jar:?]
    at net.minecraft.server.players.PlayerList.remove(PlayerList.java:578) ~[paper-1.19.3.jar:git-Paper-446]
    at net.minecraft.server.players.PlayerList.remove(PlayerList.java:563) ~[paper-1.19.3.jar:git-Paper-446]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:2119) ~[?:?]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.onDisconnect(ServerGamePacketListenerImpl.java:2098) ~[?:?]
    at net.minecraft.network.Connection.handleDisconnection(Connection.java:777) ~[?:?]
    at net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:253) ~[?:?]
    at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1565) ~[paper-1.19.3.jar:git-Paper-446]
    at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:447) ~[paper-1.19.3.jar:git-Paper-446]
    at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1397) ~[paper-1.19.3.jar:git-Paper-446]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1173) ~[paper-1.19.3.jar:git-Paper-446]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[paper-1.19.3.jar:git-Paper-446]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]
V1nc3ntWasTaken commented 1 year ago

I suspect Paper did something with synchronization with fetching the player's channel when they leave.

V1nc3ntWasTaken commented 1 year ago

So I already threw in a small system to catch this. I can't do much but catch the channel if it can, if it can't tell the console about it, but don't print a fat stack trace, and instead tell console that it will be caught in a garbage collection run which runs a few times a minute.