Mojira Archive
MC-235614

Reference to unexisting predicate in a datapack causes java.lang.NullPointerException

Referencing an unexisting predicate in an advancement that uses an inventory changed trigger causes a java.lang.NullPointerException upon triggering the advancement.

How to reproduce:
Create an advancement with the inventory changed trigger. In the conditions section, add a player[{}] condition. There, add a reference predicate, and set the name to one that doesn't exist. Cause the advancement to trigger by picking up an item. Do not use the /advancement command, as it will not cause a crash. If everything was done correctly, thr game should crash.

It also doesn't allow the player to join back until either the datapack is disabled, or the reference name is fixed, however, this is inconsistent. Sometimes it is possible to join back after the first or second crash, but eventually it becomes impossible.
Attached is a datapack which can cause this crash.

Fixed

wooden_chest

[Mojang] Panda

2021-08-30, 09:16 PM

2022-07-19, 02:52 PM

2022-07-19, 02:52 PM

3

1

Plausible

Very Important

Crash

crash

1.17.1, 1.18.2

1.19.1 Pre-release 6