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

Mob Spawners Using "SpawnPotentials" Cause Memory Leak

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: Minecraft 14w06b
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Windows 7, Java 7 Update 51
    • Confirmation Status:
      Unconfirmed

      Description

      Mob spawners utilizing the "SpawnPotentials" property create ghost entities every time they fail to spawn. This causes the the entity count to increase even if no mobs are being spawned (see the debug menu), and eventually causes a crash due to thousands of entities. These ghost entities cannot be seen and cannot be removed with /kill.

      This problem started with 14w03b and is still occurring in 14w06b. It seems to be client-side because logging out and back in (SSP or SMP) clears the entity count back to normal.

      Below are a few commands useful for observing the bug.

      Leak (using SpawnPotentials)
      setblock ~0 ~1 ~0 mob_spawner 0 replace {SpawnPotentials:[{Type:"Villager",Weight:1,}],SpawnCount:1,SpawnRange:10,Delay:-1,MinSpawnDelay:10,MaxSpawnDelay:10,MaxNearbyEntities:1,RequiredPlayerRange:20}
      
      No leak (not using SpawnPotentials)
      setblock ~0 ~1 ~0 mob_spawner 0 replace {EntityId:"Villager",SpawnCount:1,SpawnRange:10,Delay:-1,MinSpawnDelay:10,MaxSpawnDelay:10,MaxNearbyEntities:1,RequiredPlayerRange:20}
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Solumid Solus Lumidas
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: