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

Converting zombie villager without ConversionPlayer set crashes server

XMLWordPrintable

    • Confirmed

      The bug

      Setting a ConversionTime for a zombie villager without setting ConversionPlayerLeast and ConversionPlayerMost crashes the server.

      Description: Ticking entity
      
      java.lang.NullPointerException: Ticking entity
      	at amr.b(SourceFile:2627)
      	at ads.dr(SourceFile:186)
      	at ads.B_(SourceFile:113)
      	at amr.a(SourceFile:1514)
      	at om.a(SourceFile:714)
      	at amr.h(SourceFile:1499)
      	at amr.k(SourceFile:1382)
      	at om.k(SourceFile:547)
      	at net.minecraft.server.MinecraftServer.D(SourceFile:634)
      	at net.minecraft.server.MinecraftServer.C(SourceFile:562)
      	at cgx.C(SourceFile:154)
      	at net.minecraft.server.MinecraftServer.run(SourceFile:466)
      	at java.lang.Thread.run(Thread.java:745)
      

      How to reproduce

      /summon zombie_villager ~ ~ ~ {ConversionTime:0}
      

      Code analysis

      Based on 1.12-pre3 decompiled using CFR

      It looks like the UUID of the player who started the conversion is compared with the UUIDs of online players to then trigger the advancement trigger cured_zombie_villager. The problem is that it is not tested if the passed UUID is null which causes a NullPointerException when the method equals is called for it.

        1. 2017-05-17_21.03.29.png
          189 kB
          lars pedersen
        2. crash-2016-06-13_10.18.15-client.txt
          2 kB
          lars pedersen
        3. crash-2017-05-15_13.52.53-server.txt
          3 kB
          lars pedersen
        4. crash-2017-05-17_20.56.53-server.txt
          3 kB
          lars pedersen
        5. crash-2017-05-17_21.03.51-server.txt
          3 kB
          lars pedersen
        6. crash-2017-05-17_21.15.36-server.txt
          3 kB
          lars pedersen
        7. crash-2017-05-17_21.17.40-server.txt
          3 kB
          lars pedersen
        8. crash-2017-05-17_21.30.44-server.txt
          3 kB
          lars pedersen

            jeb [Mojang] Jeb (Jens Bergensten)
            DK_LAG lars pedersen
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: