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
- Download the attached resource pack MC-123460 resource pack.zip

- Place the resource pack in the resourcepacks folder of your profile
- Start Minecraft
It crashes
2017-12-21, 08:30 PM
2018-01-24, 09:19 PM
2018-01-23, 04:44 PM
7
5
data-pack, pack.mcmeta, resource-pack
Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w02a, Minecraft 18w03b