Steps to reproduce
- Open a world with many locked maps, or create one with an empty map and a glass pane in a cartography table, and duplicate it in the data folder to have a good quantity of locked maps. You can check that they are with tools like nbtexplorer.
- Place a map in an item frame to force game to load it
- Wait auto-saving
Observed behaviour
The game slows down a lot, freezes and eventually crashes. This is because it tries to resave all the maps that have been loaded, even though they are locked and therefore unable to change. Some map.dat file is also corrupted during an unsuccessful backup.
Expected behaviour
The game shouldn't try to re-save locked maps.
Notes
This has a particular impact on data pack creations, especially those that use maps to display videos in-game.
For example, with datapack(BA.zip) and maps(data.zip) generated using McMovieMaker to display a video in the game, causes a freeze of over 20 minutes (at least with my configuration and 8GB RAM) as soon as the game tries to autosave. Logs in the pinned comment