Skip to content

1.20.6: Failed to save entity data #10728

@Brokkonaut

Description

@Brokkonaut

Expected behavior

Chunks should save (maybe by removing invalid characters from profiles) or creating invalid profiles should be prevented by the api.

Observed/Actual behavior

Invalid profiles can be created but chunks that contain entites with itemstacks with invalid profiles don't save at all. Paper sends a "Failed to save entity data (8,-6) in world 'freebuild'" message in the logs, but no stack trace, so i patched paper to add a stack trace there:

[00:43:39] [Server thread/ERROR]: [NewChunkHolder] Failed to save entity data (8,-6) in world 'freebuild'
net.minecraft.ReportedException: Saving entity NBT
at net.minecraft.world.entity.Entity.saveWithoutId(Entity.java:2570) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at net.minecraft.world.entity.Entity.saveAsPassenger(Entity.java:2388) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at net.minecraft.world.entity.Entity.saveAsPassenger(Entity.java:2374) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at net.minecraft.world.entity.Entity.save(Entity.java:2404) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at net.minecraft.world.level.chunk.storage.EntityStorage.lambda$saveEntityChunk0$0(EntityStorage.java:121) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596) ~[?:?]
at net.minecraft.world.level.chunk.storage.EntityStorage.saveEntityChunk0(EntityStorage.java:109) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at net.minecraft.world.level.chunk.storage.EntityStorage.saveEntityChunk(EntityStorage.java:100) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at io.papermc.paper.world.ChunkEntitySlices.save(ChunkEntitySlices.java:108) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at io.papermc.paper.chunk.system.scheduling.NewChunkHolder.saveEntities(NewChunkHolder.java:1924) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at io.papermc.paper.chunk.system.scheduling.NewChunkHolder.save(NewChunkHolder.java:1791) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at io.papermc.paper.chunk.system.scheduling.ChunkHolderManager.autoSave(ChunkHolderManager.java:227) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at net.minecraft.server.level.ChunkMap.saveIncrementally(ChunkMap.java:535) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at net.minecraft.server.level.ServerChunkCache.saveIncrementally(ServerChunkCache.java:437) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at net.minecraft.server.level.ServerLevel.saveIncrementally(ServerLevel.java:1499) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1598) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1237) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:326) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.IllegalStateException: Player name contained disallowed characters: 'Minesweeper Tile'
at com.mojang.serialization.DataResult$Error.getOrThrow(DataResult.java:275) ~[datafixerupper-7.0.14.jar:?]
at com.mojang.serialization.DataResult.getOrThrow(DataResult.java:79) ~[datafixerupper-7.0.14.jar:?]
at net.minecraft.world.item.ItemStack.save(ItemStack.java:615) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at net.minecraft.world.entity.Display$ItemDisplay.addAdditionalSaveData(Display.java:700) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at net.minecraft.world.entity.Entity.addAdditionalSaveData(Entity.java:2735) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
at net.minecraft.world.entity.Entity.saveWithoutId(Entity.java:2518) ~[paper-1.20.6.jar:git-Paper-"3fc9358"]
... 18 more

Steps/models to reproduce

Looks like some plugin created a head with an invalid profile name (containing spaces?)

Plugin and Datapack List

n/a

Paper version

[00:59:58 INFO]: This server is running Paper version git-Paper-"3fc9358" (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 3fc9358)
You are running the latest version

Other

No response

Metadata

Metadata

Assignees

Labels

status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.type: bugSomething doesn't work as it was intended to.version: 1.20.6Game version 1.20.6

Type

No fields configured for Bug.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions