mojira.dev
MC-123460

JSON parsing exceptions thrown during parsing of pack.mcmeta of data and resource packs are not caught properly

The bug

JSON parsing exceptions, being thrown while the pack.mcmeta file of data or resource packs is read, are not properly caught.
This can cause crashes or incorrect error messages when using /reload.

Resource pack crash: [^(17w50a) crash-2017-12-21_19.30.27-client.txt]

Description: Initializing game

com.google.gson.JsonSyntaxException: java.io.EOFException: End of input at line 1 column 2 path $.
	at com.google.gson.internal.Streams.parse(Streams.java:58)
	at com.google.gson.JsonParser.parse(JsonParser.java:84)
	at com.google.gson.JsonParser.parse(JsonParser.java:59)
	at rl.a(SourceFile:73)
	at rl.a(SourceFile:66)
	at sd.a(SourceFile:35)
	at ry.a(SourceFile:38)
	at sa.a(SourceFile:33)
	at bnh.a(SourceFile:1170)
	at bne.an(SourceFile:437)
	at bne.a(SourceFile:365)
	at net.minecraft.client.main.Main.main(SourceFile:140)

How to reproduce

  1. Download the attached resource pack

[media]
  1. Place the resource pack in the resourcepacks folder of your profile

  2. Start Minecraft
    ❌ It crashes

Linked issues

MC-8645 Redstone wire receiving level 1 power from a block, pointing at another block with wire on it will not power that block Resolved MC-8659 Named Witch has name in hat not above Resolved MC-8784 Comparator do not emit any light when powered Resolved MC-122979 Crash on startup Resolved MC-122998 MalformedJsonException: Unterminated string at line 6 column 2 path $.pack.description Resolved

Attachments

Comments 11

If I understand correctly, is this just a better/more general version of MC-122998?

Yes it appears this is the case. I did not bother doing a search with parts of the stack trace since the JSON data could be incorrect at any position and there are probably at least 2 different situations in which a crash can happen and one in which a an error is written to the log.

How did you find that report?

[Mod] violine1101

I, for one, always know which are the most recently reported issues because I follow the activity on new reports closely. So, if I see a new report which describes the same issue, I realize I've seen it before and search through my browser history to find it. Which usually takes a few seconds.

Since this seems to have subsumed MC-122998, I just want to point out that it is still in the game as of snapshot 18w01a - from the other thread, the crash report

FrancisDaPugtato

Its fix is to remove all Resouce packs while loading time and then re-add then when you are playing the game. Worked for meh.

1 more comments
FrancisDaPugtato

Thanks violine. 😃 I appreciate that you are working on this.

I meet too. And in 02a, neither zh_cn.json nor en_us.json in the pack might work.

If you don't fix this, I'll never play the new versions of Minecraft!

I'm just stuck in the prison of 1.12.2, well. Actually, 17w49b.

FrancisDaPugtato

Don't worry. MC 1.13 will never come out until this bug is fixed. And we do not recommend to play in Snapshots, only for testers who want to test.

@@unknown if you are really experiencing this exact issue you can remove all data or resource packs and start adding one by one again until you find the one causing this problem which you can then leave out.

If you did not create the data or resource pack yourself you should contact the creator and tell them that their pack is malformed.

marcono1234

Nathan Adams

Confirmed

data-pack, pack.mcmeta, resource-pack

Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w02a, Minecraft 18w03b

Minecraft 18w05a

Retrieved