mojira.dev
MC-125292

Invalid syntax in datapack tag files crash Minecraft

The game crashes when trying to load a resource pack with invalid syntax. For example, the following doesn't have quotes around the json element names:

{
replace:"false",
values:[
"nicknackgus:speedometer/tick"
]
}

This was saved at {world}/datapacks/speedometer/data/minecraft/tags/functions/tick.json

Reloading the data packs did not cause a crash until I attempted to enable the data pack. I expected to receive an error instead of a crash. I also expected the json file to be loaded in lenient mode, and not throw an error for missing quotation marks, but understand if the quotation marks are required.

Attachments

Comments 4

I also have this issue. Does the crash report mention "Ticking playerjava.lang.NullPointerException: Ticking player"?

Here's my full crash report: ---- Minecraft Crash Report ----
// Uh... Did I do that?

Time: 2/14/18 4:46 PM
Description: Ticking player

java.lang.NullPointerException: Ticking player
at bkf.a(SourceFile:168)
at au.a(SourceFile:56)
at au.a(SourceFile:36)
at av$b.a(SourceFile:79)
at av$a.a(SourceFile:106)
at av.a(SourceFile:66)
at sc.i(SourceFile:417)
at sx.aa_(SourceFile:189)
at hg.a(SourceFile:221)
at sw.c(SourceFile:175)
at net.minecraft.server.MinecraftServer.w(SourceFile:721)
at net.minecraft.server.MinecraftServer.v(SourceFile:628)
at cwr.v(SourceFile:155)
at net.minecraft.server.MinecraftServer.run(SourceFile:533)
at java.lang.Thread.run(Thread.java:745)

A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

– Head –
Thread: Server thread
Stacktrace:
at bkf.a(SourceFile:168)
at au.a(SourceFile:56)
at au.a(SourceFile:36)
at av$b.a(SourceFile:79)
at av$a.a(SourceFile:106)
at av.a(SourceFile:66)

– Player being ticked –
Details:
Entity Type: minecraft:player (sc)
Entity ID: 164
Entity Name: Platey
Entity's Exact location: 9919.92, 71.00, 9961.11
Entity's Block location: World: (9919,70,9961), Chunk: (at 15,4,9 in 619,622; contains blocks 9904,0,9952 to 9919,255,9967), Region: (19,19; contains chunks 608,608 to 639,639, blocks 9728,0,9728 to 10239,255,10239)
Entity's Momentum: 0.00, 0.00, 0.00
Entity's Passengers: []
Entity's Vehicle: ~ERROR~ NullPointerException: null
Stacktrace:
at sc.i(SourceFile:417)
at sx.aa_(SourceFile:189)
at hg.a(SourceFile:221)

– Ticking connection –
Details:
Connection: hg@60cf3e17
Stacktrace:
at sw.c(SourceFile:175)
at net.minecraft.server.MinecraftServer.w(SourceFile:721)
at net.minecraft.server.MinecraftServer.v(SourceFile:628)
at cwr.v(SourceFile:155)
at net.minecraft.server.MinecraftServer.run(SourceFile:533)
at java.lang.Thread.run(Thread.java:745)

– System Details –
Details:
Minecraft Version: 18w07a
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_25, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 162972280 bytes (155 MB) / 483217408 bytes (460 MB) up to 3207856128 bytes (3059 MB)
JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx3G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M
Profiler Position: N/A (disabled)
Player Count: 1 / 8; [sc['Platey'/164, l='Aquatic Update1', x=9919.92, y=71.00, z=9961.11]]
Data Packs: vanilla, file/platy (incompatible)
Type: Integrated Server (map_client.txt)
Is Modded: Probably not. Jar signature remains and both client + server brands are untouched.

I'm getting this crash report, when I load a copy of a particular 18w05a world of mine in 18w07a. I suspect This too, is related to something invalid in the datapack. I generated a new world in 18w05a and loaded it just fine in 18w07a, to eliminate a few possibilities.

---- Minecraft Crash Report ----
// I'm sorry, Dave.

Time: 2/14/18 7:29 PM
Description: Exception in server tick loop

java.lang.NullPointerException: Exception in server tick loop
	at aum.a(SourceFile:377)
	at bio.e(SourceFile:60)
	at bio.<init>(SourceFile:46)
	at bid.o(SourceFile:46)
	at sa.o(SourceFile:735)
	at sa.<init>(SourceFile:129)
	at cwr.a(SourceFile:96)
	at cwr.d(SourceFile:131)
	at net.minecraft.server.MinecraftServer.run(SourceFile:503)
	at java.lang.Thread.run(Thread.java:745)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
	Minecraft Version: 18w07a
	Operating System: Windows 7 (amd64) version 6.1
	Java Version: 1.8.0_25, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 94216824 bytes (89 MB) / 251658240 bytes (240 MB) up to 1073741824 bytes (1024 MB)
	JVM Flags: 8 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=16M
	Profiler Position: N/A (disabled)
	Player Count: 0 / 8; []
	Data Packs: vanilla, file/neverland (incompatible)
	Type: Integrated Server (map_client.txt)
	Is Modded: Probably not. Jar signature remains and both client + server brands are untouched.

Is this still an issue in the current 1.13 prereleases?
If so, please attach the datapack in question.

I had it occur in 1.13.2-pre2 when I forgot to add commas to separate components in a tag file. I did some testing with two tag files, test1.json, and test2.json. In test1, it has: {"values":["minecraft:stone""minecraft:dirt"}, without a comma between the two blocks. Now that alone won't cause a crash, but if I call that tag file in test2 like so: {"values":["#namespace_name:test1"]}, then that will cause a crash. I'm not sure if that's the same issue that was experienced here, but it does still crash under certain circumstances.

NickNackGus

(Unassigned)

Unconfirmed

Minecraft 18w07a

Retrieved