
The world gets corrupted after using the Catch Delusion
julian428 opened this issue · 8 comments
Screencast.from.2024-09-10.10-58-33.webm
disconnect-2024-09-10_09.58.45-client.txt
disconnect-2024-09-10_09.59.15-client.txt
Client Log
[10/09/2024 09:57:57 am] Console Cleared
[10/09/2024 09:58:15 am] [Server thread/INFO] Saving and pausing game...
[10/09/2024 09:58:15 am] [Server thread/INFO] Saving chunks for level 'ServerLevel[New World]'/minecraft:overworld
[10/09/2024 09:58:15 am] [Server thread/INFO] Saving chunks for level 'ServerLevel[New World]'/minecraft:the_nether
[10/09/2024 09:58:15 am] [Server thread/INFO] Saving chunks for level 'ServerLevel[New World]'/minecraft:the_end
[10/09/2024 09:58:45 am] [Netty Local Client IO #0/ERROR] Negative index in crash report handler (90/94)
[10/09/2024 09:58:45 am] [Server thread/INFO] MINECRAFTUSERNAME lost connection: Disconnected
[10/09/2024 09:58:45 am] [Server thread/INFO] MINECRAFTUSERNAME left the game
[10/09/2024 09:58:45 am] [Server thread/INFO] Stopping singleplayer server as player logged out
[10/09/2024 09:58:45 am] [Server thread/INFO] Stopping server
[10/09/2024 09:58:45 am] [Server thread/INFO] Saving players
[10/09/2024 09:58:45 am] [Server thread/INFO] Saving worlds
[10/09/2024 09:58:45 am] [Server thread/INFO] Saving chunks for level 'ServerLevel[New World]'/minecraft:overworld
[10/09/2024 09:58:46 am] [Server thread/INFO] Saving chunks for level 'ServerLevel[New World]'/minecraft:the_nether
[10/09/2024 09:58:46 am] [Server thread/INFO] Saving chunks for level 'ServerLevel[New World]'/minecraft:the_end
[10/09/2024 09:58:46 am] [Server thread/INFO] ThreadedAnvilChunkStorage (New World): All chunks are saved
[10/09/2024 09:58:46 am] [Server thread/INFO] ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[10/09/2024 09:58:46 am] [Server thread/INFO] ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[10/09/2024 09:58:46 am] [Server thread/INFO] ThreadedAnvilChunkStorage: All dimensions are saved
[10/09/2024 09:58:46 am] [Render thread/WARN] Client disconnected with reason: Internal Exception: io.netty.handler.codec.DecoderException: Failed to decode packet 'clientbound/minecraft:container_set_slot'
[10/09/2024 09:58:56 am] at net.minecraft.class_32.method_54524(class_32.java:293)
[10/09/2024 09:58:56 am] at net.minecraft.class_32.method_54527(class_32.java:253)
[10/09/2024 09:58:56 am] at net.minecraft.class_32.method_43418(class_32.java:178)
[10/09/2024 09:58:56 am] at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[10/09/2024 09:58:56 am] at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
[10/09/2024 09:58:56 am] at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
[10/09/2024 09:58:56 am] at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
[10/09/2024 09:58:56 am] at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
[10/09/2024 09:58:56 am] at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
[10/09/2024 09:58:56 am] at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
[10/09/2024 09:58:56 am] [Worker-Main-8/ERROR] Exception reading USERSDIR\instances\Minecraft1211withFabric\saves\New World\level.dat
[10/09/2024 09:59:08 am] [Render thread/INFO] Loaded 1300 recipes
[10/09/2024 09:59:08 am] [Render thread/INFO] Loaded 1405 advancements
[10/09/2024 09:59:09 am] [Render thread/INFO] Applied 0 biome modifications to 0 of 64 new biomes in 343.9 μs
[10/09/2024 09:59:09 am] [Server thread/INFO] Starting integrated minecraft server version 1.21.1
[10/09/2024 09:59:09 am] [Server thread/INFO] Generating keypair
[10/09/2024 09:59:10 am] [Server thread/INFO] Preparing start region for dimension minecraft:overworld
[10/09/2024 09:59:10 am] [Render thread/INFO] Preparing spawn area: 2%
[10/09/2024 09:59:10 am] [Render thread/INFO] Time elapsed: 80 ms
[10/09/2024 09:59:10 am] [Server thread/INFO] Changing view distance to 12, from 10
[10/09/2024 09:59:10 am] [Server thread/INFO] Changing simulation distance to 12, from 0
[10/09/2024 09:59:10 am] [Server thread/INFO] MINECRAFTUSERNAME[local:E:e0ffa652] logged in with entity id 622 at (1081.1657225926879, 71.0, -405.25174722332497)
[10/09/2024 09:59:10 am] [Server thread/INFO] Sending server config values to client
[10/09/2024 09:59:10 am] [Server thread/INFO] MINECRAFTUSERNAME joined the game
[10/09/2024 09:59:11 am] [Render thread/INFO] Applying server overrides
[10/09/2024 09:59:11 am] [Render thread/INFO] Responding with client values
[10/09/2024 09:59:11 am] [Server thread/INFO] Receiving client config
[10/09/2024 09:59:11 am] [Render thread/INFO] Loaded 25 advancements
[10/09/2024 09:59:15 am] [Netty Local Client IO #1/ERROR] Negative index in crash report handler (74/78)
[10/09/2024 09:59:15 am] [Server thread/INFO] MINECRAFTUSERNAME lost connection: Disconnected
[10/09/2024 09:59:15 am] [Server thread/INFO] MINECRAFTUSERNAME left the game
[10/09/2024 09:59:15 am] [Server thread/INFO] Stopping singleplayer server as player logged out
[10/09/2024 09:59:15 am] [Server thread/INFO] Stopping server
[10/09/2024 09:59:15 am] [Server thread/INFO] Saving players
[10/09/2024 09:59:15 am] [Server thread/INFO] Saving worlds
[10/09/2024 09:59:16 am] [Server thread/INFO] Saving chunks for level 'ServerLevel[New World]'/minecraft:overworld
[10/09/2024 09:59:16 am] [Server thread/INFO] Saving chunks for level 'ServerLevel[New World]'/minecraft:the_nether
[10/09/2024 09:59:16 am] [Server thread/INFO] Saving chunks for level 'ServerLevel[New World]'/minecraft:the_end
[10/09/2024 09:59:16 am] [Server thread/INFO] ThreadedAnvilChunkStorage (New World): All chunks are saved
[10/09/2024 09:59:16 am] [Server thread/INFO] ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
[10/09/2024 09:59:16 am] [Server thread/INFO] ThreadedAnvilChunkStorage (DIM1): All chunks are saved
[10/09/2024 09:59:16 am] [Server thread/INFO] ThreadedAnvilChunkStorage: All dimensions are saved
[10/09/2024 09:59:16 am] [Render thread/WARN] Client disconnected with reason: Internal Exception: io.netty.handler.codec.DecoderException: Failed to decode packet 'clientbound/minecraft:container_set_slot'
[10/09/2024 09:59:18 am] at net.minecraft.class_32.method_54524(class_32.java:293)
[10/09/2024 09:59:18 am] at net.minecraft.class_32.method_54527(class_32.java:253)
[10/09/2024 09:59:18 am] at net.minecraft.class_32.method_43418(class_32.java:178)
[10/09/2024 09:59:18 am] at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[10/09/2024 09:59:18 am] at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
[10/09/2024 09:59:18 am] at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
[10/09/2024 09:59:18 am] at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
[10/09/2024 09:59:18 am] at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
[10/09/2024 09:59:18 am] at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
[10/09/2024 09:59:18 am] at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
[10/09/2024 09:59:18 am] [Worker-Main-9/ERROR] Exception reading USERSDIR\instances\Minecraft1211withFabric\saves\New World\level.dat
[10/09/2024 09:59:38 am] Copied Log to clipboard
Alright @enjarai I have some bad news, looks like this is the same issue encountered with the work I was doing on Mini Tardis. The scenario is quite similar, CodecUtils.toCodec
is utilized because the component needs a Codec
and spells are serialized using Endec
, and somehow the dispatch map puts the type
field in the wrong scope, resulting in a parsing error as it cannot be mapped back. The strange part is that it doesn't happen with just any fragment. So far, I've only seen it with SlotFragment
. Even stranger, it was happening with a completely different kind of value in Mini Tardis, so it isn't unique to fragments.
Failed to decode: Field 'type' was missing from serialized data, but no default value was provided {spell:{glyph:{slot:40},type:"trickster:slot"},sub_parts:[]}
Notice how the type
field does exist, but it isn't before the slot
field, rather in a completely different scope. This is unexpected behavior from the serializer; it does not fulfill the example provided by the javadocs of owo-lib's dispatchedStruct
.
The expected format is as follows:
{
"spell": {
"glyph": {
"type": "trickster:slot",
"slot": 40
}
},
"sub_parts": [
]
}
I've made a branch for this issue.
I've made some commits that address this issue, it'll be resolved with the next release.
When I have other mods installed the world gets corrupted without the possibility to restore it. It just crashes the game.
This is a major issue, thanks for reporting. We can reproduce it, though im not entirely sure why...
This appears to be an issue with the client's handling of the update to the inventory slot of the mirror sent by the server. The strange part is that slot fragments (referencing block inventories) appear to work fine in the spells that are running persistently, and I'm not sure why that'd be...
There may be an issue deserializing packets, while reading from nbt is fine? Persistent spell data isnt fully synced after all...
Either that, or serializing without a block position is broken. I only tested the container-targeting slots recently.