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

Summoned entities in "ticking" chunks do not despawn, causing resource leak

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.14 Pre-Release 3, Minecraft 1.14.2
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Unconfirmed
    • Category:
      (Unassigned)

      Description

      It is possible to force the generation of persistent entities by summoning them into "ticking" chunks. These entities will not despawn on their own.

      This can be seen by summoning entities at the location of other entities within "ticking" chunks. Such entities will persist in memory and can accumulate. This can eventually cause lag and possible crashes if the command is invoked repeatedly because the number of entities grows exponentially.

      To reproduce:
      1. Create a superflat world.
      2. Set the time to eternal night so hostile mobs spawn.
      3. Move about 4 chunks from spawn in each direction and return to spawn.
      4. Run the following command: `/execute at @e[type=!player] run summon minecraft:evoker_fangs`
      5. Run the following command: `/kill @e[type=minecraft:evoker_fangs]` - this sometimes removes evoker fangs, proving they are not removed automatically. Expected outcome for kill command: "no entity was found".

      To see the leak, run step 4 several times.

      Examples demonstrating exponential growth:

      • running step 4 once before killing the evoker_fangs entities removed 6 entities
      • running step 4 twice removed 18 entities
      • running step 4 10 times removed 6138 entities
      • running step 4 14 times removed 98298 entities and the lag was noticeable

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bdm68 bdm68
            • Votes:
              3 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: