mojira.dev
MC-274519

Minecraft resaves all maps with every autosave

Steps to reproduce

  1. 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.

  2. Place a map in an item frame to force game to load it

  3. 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

Linked issues

Attachments

Comments 10

Please attach the crash report found in [minecraft/crash-reports/crash-<DATE>-client.txt|https://minecrafthopper.net/help/finding-minecraft-data-folder/] here.
If you cannot find a crash report, please attach the full launcher log found in [minecraft/launcher_log.txt|https://minecrafthopper.net/help/finding-minecraft-data-folder/].

This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

The log indicates that there might be a corrupt map data file, which could potentially cause the crash.

[17:54:22] [Server thread/ERROR]: Error loading saved data: map_49476
java.lang.ArrayIndexOutOfBoundsException: arraycopy: length -1 is negative
	at java.base/java.lang.System.arraycopy(Native Method) ~[?:?]
	at java.base/java.io.PushbackInputStream.unread(PushbackInputStream.java:247) ~[?:?]
	at eps.a(SourceFile:119) ~[minecraft-1.20.6-client.jar:?]
	at eps.a(SourceFile:95) ~[minecraft-1.20.6-client.jar:?]
	at eps.a(SourceFile:75) ~[minecraft-1.20.6-client.jar:?]
	at eps.b(SourceFile:63) ~[minecraft-1.20.6-client.jar:?]
	at arf.a(SourceFile:1254) ~[minecraft-1.20.6-client.jar:?]
	at cuz.a(SourceFile:56) ~[minecraft-1.20.6-client.jar:?]
	at cjc.c(SourceFile:261) ~[minecraft-1.20.6-client.jar:?]
	at cjc.a(SourceFile:375) ~[minecraft-1.20.6-client.jar:?]
	at bsw.g(SourceFile:1964) ~[minecraft-1.20.6-client.jar:?]
	at apw.a(SourceFile:53) ~[minecraft-1.20.6-client.jar:?]
	at apv.a(SourceFile:295) ~[minecraft-1.20.6-client.jar:?]
	at apv.a(SourceFile:236) ~[minecraft-1.20.6-client.jar:?]
	at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
	at hx.a(SourceFile:29) ~[minecraft-1.20.6-client.jar:?]
	at hx.execute(SourceFile:13) ~[minecraft-1.20.6-client.jar:?]
	at hs.a(SourceFile:8) ~[minecraft-1.20.6-client.jar:?]
	at hk.a(SourceFile:8) ~[minecraft-1.20.6-client.jar:?]
	at ho.a(SourceFile:107) ~[minecraft-1.20.6-client.jar:?]
	at eq.a(SourceFile:381) ~[minecraft-1.20.6-client.jar:?]
	at alu.a(SourceFile:69) ~[minecraft-1.20.6-client.jar:?]
	at evc.a(SourceFile:18) ~[minecraft-1.20.6-client.jar:?]
	at java.base/java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
	at evc.a(SourceFile:18) ~[minecraft-1.20.6-client.jar:?]
	at evc.handle(SourceFile:8) ~[minecraft-1.20.6-client.jar:?]
	at evg.a(SourceFile:84) ~[minecraft-1.20.6-client.jar:?]
	at arf.b(SourceFile:431) ~[minecraft-1.20.6-client.jar:?]
	at arf.a(SourceFile:331) ~[minecraft-1.20.6-client.jar:?]
	at net.minecraft.server.MinecraftServer.b(SourceFile:998) ~[minecraft-1.20.6-client.jar:?]
	at net.minecraft.server.MinecraftServer.a(SourceFile:889) ~[minecraft-1.20.6-client.jar:?]
	at gtg.a(SourceFile:113) ~[minecraft-1.20.6-client.jar:?]
	at net.minecraft.server.MinecraftServer.y(SourceFile:691) ~[minecraft-1.20.6-client.jar:?]
	at net.minecraft.server.MinecraftServer.a(SourceFile:275) ~[minecraft-1.20.6-client.jar:?]
	at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]

I tried again by correcting the corrupted map, this effectively prevents the game from crashing but not from freezing for more than 20min on each autosave attempt. And if you close the game, it corrupts some map.dat files. 

You uploaded a latest.log from Minecraft 1.20.6 using Fabric Loader 0.15.11 and at least carpet 1.4.141+v240429 and mixinextras 0.3.5. Please upload a latest.log of this happening in a vanilla 1.21 environment.

This ticket will automatically reopen when you reply.

My multimc consol log :

Params:
  --username Futiax_TV --version 1.21 --gameDir C:/Users/Administrator/Documents/MultiMC/instances/JPDT/.minecraft --assetsDir C:/Users/Administrator/Documents/MultiMC/assets --assetIndex 17 --uuid <PROFILE ID> --accessToken <ACCESS TOKEN> --userType msa --versionType release --quickPlaySingleplayer "JPDT"
 
Window size: 854 x 480
 
Java Arguments:
[-XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump, -Xms512m, -Xmx8024m, -Duser.language=en]
 
 
Minecraft process ID: 11696
 
 
Using onesix launcher.
 
[23:15:12] [Datafixer Bootstrap/INFO]: 226 Datafixer optimizations took 409 milliseconds
[23:15:12] [main/WARN]: Invalid registry value type detected for PerfOS counters. Should be REG_DWORD. Ignoring: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PerfOS\Performance\Disable Performance Counters.
[23:15:16] [Render thread/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[23:15:16] [Render thread/INFO]: Setting user: Futiax_TV
[23:15:16] [Render thread/INFO]: Backend library: LWJGL version 3.3.3+5
[23:15:17] [Render thread/INFO]: Reloading ResourceManager: vanilla, file/jpdt(2k)
[23:15:17] [Worker-Main-5/INFO]: Found unifont_all_no_pua-15.1.05.hex, loading
[23:15:17] [Worker-Main-3/INFO]: Found unifont_jp_patch-15.1.05.hex, loading
[23:15:18] [Render thread/WARN]: Missing sound for event: minecraft:item.goat_horn.play
[23:15:18] [Render thread/WARN]: Missing sound for event: minecraft:entity.goat.screaming.horn_break
[23:15:18] [Render thread/INFO]: OpenAL initialized on device OpenAL Soft on Speakers (5- Razer Barracuda X)
[23:15:18] [Render thread/INFO]: Sound engine started
[23:15:18] [Render thread/INFO]: Created: 1024x512x4 minecraft:textures/atlas/blocks.png-atlas
[23:15:18] [Render thread/INFO]: Created: 256x256x4 minecraft:textures/atlas/signs.png-atlas
[23:15:18] [Render thread/INFO]: Created: 512x512x4 minecraft:textures/atlas/shield_patterns.png-atlas
[23:15:18] [Render thread/INFO]: Created: 512x512x4 minecraft:textures/atlas/banner_patterns.png-atlas
[23:15:18] [Render thread/INFO]: Created: 1024x1024x4 minecraft:textures/atlas/armor_trims.png-atlas
[23:15:18] [Render thread/INFO]: Created: 128x64x4 minecraft:textures/atlas/decorated_pot.png-atlas
[23:15:18] [Render thread/INFO]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas
[23:15:18] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas
[23:15:18] [Render thread/INFO]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas
[23:15:18] [Render thread/INFO]: Created: 512x256x0 minecraft:textures/atlas/particles.png-atlas
[23:15:18] [Render thread/INFO]: Created: 512x256x0 minecraft:textures/atlas/paintings.png-atlas
[23:15:18] [Render thread/INFO]: Created: 256x128x0 minecraft:textures/atlas/mob_effects.png-atlas
[23:15:18] [Render thread/INFO]: Created: 64x64x0 minecraft:textures/atlas/map_decorations.png-atlas
[23:15:18] [Render thread/INFO]: Created: 1024x512x0 minecraft:textures/atlas/gui.png-atlas
[23:15:18] [Render thread/WARN]: Shader rendertype_entity_translucent_emissive could not find sampler named Sampler2 in the specified shader program.
[23:15:20] [Render thread/INFO]: Loaded 1290 recipes
[23:15:20] [Render thread/INFO]: Loaded 1399 advancements
[23:15:20] [Server thread/INFO]: Starting integrated minecraft server version 1.21
[23:15:20] [Server thread/INFO]: Generating keypair
[23:15:21] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[23:15:22] [Render thread/INFO]: Preparing spawn area: 0%
[23:15:22] [Render thread/INFO]: Time elapsed: 679 ms
[23:15:22] [Server thread/INFO]: Changing view distance to 2, from 10
[23:15:22] [Server thread/INFO]: Changing simulation distance to 5, from 0
[23:15:23] [Server thread/INFO]: Futiax_TV[local:E:55c9e709] logged in with entity id 184 at (-316.30000001192093, 72.1875, 136.51294536005884)
[23:15:23] [Server thread/INFO]: Futiax_TV joined the game
[23:15:23] [Render thread/INFO]: Loaded 36 advancements
[23:15:45] [Server thread/INFO]: Saving and pausing game...
[23:15:45] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:overworld
[23:15:45] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_nether
[23:15:45] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_end
[23:15:49] [Server thread/INFO]: Saving and pausing game...
[23:15:49] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:overworld
[23:15:49] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_nether
[23:15:49] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_end
[23:16:04] [Server thread/INFO]: [Not Secure] <Futiax_TV> ttt
[23:16:04] [Render thread/INFO]: [CHAT] <Futiax_TV> ttt
[23:16:09] [Server thread/INFO]: Saving and pausing game...
[23:16:09] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:overworld
[23:16:09] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_nether
[23:16:09] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_end
[23:16:14] [Server thread/INFO]: [Not Secure] <Futiax_TV> ttt
[23:16:14] [Render thread/INFO]: [CHAT] <Futiax_TV> ttt
[23:16:19] [Server thread/INFO]: Saving and pausing game...
[23:16:19] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:overworld
[23:16:20] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_nether
[23:16:20] [Server thread/INFO]: Saving chunks for level 'ServerLevel[New World]'/minecraft:the_end
[23:16:31] [Render thread/INFO]: [System] [CHAT] There are no more data packs available
[23:16:33] [Render thread/INFO]: [System] [CHAT] There are 2 data pack(s) enabled: [vanilla (built-in)], [file/jpdt(2k,20fps) (world)]
[23:16:33] [Render thread/INFO]: [System] [CHAT] There are no more data packs available
[23:17:05] [Server thread/INFO]: [Futiax_TV: Disabling data pack [file/jpdt(2k,20fps) (world)]]
[23:17:05] [Render thread/INFO]: [System] [CHAT] Disabling data pack [file/jpdt(2k,20fps) (world)]
[23:17:05] [Server thread/INFO]: Loaded 1290 recipes
[23:17:05] [Server thread/INFO]: Loaded 1399 advancements
[23:17:05] [Render thread/INFO]: Loaded 36 advancements
[23:17:07] [Server thread/INFO]: [Futiax_TV: Enabling data pack [file/jpdt(2k,20fps) (world)]]
[23:17:07] [Render thread/INFO]: [System] [CHAT] Enabling data pack [file/jpdt(2k,20fps) (world)]
[23:17:09] [Server thread/INFO]: Loaded 1290 recipes
[23:17:09] [Server thread/INFO]: Loaded 1399 advancements
[23:17:09] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 2516ms or 50 ticks behind
[23:17:09] [Render thread/INFO]: Loaded 36 advancements
[23:17:13] [Server thread/INFO]: [@: Running function jpdt:tree/frame_0]
[23:17:13] [Render thread/INFO]: [System] [CHAT] [@: Running function jpdt:tree/frame_0]
[23:17:30] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 5473ms or 109 ticks behind
[23:17:51] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 6091ms or 121 ticks behind
[23:18:04] [Server thread/ERROR]: Error loading saved data: map_97993
java.io.EOFException: Unexpected end of ZLIB input stream
at java.base/java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:266) ~[?:?]
at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:175) ~[?:?]
at java.base/java.util.zip.GZIPInputStream.read(GZIPInputStream.java:128) ~[?:?]
at axx.b(SourceFile:94) ~[minecraft-1.21-client.jar:?]
at axx.read(SourceFile:32) ~[minecraft-1.21-client.jar:?]
at java.base/java.io.DataInputStream.readUnsignedByte(DataInputStream.java:295) ~[?:?]
at java.base/java.io.DataInputStream.readByte(DataInputStream.java:275) ~[?:?]
at uo.c(SourceFile:178) ~[minecraft-1.21-client.jar:?]
at uo.a(SourceFile:111) ~[minecraft-1.21-client.jar:?]
at uo.a(SourceFile:51) ~[minecraft-1.21-client.jar:?]
at eqz.a(SourceFile:96) ~[minecraft-1.21-client.jar:?]
at eqz.a(SourceFile:75) ~[minecraft-1.21-client.jar:?]
at eqz.b(SourceFile:63) ~[minecraft-1.21-client.jar:?]
at aqu.a(SourceFile:1248) ~[minecraft-1.21-client.jar:?]
at cvc.a(SourceFile:56) ~[minecraft-1.21-client.jar:?]
at cja.d(SourceFile:235) ~[minecraft-1.21-client.jar:?]
at cja.a(SourceFile:349) ~[minecraft-1.21-client.jar:?]
at bsr.g(SourceFile:2026) ~[minecraft-1.21-client.jar:?]
at api.a(SourceFile:53) ~[minecraft-1.21-client.jar:?]
at aph.a(SourceFile:295) ~[minecraft-1.21-client.jar:?]
at aph.a(SourceFile:236) ~[minecraft-1.21-client.jar:?]
at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
at ib.a(SourceFile:29) ~[minecraft-1.21-client.jar:?]
at ib.execute(SourceFile:13) ~[minecraft-1.21-client.jar:?]
at hw.a(SourceFile:8) ~[minecraft-1.21-client.jar:?]
at ho.a(SourceFile:8) ~[minecraft-1.21-client.jar:?]
at hs.a(SourceFile:107) ~[minecraft-1.21-client.jar:?]
at eu.a(SourceFile:379) ~[minecraft-1.21-client.jar:?]
at alg.a(SourceFile:69) ~[minecraft-1.21-client.jar:?]
at ewl.a(SourceFile:18) ~[minecraft-1.21-client.jar:?]
at java.base/java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
at ewl.a(SourceFile:18) ~[minecraft-1.21-client.jar:?]
at ewl.handle(SourceFile:8) ~[minecraft-1.21-client.jar:?]
at ewp.a(SourceFile:84) ~[minecraft-1.21-client.jar:?]
at aqu.b(SourceFile:432) ~[minecraft-1.21-client.jar:?]
at aqu.a(SourceFile:332) ~[minecraft-1.21-client.jar:?]
at net.minecraft.server.MinecraftServer.c(SourceFile:1021) ~[minecraft-1.21-client.jar:?]
at net.minecraft.server.MinecraftServer.a(SourceFile:912) ~[minecraft-1.21-client.jar:?]
at guo.a(SourceFile:114) ~[minecraft-1.21-client.jar:?]
at net.minecraft.server.MinecraftServer.y(SourceFile:697) ~[minecraft-1.21-client.jar:?]
at net.minecraft.server.MinecraftServer.a(SourceFile:281) ~[minecraft-1.21-client.jar:?]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
[23:18:12] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 5997ms or 119 ticks behind
[23:18:36] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 9243ms or 184 ticks behind
[23:18:59] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 8139ms or 162 ticks behind
[23:19:26] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 12064ms or 241 ticks behind
[23:19:48] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 7248ms or 144 ticks behind
[23:20:10] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 6595ms or 131 ticks behind
[23:20:35] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 10616ms or 212 ticks behind
 
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "Render thread"
 
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "JNA Cleaner"

Process crashed with exit code -1073740791 (0xffffffc0000409).
Below is an analysis of the exit code. THIS MAY BE INCORRECT AND SHOULD BE TAKEN WITH A PINCH OF SALT!
System exit code name: STATUS_STACK_BUFFER_OVERRUN
System exit code description: The system has detected buffer saturation in this application. This saturation could allow a malicious user to take control of this application.

Please note that usually neither the exit code, nor its description are enough to diagnose issues!
Always upload the entire log and not just the exit code.
Clipboard copy at: 18 Jul 2024 23:25:10 +0200

Update not working.
https://youtu.be/rr0QjRn85D0

It shows the game, the internal debugger, my resource monitor, live logs, detailed logs (lastest.log) and the data of the maps used (they are clones except for the color tags).

@unknown that is incorrect, this issue is triaged and has already been resolved as 'Fixed'. Please do not post comments like these.

Jiingy have you seen the video I recently attached?
I provided everything I had to show that the problem persisted.

If the issue still exists for you after the fix version, please check if the bug has been re-reported, and if not, create a new report detailing how the issue is not fixed.

nathanael.buendi

gegy

Plausible

Platform

Normal

Maps, Performance, Save Data

auto-saving, datapack, file, locked, map-item

1.21

24w33a

Retrieved