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

OutOfMemory crash upon attempting to save a world with very large amounts of block entities

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.17.1, 21w37a, 21w38a, 21w39a, 21w40a, 21w41a, 21w42a, 21w43a, 21w44a, 1.18 Pre-release 1, 1.18 Pre-release 4, 1.18 Pre-release 5, 1.18 Release Candidate 3, 1.18, 1.18.1, 22w05a, 22w15a, 1.19 Pre-release 1, 1.19, 1.19.1 Pre-release 4, 1.19.2, 23w04a, 1.20.4
    • Confirmed
    • Crash, Performance
    • Important
    • Platform

      The bug

      Very large amounts of block entities (in this case, furnaces) cause intense server-side lag (MC-117075) and use up excessive memory. This will cause the world or certain chunks to fail to save or corrupt, and the game to run out of memory and crash. This does not happen on superflat worlds with furnaces.

      To reproduce

      1. Create a new world and switch to spectator mode.
      2. Execute /fill ~50 ~ ~50 ~-50 ~2 ~-50 furnace and create multiple layers of tens of thousands of furnaces in the world.
      3. Continue to execute the commands up to y=255 until about a million furnaces are placed.
      4. Notice how extreme lag occurs, and observe the Mem usage steadily going up.
      5. Quit the world.
      6. The world will get stuck in the saving world screen, until failing to save and crashing due to java.lang.OutOfMemoryError: Java heap space.

        1. 2021-08-21_20_00_32-New World-1_17_1.zip
          2.09 MB
        2. 2021-10-31-1.log
          20 kB
        3. 2021-11-09_21.58.07.png
          2021-11-09_21.58.07.png
          60 kB
        4. crash-2021-09-24_22.31.29-server.txt
          4 kB
        5. crash-2021-10-04_19.57.02-client.txt
          4 kB
        6. crash-2021-11-14_21.41.58-server.txt.zip
          2 kB
        7. crash-2021-11-27_22.33.07-client.txt
          5 kB
        8. crash-2021-12-19_20.33.54-server.txt
          2 kB
        9. deobf_crash-2021-09-24_22.31.29-server.txt
          6 kB
        10. deobf_crash-2021-11-27_22.33.07-client.txt
          9 kB
        11. deobf_crash-2021-12-19_20.33.54-server.txt
          4 kB
        12. error_log_(abridged).txt
          3 kB
        13. latest_2.log
          27 kB
        14. latest.log
          41 kB
        15. latest-1.log
          24 kB
        16. latest-2.log
          15 kB

            Unassigned Unassigned
            ampolive [Mod] ampolive
            Votes:
            20 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              CHK: