OldCombatMechanics

OldCombatMechanics

46.1k Downloads

NPE in Packet Listener

frkntmbs opened this issue · 24 comments

commented

I get this error in version 1.12.2 and a similar error is also present in the papper version

[00:12:47] [Netty Server IO #3/WARN]: [OldCombatMechanics] Error in a packet listener (send).
java.lang.NullPointerException: null
	at java.util.HashSet.<init>(Unknown Source) ~[?:1.8.0_201]
	at gvlfm78.plugin.OldCombatMechanics.utilities.teams.TeamPacket.adjustToPlayerRemoved(TeamPacket.java:94) ~[?:?]
	at gvlfm78.plugin.OldCombatMechanics.utilities.teams.TeamPacket.adjustToUpdate(TeamPacket.java:44) ~[?:?]
	at gvlfm78.plugin.OldCombatMechanics.module.ModulePlayerCollisions$CollisionPacketListener.updateToPacket(ModulePlayerCollisions.java:157) ~[?:?]
	at gvlfm78.plugin.OldCombatMechanics.module.ModulePlayerCollisions$CollisionPacketListener.onPacketSend(ModulePlayerCollisions.java:119) ~[?:?]
	at gvlfm78.plugin.OldCombatMechanics.utilities.packet.PacketInjector.write(PacketInjector.java:162) ~[?:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[spigot.jar:git-Spigot-dcd1643-e60fc34]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:801) ~[spigot.jar:git-Spigot-dcd1643-e60fc34]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814) ~[spigot.jar:git-Spigot-dcd1643-e60fc34]
	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794) ~[spigot.jar:git-Spigot-dcd1643-e60fc34]
	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831) ~[spigot.jar:git-Spigot-dcd1643-e60fc34]
	at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1071) ~[spigot.jar:git-Spigot-dcd1643-e60fc34]
	at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:300) ~[spigot.jar:git-Spigot-dcd1643-e60fc34]
	at com.comphenix.protocol.injector.netty.ChannelProxy.writeAndFlush(ChannelProxy.java:327) ~[?:?]
	at net.minecraft.server.v1_12_R1.NetworkManager$4.run(NetworkManager.java:200) ~[spigot.jar:git-Spigot-dcd1643-e60fc34]
	at com.comphenix.protocol.injector.netty.ChannelInjector$3.lambda$onMessageScheduled$1(ChannelInjector.java:310) ~[?:?]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [spigot.jar:git-Spigot-dcd1643-e60fc34]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) [spigot.jar:git-Spigot-dcd1643-e60fc34]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463) [spigot.jar:git-Spigot-dcd1643-e60fc34]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) [spigot.jar:git-Spigot-dcd1643-e60fc34]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_201]
commented

@Boz-Turk what exact version of OldCombatMechanics are you running?

commented

@gvlfm78 OCMVersion : 1.7.4

commented

@gvlfm78 Presumably, when will it recover?

commented

Some of it is like this: https://pastebin.com/Pcd5KSCh

latets log:
latest.log

commented
commented

still no solution provided

commented

Sorry for the late reply. What version/fork of Spigot server are you running?

commented

Spigot / PaperSpigot 1.12.2 fails in both versions

commented

Thank you. When is this error thrown? Is it when players leave, join, or is it some other action?

commented

I'm not sure, it doesn't always happen. I think it happens when they enter a combat.

commented

Do you have any other plugins? Which build of spigot are you running?

commented

(You can see the Spigot build via /version or in the latest.log file towards the start)

commented

[23:44:17 INFO]: This server is running Paper version git-Paper-1618 (MC: 1.12.2
) (Implementing API version 1.12.2-R0.1-SNAPSHOT)

I didn't see this error before installing this plugin

commented

Thanks, could we have a list of the other plugins you use as well?

commented

ActionBarAPI, AncientGates, antiRedstoneClock, AntiWDL, ArmorStandEditor, AsyncWorldEdit, AsyncWorldEditInjector, AutoMessage, Banknotes, BKCommonLib, boosCooldowns, ChestCommands, ChestShop, ClearLag, CounterStrike, CustomPayloadFixer, DisableJoinMessage, EasyBackup, Essentials
, EssentialsChat, EssentialsSpawn, ExtrasSK, FactionChat, Factions, FastCraft, HealthBar, HolographicDisplays, IllegalStack, LaunchPadPlus, LeakParkour, LibsDisguises, LightCleaner, LockettePro, MassiveCore, MineResetLite, Minigames, Minigames-Regions, Multiverse-Core, MyCommand, MythicMobs, NMExtensions, NMFutbol, NMObligations, NMPlotPremium, NMProfessions, NoCheatPlus, OldCombatMechanics, OnlyProxyJoin, PermissionsEx, PlaceholderAPI, PlotSquared, PlugMan, ProtocolLib, PvPManager, QuickShop, SafeTrade, SharpSK, SkAction, skDragon, Skellett, SkinsRestorer, SkQuery, skRayFall, Skript, SkUniversal, skUtilities, TAB, UnioAntiCrash, UUIDSpoof-Fix, Vault, Websend, WildSkript, WorldBorder, WorldEdit, WorldGuard

commented

Can you try this build? Unzip and copy the jar file. It will output stuff to the console that I need.
OCM.zip

commented

I installed and it turned out

resimag.com/p1/b105ebf4f49.png

commented

Or maybe even this which also logs packet listeners:
OCM.zip

commented

The important part is when an error happens. It should write NULL DETECTED in the console and then there will probably be the stacktrace. I need the stuff right below that null detected and the registered channel listeners it outputs with the second jar I posted on startup.

commented

Can you show the few lines above the second screenshot as well? You can most likely copy-paste it from latest.log.

commented
[00:17:35] [Netty Server IO #2/INFO]: a=>0004zhywor�
[00:17:35] [Netty Server IO #2/INFO]: b=>0004zhywor�
[00:17:35] [Netty Server IO #2/INFO]: c=>[A] 
[00:17:35] [Netty Server IO #2/INFO]: d=>
[00:17:35] [Netty Server IO #2/INFO]: e=>never
[00:17:35] [Netty Server IO #2/INFO]: f=>never
[00:17:35] [Netty Server IO #2/INFO]: g=>-1
[00:17:35] [Netty Server IO #2/INFO]: h=>null
[00:17:35] [Netty Server IO #2/INFO]: i=>2
[00:17:35] [Netty Server IO #2/INFO]: j=>69
[00:17:35] [Netty Server IO #2/WARN]: [OldCombatMechanics] Error in a packet listener (send).
java.lang.NullPointerException: null
	at java.util.HashSet.<init>(Unknown Source) ~[?:1.8.0_201]
	at kernitus.plugin.OldCombatMechanics.utilities.teams.TeamPacket.adjustToPlayerAdded(TeamPacket.java:86) ~[?:?]
	at kernitus.plugin.OldCombatMechanics.utilities.teams.TeamPacket.adjustToUpdate(TeamPacket.java:41) ~[?:?]
	at kernitus.plugin.OldCombatMechanics.module.ModulePlayerCollisions$CollisionPacketListener.updateToPacket(ModulePlayerCollisions.java:157) ~[?:?]
	at kernitus.plugin.OldCombatMechanics.module.ModulePlayerCollisions$CollisionPacketListener.onPacketSend(ModulePlayerCollisions.java:119) ~[?:?]
	at kernitus.plugin.OldCombatMechanics.utilities.packet.PacketInjector.write(PacketInjector.java:170) ~[?:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:738) ~[spigot.jar:git-Paper-1618]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:801) ~[spigot.jar:git-Paper-1618]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814) ~[spigot.jar:git-Paper-1618]
	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794) ~[spigot.jar:git-Paper-1618]
	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831) ~[spigot.jar:git-Paper-1618]
	at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1071) ~[spigot.jar:git-Paper-1618]
	at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:300) ~[spigot.jar:git-Paper-1618]
	at com.comphenix.protocol.injector.netty.ChannelProxy.writeAndFlush(ChannelProxy.java:327) ~[?:?]
	at net.minecraft.server.v1_12_R1.NetworkManager$4.run(NetworkManager.java:215) ~[spigot.jar:git-Paper-1618]
	at com.comphenix.protocol.injector.netty.ChannelInjector$3.lambda$onMessageScheduled$1(ChannelInjector.java:310) ~[?:?]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[spigot.jar:git-Paper-1618]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) ~[spigot.jar:git-Paper-1618]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463) ~[spigot.jar:git-Paper-1618]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) ~[spigot.jar:git-Paper-1618]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_201]
[00:17:39] 
commented

Please post your full latest.log, either uploading it here as an attachment or on https://pastebin.com

commented

I've been using it for a few hours and I haven't had any problems.

I think it's solved