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

Too many sounds causes client to stall, limit can be easily reached with rabbits

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.18 Pre-release 5
    • 20w17a, 1.16.2, 1.16.3, 1.16.4, 20w46a, 20w49a, 1.17 Release Candidate 1, 1.17, 1.17.1 Release Candidate 1, 1.17.1, 21w37a, 21w39a, 21w40a, 21w44a
    • None
    • Windows 10, Java 1.8.0_51 64bit
    • Community Consensus
    • Performance, Sound
    • Important

      This is likely related to MC-177664.  I am creating this issue to provide more context and a save file to demonstrate the issue.

      In short, when the limit of 247 sounds is exceeded, the client stalls and writes the following to the console several thousands of times:
      Maximum sound pool size 247 reached
      Failed to create new sound handle

      Once the sounds are within the limit, the client responds again.

      When the client is stalled, the internal (or dedicated for multiplayer) server is still running, which can be demonstrated by the attached save file.

      The limit can be reached during normal play when making a rabbit farm.  I originally ran into the issue when building a rabbit farm similar to this one on a small multiplayer server.  While populating the farm, my client stalled.  I forced the game to close, then ran into the same problem each time I logged on again.  While logged on, with the client stalling, I used the server console to teleport my player away from the farm, which made my client instantly respond again.

      From my testing, the issue is only present from snapshot 20w09a onward.  Previous versions force the number of sounds down before exceeding the limit.

      The "Sound Overload Demo 20w09a.zip" contains 4 contraptions to show the issue.  To the south is 2 contraptions that show the number of sounds from a single rabbit and a single cow (using f3, cow maxes out at 3, rabbit maxes out at 12).  In the middle is a contraption like the rabbit farm with 72 rabbits that stalls the game for a few seconds before redstone removes the water to lower the sounds.  To the north is a contraption with 432 chickens that causes the game to stall very briefly.

      The "Sound Overload Demo 1_15_2.zip" has the same contraption that lags the game in the snapshots, but in 1.15.2 to show how the game handled the issue in previous versions.

        1. 358014_image-2020-12-10-23-02-25-730.png
          34 kB
          blublu_owns_123
        2. screenshot-1.png
          17 kB
          blublu_owns_123

            gnembon [Mojang] Gnembon
            tiedyeverthing Jerry Terrell
            Votes:
            27 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: