Player data and region files not written/saved to disk simultaneously, causing item loss/duplication
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
- Make sure syncChunkWrites in options.txt is set to true
- Create a world and fill your inventory with things
- Leave the world to make sure player data gets written to disk
- Rejoin the world
- Die
- Forcefully terminate minecraft's java process (Taskmanager, /taskkill, ...)
- 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
2012-10-24, 03:51 PM
2025-01-23, 11:07 AM
111
56
duplication, multiplayer, singleplayer
Minecraft 1.4.1 - 25w04a
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, 1.20.5, 1.20.6, 1.21 Pre-Release 4, 1.21, 1.21.1, 24w40a, 1.21.4, 25w04a