Affects Version/s: Minecraft 1.14 Pre-Release 3, Minecraft 1.14.2, 1.15 Pre-Release 2
Fix Version/s: None
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.
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