CloudNet-v2 icon indicating copy to clipboard operation
CloudNet-v2 copied to clipboard

NPE in the SignSelector/MobSelector on "ServerRemove"

Open derrop opened this issue 5 years ago • 1 comments

When the Cloud sends a Channel Message to all Servers (e. g. with CloudAPI#sendChannelMessage), a NullPointerException is produced on every server which has Signs/Mobs enabled. The PacketOutChannelMessage is sent with the ID 404 from the Master, but the Bridge Plugin listens for the PacketInRemoveServer Packet on that ID. The "serverInfo" is null on receiving that packet and therefore an NPE is thrown.

[13:23:17] [TaskScheduler-Group--1768132442256842865#1/ERROR]: Error on handling Task on Thread [TaskScheduler-Group--1768132442256842865#1]
java.lang.NullPointerException
	at de.dytanic.cloudnet.bridge.internal.serverselectors.MobSelector$NetworkHandlerAdapterImplx.onServerRemove(MobSelector.java:454) ~[CloudNetAPI.jar:2.1.17]
	at de.dytanic.cloudnet.api.network.packet.in.PacketInServerRemove$2.run(PacketInServerRemove.java:27) ~[CloudNetAPI.jar:2.1.17]
	at de.dytanic.cloudnet.api.network.packet.in.PacketInServerRemove$2.run(PacketInServerRemove.java:24) ~[CloudNetAPI.jar:2.1.17]
	at de.dytanic.cloudnet.lib.utility.CollectionWrapper.iterator(CollectionWrapper.java:61) ~[CloudNetAPI.jar:2.1.17]
	at de.dytanic.cloudnet.api.handlers.NetworkHandlerProvider.iterator(NetworkHandlerProvider.java:35) ~[CloudNetAPI.jar:2.1.17]
	at de.dytanic.cloudnet.api.network.packet.in.PacketInServerRemove.handleInput(PacketInServerRemove.java:24) ~[CloudNetAPI.jar:2.1.17]
	at de.dytanic.cloudnet.lib.network.protocol.packet.PacketManager$2.run(PacketManager.java:99) ~[CloudNetAPI.jar:2.1.17]
	at de.dytanic.cloudnet.lib.network.protocol.packet.PacketManager$2.run(PacketManager.java:92) ~[CloudNetAPI.jar:2.1.17]
	at de.dytanic.cloudnet.lib.utility.CollectionWrapper.iterator(CollectionWrapper.java:61) ~[CloudNetAPI.jar:2.1.17]
	at de.dytanic.cloudnet.lib.network.protocol.packet.PacketManager.dispatchPacket(PacketManager.java:92) ~[CloudNetAPI.jar:2.1.17]
	at de.dytanic.cloudnet.lib.network.NetDispatcher$1.run(NetDispatcher.java:66) ~[CloudNetAPI.jar:2.1.17]
	at de.dytanic.cloudnet.lib.scheduler.TaskScheduler$VoidTaskEntry$1.call(TaskScheduler.java:585) ~[CloudNetAPI.jar:2.1.17]
	at de.dytanic.cloudnet.lib.scheduler.TaskScheduler$VoidTaskEntry$1.call(TaskScheduler.java:579) ~[CloudNetAPI.jar:2.1.17]
	at de.dytanic.cloudnet.lib.scheduler.TaskEntry.invoke(TaskEntry.java:33) ~[CloudNetAPI.jar:2.1.17]
	at de.dytanic.cloudnet.lib.scheduler.TaskScheduler$Worker.execute(TaskScheduler.java:527) [CloudNetAPI.jar:2.1.17]
	at de.dytanic.cloudnet.lib.scheduler.TaskScheduler$Worker.run(TaskScheduler.java:490) [CloudNetAPI.jar:2.1.17]```

derrop avatar Feb 14 '20 14:02 derrop

I will investigate this issue but it may be resolved with other changes that will be done for version 2.2.0.

GiantTreeLP avatar Feb 14 '20 18:02 GiantTreeLP