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

Certain Spawner Tag Conditions Induce Game Crash

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.16 Pre-release 3
    • Minecraft 1.13, Minecraft 18w31a, Minecraft 18w32a, Minecraft 18w33a, Minecraft 1.13.1-pre1, Minecraft 1.13.1
    • None
    • Operating System: Windows 10 Home

      Java Version: 64-Bit 1.8.0_51

      Graphics Card: NVIDIA GeForce 940MX

       
    • Confirmed
    • (Unassigned)

      While messing around with spawners, I was messing around with the tags for SpawnPotentials and SpawnData. While messing with them, I stumbled upon a weird combination that led to my game crashing. After investigating it further, I found that there were only certain conditions that this crash occurred.
      For ease of investigation and to recreation of my results, I have compiled some of my results and tests into a structure that's formed from a structure block. First, download the .nbt file for the structure and from the world folder, put it in the <World Name>/generated/minecraft/structures folder. Then go into the world and run the command below in the command block.

       

      give @p minecraft:structure_block{BlockEntityTag:{metadata:"",mirror:"NONE",ignoreEntities:1b,powered:0b,seed:0L,author:"?",rotation:"NONE",posX:1,mode:"LOAD",posY:0,sizeX:9,posZ:1,integrity:1.0f,showair:0b,name:"minecraft:spawner_bug",id:"minecraft:structure_block",sizeY:5,sizeZ:9,showboundingbox:1b},display:{Lore:["(+NBT)"]}} 1

       

      I have found that when there is a capital letter in ID of an entity in the SpawnPotentials tag, AND there is an entity with a correct ID in the SpawnData tag, the game will crash. This will happen if these conditions are set on a spawner, regardless of use of "/data merge block" or "/setblock".

      To try the crash out, run this command as a player or in a command block. It will crash the game, but the world it was used in will not be corrupted. The crash works for different entities, not just the ones I used in the command. Also, because the ID just needs to contain at least one capital letter, "{Entity:{id:"cOw"}}" and "{Entity:{id:"cOW"}}" would also induce to a crash.

       

      setblock ~ ~1 ~ spawner{SpawnPotentials:[{Entity:{id:"Cow"}}],SpawnData:{id:"chicken"}}

      However, if "minecraft:" is used in the SpawnPotentials entity's ID, then the crash would not occur. For example, "{Entity:{id:"Cow"}}" is used in the command, and would induce a crash. In contrast, if "{Entity:{id:"minecraft:Cow"}}" is used, a crash will not occur and the entity will instead not register as a real one.

      I have done more conditional testing with capital letters on my time, but the results can be found and tested in the structure file.

      Stack trace

      Time: 7/22/18 5:57 PM
      Description: Exception ticking world
      
      i: Non [a-z0-9/._-] character in path of location: minecraft:Cow
      	at pc.<init>(SourceFile:38)
      	at pc.<init>(SourceFile:43)
      	at ayg.a(SourceFile:37)
      	at axe.b(SourceFile:216)
      	at bjv.a(SourceFile:56)
      	at bjv.aa_(SourceFile:74)
      	at bjv.Z_(SourceFile:69)
      	at tj.a(SourceFile:205)
      	at tj.d(SourceFile:195)
      	at tk.c(SourceFile:101)
      	at tc.i_(SourceFile:220)
      	at net.minecraft.server.MinecraftServer.w(SourceFile:723)
      	at net.minecraft.server.MinecraftServer.v(SourceFile:656)
      	at dfx.v(SourceFile:157)
      	at net.minecraft.server.MinecraftServer.run(SourceFile:559)
      	at java.lang.Thread.run(Thread.java:745)
      

        1. spawner_bug.nbt
          3 kB
        2. crash-2018-07-22_17.57.27-server.txt
          3 kB
        3. 2018-07-22_17.11.14.png
          2018-07-22_17.11.14.png
          1.06 MB
        4. 2018-07-22_17.11.10.png
          2018-07-22_17.11.10.png
          1.05 MB
        5. 2018-07-22_17.11.05.png
          2018-07-22_17.11.05.png
          1.31 MB

            grum [Mojang] Grum (Erik Broes)
            jackdeathshard5 Jack Lanois
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: