Mojira Archive
MC-168665

Extra escape characters in EntityTag could crash the game

  1. Get a summon egg by this command:
    /give @s minecraft:sheep_spawn_egg{EntityTag:{CustomName:"[{\\\"text\\\":\\\"crash sheep\\\"}]"}} 1
    
  2. Put it into a dispenser.
  3. Activate this dispenser.
    The game crashed:
    ---- Minecraft Crash Report ----
    // This doesn't make any sense! Time: 12/23/19 7:19 PM
    Description: Loading entity NBT
    com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 4 path $[0].
    	at com.google.gson.internal.Streams.parse(Streams.java:60)
    	at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:65)
    	at abk.a(SourceFile:494)
    	at abk.a(SourceFile:519)
    	at lf$a.a(SourceFile:399)
    	at akn.f(SourceFile:1571)
    	at akr.a(SourceFile:370)
    	at akr.b(SourceFile:337)
    	at akr.a(SourceFile:295)
    	at akr.a(SourceFile:286)
    	at gl$22.a(SourceFile:186)
    	at gk.dispense(SourceFile:15)
    	at bqo.a(SourceFile:94)
    	at bqo.a(SourceFile:117)
    	at byg.a(SourceFile:263)
    	at xd.b(SourceFile:584)
    	at bkg.b(SourceFile:87)
    	at xd.a(SourceFile:328)
    	at net.minecraft.server.MinecraftServer.b(SourceFile:847)
    	at net.minecraft.server.MinecraftServer.a(SourceFile:786)
    	at edj.a(SourceFile:128)
    	at net.minecraft.server.MinecraftServer.run(SourceFile:654)
    	at java.lang.Thread.run(Unknown Source)
    Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 4 path $[0].
    	at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1559)
    	at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1401)
    	at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:508)
    	at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:414)
    	at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:738)
    	at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:731)
    	at com.google.gson.internal.bind.TypeAdapters$29.read(TypeAdapters.java:714)
    	at com.google.gson.internal.Streams.parse(Streams.java:48)
    	... 22 more
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ----------------------------------------------------------------------------------------- Head --
    Thread: Server thread
    Stacktrace:
    	at com.google.gson.internal.Streams.parse(Streams.java:60)
    	at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:65)
    	at abk.a(SourceFile:494)
    	at abk.a(SourceFile:519)
    	at lf$a.a(SourceFile:399)-- Entity being loaded --
    Details:
    	Entity Type: minecraft:sheep (ats)
    	Entity ID: 832
    	Entity Name: Sheep
    	Entity's Exact location: 163.50, 4.00, -0.50
    	Entity's Block location: World: (163,4,-1), Chunk: (at 3,0,15 in 10,-1; contains blocks 160,0,-16 to 175,255,-1), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
    	Entity's Momentum: 0.00, 0.00, 0.00
    	Entity's Passengers: []
    	Entity's Vehicle: ~~ERROR~~ NullPointerException: null
    Stacktrace:
    	at akn.f(SourceFile:1571)
    	at akr.a(SourceFile:370)
    	at akr.b(SourceFile:337)
    	at akr.a(SourceFile:295)
    	at akr.a(SourceFile:286)
    	at gl$22.a(SourceFile:186)
    	at gk.dispense(SourceFile:15)
    	at bqo.a(SourceFile:94)
    	at bqo.a(SourceFile:117)
    	at byg.a(SourceFile:263)
    	at xd.b(SourceFile:584)-- Block being ticked --
    Details:
    	Block location: World: (162,4,-1), Chunk: (at 2,0,15 in 10,-1; contains blocks 160,0,-16 to 175,255,-1), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
    Stacktrace:
    	at bkg.b(SourceFile:87)
    	at xd.a(SourceFile:328)-- Affected level --
    Details:
    	All players: 1 total; [xe['sandtechnology'/250, l='New World', x=165.55, y=4.62, z=-0.72]]
    	Chunk stats: ServerChunkCache: 2209
    	Level dimension: minecraft:overworld
    	Level name: New World
    	Level seed: 8351370272776430795
    	Level generator: ID 01 - flat, ver 0. Features enabled: true
    	Level generator options: {}
    	Level spawn location: World: (176,4,0), Chunk: (at 0,0,0 in 11,0; contains blocks 176,0,0 to 191,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
    	Level time: 7615 game time, 7615 day time
    	Level storage version: 0x04ABD - Anvil
    	Level weather: Rain time: 120306 (now: false), thunder time: 32586 (now: false)
    	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
    Stacktrace:
    	at net.minecraft.server.MinecraftServer.b(SourceFile:847)
    	at net.minecraft.server.MinecraftServer.a(SourceFile:786)
    	at edj.a(SourceFile:128)
    	at net.minecraft.server.MinecraftServer.run(SourceFile:654)
    	at java.lang.Thread.run(Unknown Source)-- System Details --
    Details:
    	Minecraft Version: 1.15.1
    	Minecraft Version ID: 1.15.1
    	Operating System: Windows 10 (amd64) version 10.0
    	Java Version: 1.8.0_211, Oracle Corporation
    	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    	Memory: 1180674008 bytes (1125 MB) / 1984954368 bytes (1893 MB) up to 3817865216 bytes (3641 MB)
    	CPUs: 8
    	JVM Flags: 3 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xms409m -Xmx4096m
    	Player Count: 1 / 8; [xe['sandtechnology'/250, l='New World', x=165.55, y=4.62, z=-0.72]]
    	Data Packs: vanilla
    	Type: Integrated Server (map_client.txt)
    	Is Modded: Probably not. Jar signature remains and both client + server brands are untouched.
    

Fixed

sandtechnology

[Mojang] Bartosz Bok

2019-12-23, 01:53 PM

2020-11-27, 02:05 PM

2020-06-09, 05:20 PM

3

2

Confirmed

Important

Crash

mojang_internal_2

1.15.1

1.16 Pre-release 3