mojira.dev
MC-133098

Loading a world with a corrupted stats file crashes the game

The bug

The server crashes as soon as it tries to read an empty (corrupted) json file in the world folder.

Stack trace

1.13-pre6: [^crash-2018-07-09_11.34.25-server.txt]

java.lang.IllegalStateException: Not a JSON Object: null
	at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:90)
	at wk.a(SourceFile:82)
	at wk.<init>(SourceFile:48)
	at vl.a(SourceFile:923)
	at tb.<init>(SourceFile:162)
	at vl.g(SourceFile:443)
	at ua.b(SourceFile:113)
	at ua.X_(SourceFile:65)
	at hw.a(SourceFile:238)
	at tx.c(SourceFile:170)
	at net.minecraft.server.MinecraftServer.w(SourceFile:716)
	at net.minecraft.server.MinecraftServer.v(SourceFile:623)
	at dfa.v(SourceFile:155)
	at net.minecraft.server.MinecraftServer.run(SourceFile:525)
	at java.lang.Thread.run(Thread.java:748)

Original description

The game crashes right after loading a world. No resourcepacks used, no modifications to the client. Clear 1.13-pre6. World made in 1.13-pre6 and played on for 2 days.

(Since bugtracker doesn't allow files above 10 MB, I uploaded the save data to FramaDrop here: https://framadrop.org/r/K1qotv09j1#zY8rE8xMOvzCXtO7aBsZv1CKHFcQG6gbbBHbXOqS3Gk=)

Related issues

Attachments

Comments

migrated
[media][media][media]
migrated

What was the last thing you did in your world?

migrated

Were in my horribly built house, in survival mode, standing, looking at the doors and walls, in company of my sweet dogs that protected me in my adventure. Then, I decided to close the game, thus used Save and exit button located on my magnificent menu, I clicked the button, watching the game save my horrible world, full of despair and emptiness. It has been done, the game saved my world that I would never be able to open again, leaving me alone in the main menu. Next, I closed the game and...

The last thing I did was standing in my house, not really much.

migrated

Could you attach the game log, please?

migrated

Done!

violine1101

I'm able to enter the world you attached in 1.13-pre7. It crashes when I rename the files in advancements, playerdata and stats to have my UUID. I checked the stats file, and it was empty, and therefore wasn't able to be parsed correctly by the game.

To work around this issue, delete the file in the stats folder.

By the way, I fixed your command:

execute as @a at @s if block ~ ~-0.5 ~ minecraft:grass_path run effect give @s minecraft:speed 1 1 true
violine1101

I changed the title to better reflect when this crash occurs, however the real question we should be asking is why that file is saved empty in the first place.

migrated

So this is why... I see, not sure why it happened, but definitely worth looking into, I did not mess with this file, thanks for the help, with both of things!
EDIT: I've also attached the log from the last time before the world started crashing, I don't see anything related there but thought I would add it for clarity. Before this question is asked, I do have a lot of space on my disk, more than 300GB is enough for small stats file to be saved.

migrated

migrated

Confirmed

crash, singleplayer

Minecraft 1.13-pre6, Minecraft 1.13-pre7, Minecraft 1.13

Minecraft 18w33a

Retrieved