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

Game freezes when there is a lot of mobs together

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Awaiting Response
    • None
    • 1.16.1
    • Unconfirmed
    • (Unassigned)

      I was doing my chicken and cow farm in my multiplayer server (1.16), I like to stack a lot of mobs for the feeding exp, so I was feeding them and my game just froze, (deadlock?) nothing to do besides reseting the game. I had time after resetting to get further away from the place before another deadlock happen, but If I go back to that place my game frozes again. (Server was okay and still running with other people playing)

      I notice when feeding them it's more likely to happen.

      How to recreate bug:
      So I tried to debug a little bit in the 1.16 version, singleplayer, I made a setup, a 5x5x2 stone hollow square and used inside 6 stack of chicken eggs (384). Nothing happens but as soon as I place water inside the square the game freezes. The same when I throw a splash instant damage 2 potion at them. (100% succes rate)

      So I went to the 1.16.1 version to check if the bug was fixed, I tried the same setup and the game froze, I never noticed this issue before so I tried the 1.15.2 and with the same setup the game didn't froze (Tried a couple of times, everything normal)

      I figured out the bug must have been introduced in a snapshot...
      Since there are like 30 versions between 1.16 and 1.15.2 I did like a binary search to check in which version the bug was introduced.
      I tried:
      20w18a Happens
      20w13a Happens
      20w09a Happens
      20w08a Doesn't happen
      20w07a Doesn't happen

      So probably the bug was introduced in the 20w09a snapshot

      After that I went back to the 1.16.1 version and I did more tests
      1. Tried with cows, game forze before even throwing a potion or putting water.
      2. With less cows +Water or +Harming potion game froze.
      3. Tried with zombies, again game froze befores throwing a potion or putting water.
      4. I remembered that when I left the area of farm in my server the game was ok again, (so distance)/(mobs not rendered) maybe has to do with the freezing? With that in mind I flew over the  square and throw a potion upwards an moved without looking at the chickens in the whole process, the game didn't forze, I tried again but the game froze... WEIRD.
      5. I gave it a thought Maybe it's the sound? I was too far up to hear them +Chikens walking on water has extra sounds +Killing them with potions had extra sounds too. I disabled sounds and surprise, game didn't froze, didn't mattered how much I tried
      6. I flew over the chickens, sound on but too far away to listen and looking directly, game didn't froze.

      In F3, I saw a 247 sound limit... when the chickens were alive there were around 100 active sounds all the time, maybe the game frozes when you reach that 247 limit?

      Note: Once I forgot about the deadlock and didn't closed the game, I don't know how much time passed (I guess 15-20 minutes) the game resumed.

      Workaround if you are experiencing this bug
      Disable friendly mob sounds (Maybe disable hostile mob sounds if you have like a giant mob farm or something)

      TLDR
      Probably fromj 20w09a+ This bug is active, Too many sounds causes a deadlock 

        1. 2020-06-27 23-48-15.mp4
          7.85 MB
        2. Screenshot_6.png
          Screenshot_6.png
          1.14 MB
        3. With F3 on.mp4
          7.69 MB

            Unassigned Unassigned
            Zomur Zomur Zumax
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: