[MC-123460] JSON parsing exceptions thrown during parsing of pack.mcmeta of data and resource packs are not caught properly Created: 21/Dec/17  Updated: 24/Jan/18  Resolved: 23/Jan/18

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w02a, Minecraft 18w03b
Fix Version/s: Minecraft 18w05a

Type: Bug
Reporter: [Mod] Marcono1234 Assignee: [Mojang] Nathan Adams
Resolution: Fixed Votes: 7
Labels: data-pack, pack.mcmeta, resource-pack

Attachments: Text File (17w50a) crash-2017-12-21_19.30.27-client.txt     Zip Archive MC-123460 resource pack.zip    
Issue Links:
Duplicate
is duplicated by MC-122979 Crash on startup Resolved
is duplicated by MC-122998 MalformedJsonException: Unterminated ... Resolved
is duplicated by MC-123048 The game crashed whilst initializing ... Resolved
is duplicated by MC-123123 Crash when I launch the game Resolved
is duplicated by MC-123125 Crash on Startup Resolved
is duplicated by MC-123141 crash when initialising game Resolved
is duplicated by MC-123175 Minecraft 17w50a crash during initial... Resolved
is duplicated by MC-123212 i can't Load in into The new Snapshot... Resolved
is duplicated by MC-123243 crash when try to run 17w50a Resolved
is duplicated by MC-123253 Crashes when playing 17w49a and above Resolved
is duplicated by MC-123257 The latest snapshot for 1.13 17w50a k... Resolved
is duplicated by MC-123333 Minecraft 1.13 17w50a crashes after s... Resolved
is duplicated by MC-123478 I NEED HELP IMMEDIATELY!!! Resolved
is duplicated by MC-123663 com.google.gson.stream.MalformedJsonE... Resolved
is duplicated by MC-123709 Minecraft crashes while loading snapshot Resolved
is duplicated by MC-123819 Can't run Minecraft snapshot 18w01a Resolved
is duplicated by MC-123874 Minecraft crashes "com.google.gson.Js... Resolved
is duplicated by MC-123914 Malformed JSON Exception while loadin... Resolved
is duplicated by MC-123944 Minecraft 1.13 snapshots opens, but t... Resolved
is duplicated by MC-123989 Unexpected Crash when loading snapshot Resolved
is duplicated by MC-124049 Can't Load into 18w01a Resolved
is duplicated by MC-124060 1.13 crashes before title screen Resolved
is duplicated by MC-124100 Game Crash Resolved
is duplicated by MC-124168 Minecraft crashes everytime I launch it. Resolved
is duplicated by MC-124231 If the resourcepack folder contains a... Resolved
is duplicated by MC-124238 Plantage u jeu Resolved
is duplicated by MC-124318 My game crashes before it opens (I op... Resolved
is duplicated by MC-124438 MalformedJsonException when starting ... Resolved
is duplicated by MC-124526 im trying to load 18w03b but it keeps... Resolved
is duplicated by MC-124542 Game crashes when i've installed reso... Resolved
is duplicated by MCL-8645 When i start the 17w50a snapshot, Min... Resolved
is duplicated by MCL-8659 Minecraft is instantly crashing on th... Resolved
is duplicated by MCL-8784 Snapshot crash Resolved
Relates
relates to MC-121335 Crash: Invalid escape sequence at lin... Resolved
CHK:
Confirmation Status: Confirmed

 Description   

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.

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 MC-123460 resource pack.zip
  2. Place the resource pack in the resourcepacks folder of your profile
  3. Start Minecraft
    It crashes


 Comments   
Comment by [Mod] tryashtar [ 21/Dec/17 ]

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

Comment by [Mod] Marcono1234 [ 23/Dec/17 ]

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?

Comment by [Mod] violine1101 [ 23/Dec/17 ]

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.

Comment by SkyBluesRose [ 03/Jan/18 ]

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

Comment by FrancisDaPugtato [ 07/Jan/18 ]

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.

Comment by [Mod] violine1101 [ 09/Jan/18 ]

(Removed troll comments.)

Comment by FrancisDaPugtato [ 10/Jan/18 ]

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

Comment by SolidBlock [ 13/Jan/18 ]

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

Comment by Teresa [ 18/Jan/18 ]

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.

Comment by FrancisDaPugtato [ 18/Jan/18 ]

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.

Comment by [Mod] Marcono1234 [ 19/Jan/18 ]

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

Generated at Wed Nov 14 15:28:35 CST 2018 using Jira 7.11.2#711002-sha1:fdc329dee91471a641faabfe39b5ff8c0a5b3f66.