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

Player data and region files not written/saved to disk simultaneously, causing item loss/duplication

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Minecraft 1.4.5
    • Minecraft 1.4.1, Snapshot 13w19a, Snapshot 13w21a, Minecraft 1.8.8, Minecraft 16w02a, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.4, Minecraft 16w20a, Minecraft 1.11, Minecraft 16w50a, Minecraft 1.11.2, Minecraft 17w17a, Minecraft 17w17b, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 18w15a, Minecraft 1.13-pre1, Minecraft 1.13-pre2, Minecraft 1.13.2, 1.14.4, 1.15.2, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 20w45a, 1.16.5, 21w06a, 21w07a, 21w08b, 21w11a, 21w14a, 21w19a, 1.17, 1.17.1 Pre-release 1, 1.17.1, 1.18.1, 22w03a, 1.19, 1.19.2, 1.19.3, 23w03a, 23w04a, 1.19.4 Pre-release 4, 1.19.4 Release Candidate 2, 1.19.4, 23w18a, 1.20 Pre-release 5, 1.20, 1.20.1, 23w32a, 1.20.2
    • Confirmed
    • Player
    • Normal
    • Platform

      The bug

      Due to player data and region files not written to disk simultaneously, items can be duplicated quite easy under certain conditions. As of 1.16, Minecraft can be configured to run in synchronous disk i/o mode, making this issue more obvious and easier to reproduce.

      How to reproduce

      1. Make sure syncChunkWrites in options.txt is set to true
      2. Create a world and fill your inventory with things
      3. Leave the world to make sure player data gets written to disk
      4. Rejoin the world
      5. Die
      6. Forcefully terminate minecraft's java process (Taskmanager, /taskkill, ...)
      7. Rejoin the world
        → Notice things you've collected now appear on the ground and in your inventory

      Video demonstrating the issue (potentially outdated regarding reproduction): https://youtu.be/0RYRj5XN8vk?t=25s

            Unassigned Unassigned
            Mask3D_WOLF Mask3D_WOLF
            Votes:
            102 Vote for this issue
            Watchers:
            51 Start watching this issue

              Created:
              Updated:
              CHK: