mojira.dev
MC-129750

Non [a-z0-9_.-] character in one advancement causes ALL advancements to not load with no error message

When attempting to use any Non [a-z0-9_.-] character in any of many places for a singular advancement causes ALL advancements to not load (even all advancements from all other datapacks). Additionally there is never any error message indicating that something went wrong on either the client or server. An example root advancement that causes this issue has been attached.
(Note: before 19w11a you could get an error message to appear if you loaded a world that had such an advancement loaded - the server would crash and the game output would tell you what went wrong — the attached image and crash report show how the game responded before 19w11a)

If the Non [a-z0-9_.-] character appears in one of these then the error occurs (not necessarily an exhaustive list):

  • Trigger values

  • Item names (in both icon and criteria)

  • Background value

  • Reward function names

If the character appears in one of these then the error does not occur:

  • Text components (ex: title and description)

  • Key names

  • Non-string values

  • Value of "frame"

If a value is invalid but does not contain a Non [a-z0-9_.-] character then an error message is given describing the issue.

The below text from the server log demonstrates the fact that no advancements at all load.

Beginning with only vanilla loaded:

16.05 14:27:53 [Server] INFO [14:27:53] [Server thread/INFO]: [Addgame: Reloading!]
16.05 14:27:53 [Server] INFO [14:27:53] [Server thread/INFO]: Reloading ResourceManager: Default
16.05 14:27:53 [Server] INFO [14:27:53] [Server thread/INFO]: Loaded 523 recipes
16.05 14:27:53 [Server] INFO [14:27:53] [Server thread/INFO]: Loaded 570 advancements

Above is the expected result. Note the number of advancements loaded appears.

16.05 14:28:05 [Server] INFO [14:28:05] [Server thread/INFO]: [Addgame: Enabled data pack [file/ioe]]
16.05 14:28:05 [Server] INFO [14:28:05] [Server thread/INFO]: Reloading ResourceManager: Default, ioe
16.05 14:28:05 [Server] INFO [14:28:05] [Server thread/INFO]: Loaded 523 recipes
16.05 14:28:05 [Server] INFO [14:28:05] [Server thread/INFO]: Loaded 17 custom command functions

Above is after enabling the data pack with the attached advancement. It stops loading data without an error message and does not load any advancements (as can be seen by the lack of message saying how many advancement were loaded).

16.05 14:28:14 [Server] INFO [14:28:14] [Server thread/INFO]: [Addgame: Disabled data pack [file/ioe]]
16.05 14:28:14 [Server] INFO [14:28:14] [Server thread/INFO]: Reloading ResourceManager: Default
16.05 14:28:14 [Server] INFO [14:28:14] [Server thread/INFO]: Loaded 523 recipes
16.05 14:28:14 [Server] INFO [14:28:14] [Server thread/INFO]: Loaded 570 advancements

Once again the expected result is given after disabling the data pack.

Attachments

Comments 7

It’s "tag": “<tag>" not "item": "#<tag>"

Thank you for helping me with this but the issue is not that this is the incorrect way to use tags in advancements but instead that it causes a catastrophic failure of all advancements to not be loaded with no error message indicating what went wrong when it probably should gracefully fail and hopefully continue loading advancements at least from outside the pack.

Does this affect 1.13-pre4? If so, update your report to say so.

So now that you added this 'NOTE: As of 1.13-pre8 this error no longer occurs if the Non [a-z0-9_.-] character is in either the title or description.' comment, is this bug fixed for you, or is it just the error message that disappeared?

The error that causes all advancements to fail to load still occurs and gives unhelpful error messages when reloading if a Non [a-z0-9_.-] character is anywhere in the advancement except the title or description. For example this error occurs if one of the invalid characters is in one of the names of the triggers, item names, or resource locations but will not cause an error in the title, description, or criteria names.

This bug is still fixed although not marked as such.

addgame

(Unassigned)

Unconfirmed

(Unassigned)

Minecraft 18w20b, Minecraft 18w20c, Minecraft 18w22c, Minecraft 1.13-pre1, Minecraft 1.13-pre4, ..., Minecraft 19w08a, Minecraft 19w08b, Minecraft 19w09a, Minecraft 19w11a, Minecraft 19w11b

Minecraft 19w12b

Retrieved