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-123125 Crash on Startup MC-123141 crash when initialising game MC-8645 Redstone wire receiving level 1 power from a block, pointing at another block with wire on it will not power that block MC-8659 Named Witch has name in hat not above MC-8784 Comparator do not emit any light when powered MC-122979 Crash on startup MC-122998 MalformedJsonException: Unterminated string at line 6 column 2 path $.pack.description MC-123048 The game crashed whilst initializing game MC-123123 Crash when I launch the game MC-123175 Minecraft 17w50a crash during initialization MC-123212 i can't Load in into The new Snapshot 17w50a MC-123243 crash when try to run 17w50a MC-123253 Crashes when playing 17w49a and above MC-123257 The latest snapshot for 1.13 17w50a keeps crashing MC-123333 Minecraft 1.13 17w50a crashes after start-up MC-123478 I NEED HELP IMMEDIATELY!!! MC-123663 com.google.gson.stream.MalformedJsonException error MC-123709 Minecraft crashes while loading snapshot MC-123819 Can't run Minecraft snapshot 18w01a MC-123874 Minecraft crashes "com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Invalid escape sequence at line 4 column 38 path $.pack.description" MC-123914 Malformed JSON Exception while loading MC 18w01a MC-123944 Minecraft 1.13 snapshots opens, but then suddenly close. MC-123989 Unexpected Crash when loading snapshot MC-124049 Can't Load into 18w01a MC-124060 1.13 crashes before title screen MC-124100 Game Crash MC-124168 Minecraft crashes everytime I launch it. MC-124231 If the resourcepack folder contains an "issueful" resourcepack, the game can't start successfully, even the resourcepack is not loaded MC-124238 Plantage u jeu MC-124318 My game crashes before it opens (I open launcher, launch the latest snapshot (18w02a) and then the game crashes) MC-124438 MalformedJsonException when starting 18w03b MC-124526 im trying to load 18w03b but it keeps crashing MC-124542 Game crashes when i've installed resource packs MCL-8645 When i start the 17w50a snapshot, Minecraft crash MCL-8659 Minecraft is instantly crashing on the new 17w50a snapshot MCL-8784 Snapshot crash

Attachments

Comments

tryashtar

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

marcono1234

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?

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.

migrated

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

migrated

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.

violine1101

(Removed troll comments.)

migrated

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

SolidBlock

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

migrated

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.

migrated

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.

marcono1234

@@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