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

            Unassigned Unassigned
            ampolive [Mod] ampolive
            Votes:
            15 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              CHK: