Server log spamming: Listener already listening
RisingInIris2017 opened this issue ยท 1 comments
Versions
Mod version:
Player+Weight+V1.12-1.6.3.1
Forge version:
14.23.5.2847
Singleplayer or Multiplayer:
Multiplayer, using Mohist
Installed mods:
https://paste.ubuntu.com/p/wGjzZgZ6Q2/
Link to full log
This is the latest.log generated by the server.
latest.log
you could see these logs spamming:
[Server thread/FATAL] [net.minecraft.server.MinecraftServer]: Error executing task
java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Listener already listening
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_242]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_242]
at net.minecraft.util.Util.func_181617_a(SourceFile:47) [h.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:844) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:468) [nz.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:778) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:621) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
Caused by: java.lang.IllegalArgumentException: Listener already listening
at net.minecraft.inventory.Container.func_75132_a(Container.java:144) ~[afr.class:?]
at playerWeight.handler.PlayerHandler.onRespawn(PlayerHandler.java:118) ~[PlayerHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_500_PlayerHandler_onRespawn_PlayerRespawnEvent.invoke(.dynamic) ~[?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:fb20a25]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:189) ~[EventBus.class:fb20a25]
at net.minecraftforge.fml.common.FMLCommonHandler.firePlayerRespawnEvent(FMLCommonHandler.java:580) ~[FMLCommonHandler.class:fb20a25]
at net.minecraft.server.management.PlayerList.func_72368_a(PlayerList.java:879) ~[pl.class:?]
at net.minecraft.network.NetHandlerPlayServer.func_147342_a(NetHandlerPlayServer.java:1856) ~[pa.class:?]
at net.minecraft.network.play.client.CPacketClientStatus.func_148833_a(SourceFile:31) ~[lb.class:?]
at net.minecraft.network.play.client.CPacketClientStatus.func_148833_a(SourceFile:8) ~[lb.class:?]
at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) ~[hv$1.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_242]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_242]
at net.minecraft.util.Util.func_181617_a(SourceFile:46) ~[h.class:?]
... 5 more
Description of the problem
After the server is started, the logs I pasted above is repeating again and again, which is really annoying.
I hope you could give me some help with this log spamming.
Thanks for your kind help in advance!
This is not a bug of Playerweight because the "Vanilla" implementation does not copy over the Listeners of a "Container" when the player does respawn.
Also it is impossible without reflection to remove the listener of a player from a server because the method does not exist on the server.
If you say "it does exist though" you are wrong for one reason: This is a forge mod and forge declared this method as SideOnly(Side.CLIENT) that means asm will remove the method on the server so calling it would cause a crash.
Go to the guy who maintains the server sourcecode and tell him he needs to fix his "copying of listeners" because that shouldnt be done and he can cause a lot of problems with this "optimization".