mojira.dev
MC-71885

Statistic files failing to be converted

There appears to be a problem with converting user statistic files with the game server on upgrade from 1.7.x to 1.8.

Initially, I did a 1.7.2 server migrate to 1.8 and noticed a ton of the following in the server logs:

[WARN] Invalid statistic in ./world/stats/<uuid>.json: Don't know what <stat item> is

I also found all users lost their blocks and items stats, but general and mob stats remained.

Through testing I found that single player stats will convert properly from the old user.json to uuid.json if you start with a 1.7.x version earlier than 1.7.9, then run 1.7.9, then 1.8.

However, if you have a pre-1.7.9 server, update to 1.7.9, login so the server converts it from user.json to uuid.json, then update the server to 1.8, the stat file looses the item and block stats.

I've tried going from 1.7.2->1.7.9->1.8 with single player and had no issue. Also did 1.7.2->1.7.4->1.7.5->1.7.9->1.7.10->1.8 and the conversion works for single player maps. But, for servers, it fails.

Clients tested were on Windows7x64 with java 1.8 latest. The server is a linux x64 ubuntu14 with oracale java 1.7 update 55.

I doubt this could be a java outdated issue, but am going to update that and run more tests to rule it out.

Comments 4

Updated java on the server to 1.8 latest and ran the convert test (original 1.7.2 server -> 1.7.9 -> 1.8) and it still fails to convert the Blocks and Items fields. The 1.8 server dumps the 'invalid statistic' for blocks and items then deletes them from the stat file.

Server 1.7.9 reads the stats just fine, as does 1.7.10. Server 1.8 breaks.

Additionally, using the client to update the stats file from 1.7.x to 1.8 works, then copying the 1.8 stat file to the server, then logging in fails in the same way (server dumps the invalid statistic errors.)

I'm seeing this behavior also. I'm running a server world that was created in 1.7.4, operated in 1.7.5, and then 1.7.10. (I skipped the releases between 1.7.5 and 1.7.10) When I load the world map in either vanilla server 1.8 or 1.8.1, it fails to convert the stats for blocks and items, as described above.

We've been running this map for over a Year and I'm not eager to make my players lose all their stats.

I have just a few days ago finally updated my server from 1.7.10 to 1.8.1. For this update, I made a custom Python program to convert the stats files from 1.7.10 format to 1.8.x format. I know this might be too late for anyone else at this point, but in any case, it is available at: https://github.com/maruohon/mcstatsconverter

Do note that the stats need to be from 1.7[.10], if you have already loaded the world in 1.8, then the stats are gone from that file. Then you would need to get the old stats from a backup and convert them. And if you already had played in 1.8 also, then you would have to manually merge them, or make another program to do it automatically...

I was unaware of this problem and we lost the stats of several players when we updated from 1.7.10 to 1.8.4
The server hadn't run for over half a year.

The server is running Ubuntu 12 with:
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

nyghtwulf

(Unassigned)

Unconfirmed

Minecraft 1.8

Retrieved