Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-211513

Trident returning to owner not in the same world can cause permanent player kick

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 20w51a, 21w03a, 1.16.5, 21w05b, 21w06a, 21w08b
    • Fix Version/s: 21w11a
    • Labels:
      None
    • Confirmation Status:
      Community Consensus
    • Category:
      Player, Projectiles
    • Mojang Priority:
      Very Important

      Description

      The Bug:

      When a trident is returning to its owner with loyalty and the owner goes into another world before it can reach them, the trident can no longer find the owner. This can cause a non-owner player, who is in survival and picks up the trident in this state, to be kicked from the server and stay kicked as they log in on top of the trident.  Also these steps can be used to create floating tridents.

      How to Reproduce:

      Watch this video as it is a little hard to explain without a video:

      https://youtu.be/fX8Fi6m65oo

      The Cause:

      The owner is null and there is no catch for this null. when the non-owner goes to pick it up, it checks to see if this player's uuid matches the other player's uuid. As the other player's uuid is null, as they are not in the same world, it causes a null point exception. Basically getOwner() returns null

      The Reports

      Server side report

      [Server thread/WARN]: Failed to handle packet for ...
      u: Ticking player
              at aah.v_(SourceFile:492) ~[server.jar:?]
              at aay.b(SourceFile:207) ~[server.jar:?]
              at nd.a(SourceFile:234) ~[server.jar:?]
              at aax.c(SourceFile:173) ~[server.jar:?]
              at net.minecraft.server.MinecraftServer.b(SourceFile:879) ~[server.jar:?]
              at zg.b(SourceFile:303) ~[server.jar:?]
              at net.minecraft.server.MinecraftServer.a(SourceFile:808) ~[server.jar:?]
              at net.minecraft.server.MinecraftServer.w(SourceFile:667) ~[server.jar:?]
              at net.minecraft.server.MinecraftServer.a(SourceFile:254) ~[server.jar:?]
              at java.lang.Thread.run(Unknown Source) [?:1.8.0_144]
      Caused by: java.lang.NullPointerException
              at bfx.a_(SourceFile:546) ~[server.jar:?]
              at bgv.a_(SourceFile:184) ~[server.jar:?]
              at bft.c(SourceFile:621) ~[server.jar:?]
              at bft.k(SourceFile:597) ~[server.jar:?]
              at aqj.j(SourceFile:2254) ~[server.jar:?]
              at bft.j(SourceFile:274) ~[server.jar:?]
              at aah.v_(SourceFile:428) ~[server.jar:?]
              ... 9 more
      

      Client side report

      unexpectedly disconnected from server!
      java.io.IOException: An existing connection was forcibly closed by the remote host
          at sun.nio.ch.SocketDispatcher.read0(Native Method)
          at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
          at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
          at sun.nio.ch.IOUtil.read(IOUtil.java:192)
          at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
          at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288)
          at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1108)
          at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:345)
          at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
          at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:647)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:582)
          at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:499)
          at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:461)
          at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
          at java.lang.Thread.run(Thread.java:745)
      

      Fabric report for those who want to see better:

      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]: net.minecraft.class_148: Ticking player
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at Not Enough Crashes deobfuscated stack trace.(1.16.2+build.47) ~[?:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at net.minecraft.server.network.ServerPlayerEntity.playerTick(ServerPlayerEntity:492) ~[?:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at net.minecraft.server.network.ServerPlayNetworkHandler.tick(ServerPlayNetworkHandler:207) ~[?:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at net.minecraft.network.ClientConnection.tick(ClientConnection:234) ~[?:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at net.minecraft.server.ServerNetworkIo.tick(ServerNetworkIo:173) ~[?:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at net.minecraft.server.MinecraftServer.tickWorlds(MinecraftServer:879) ~[intermediary-minecraft_server_1.16.2.jar:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at net.minecraft.server.dedicated.MinecraftDedicatedServer.tickWorlds(MinecraftDedicatedServer:303) ~[?:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at net.minecraft.server.MinecraftServer.tick(MinecraftServer:808) ~[intermediary-minecraft_server_1.16.2.jar:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at net.minecraft.server.MinecraftServer.handler$zip000$modifiedRunLoop(MinecraftServer:4761) ~[intermediary-minecraft_server_1.16.2.jar:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at net.minecraft.server.MinecraftServer.runServer(MinecraftServer:648) ~[intermediary-minecraft_server_1.16.2.jar:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer:254) ~[intermediary-minecraft_server_1.16.2.jar:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at java.lang.Thread.run(Thread.java:834) [?:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]: Caused by: java.lang.NullPointerException
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at Not Enough Crashes deobfuscated stack trace.(1.16.2+build.47) ~[?:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at net.minecraft.entity.projectile.PersistentProjectileEntity.onPlayerCollision(PersistentProjectileEntity:546) ~[?:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at net.minecraft.entity.projectile.TridentEntity.onPlayerCollision(TridentEntity:184) ~[?:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at net.minecraft.entity.player.PlayerEntity.collideWithEntity(PlayerEntity:621) ~[?:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at net.minecraft.entity.player.PlayerEntity.tickMovement(PlayerEntity:597) ~[?:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at net.minecraft.entity.LivingEntity.tick(LivingEntity:2254) ~[?:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at net.minecraft.entity.player.PlayerEntity.tick(PlayerEntity:274) ~[?:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         at net.minecraft.server.network.ServerPlayerEntity.playerTick(ServerPlayerEntity:428) ~[?:?]
      Jan 15 02:15:20 Ubuntu-1804-bionic-64-minimal run.sh[30730]:         ... 10 more
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            Kman032317 Kyle Weber
            Votes:
            9 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              CHK: