mojira.dev
MC-125051

Incorrect structure names in advancements cause java.lang.NullPointerException

The bug

The advancement condition feature causes a crash when specifiying an incorrect structure name:

Example criteria

"criteria": {
    "find_structure": {
        "trigger": "minecraft:location",
        "conditions": {
            "feature": "incorrect_structure_name"
        }
    }
}

Steps to reproduce

  1. Put the

[media]
  1. in your world

  2. Load up the world

  3. Notice that it crashes immediately

Crash report

18w06a: [^crash-2018-02-10_21.05.48-server.txt]

Description: Ticking player

java.lang.NullPointerException: Ticking player
	at bjo.a(SourceFile:167)
	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 cvl.v(SourceFile:155)
	at net.minecraft.server.MinecraftServer.run(SourceFile:533)
	at java.lang.Thread.run(Thread.java:745)

Linked issues

Attachments

Comments 8

That crash report is from December.

Instead, run the game, let it crash, then attach the launcher log (.minecraft/launcher_log.txt) here.

Once attached, the report will be reopened automatically.

Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki

Report Update:
Updated Crash Report thanks to Neko

I would like to add that this seems to mainly affect advancements triggered by going into structures. If you are near a desert temple with an advancement that is granted by going in it, game crashes. My bug report, MC-127741. Hope this helps narrowing down the issue.

Is this still an issue in the latest 1.13 development snapshot?

This still happens in Minecraft 1.13-pre6. This probably is caused by advancements triggered by some/all structures (only tested for desert temples).

Still an issue in 1.13-pre7

Confirmed for 1.13-pre8. I am concerned this bug won't be fixed before the release of 1.13. Is there any way to bring the devs attention to this bug? I would consider it a pretty serious bug as it causes a complete game crash.

Did a little extra testing, and found that this bug appears to only affect structures that were detected by feature: temple. I also discovered that the game now recognizes these structures as "desert_pyramid" and "jungle_pyramid", and using these names instead doesn't crash the game. The actual trigger for this crash is any miss-spelled or non existent structure name crashes the game. This bug is not actually as serious as I thought, as it only happens on incorrectly made advancement files. This is still a bug though, as what should happen is the game gives an error in the game output log and not load the advancement, like it does with any other mistake. Below I've attached an example criteria that will trigger this bug.

"criteria": {
    "find_structure": {
        "trigger": "minecraft:location",
        "conditions": {
            "feature": "incorrect_structure_name"
        }
    }
}

 

Mario Joaquin Aguirre

(Unassigned)

Community Consensus

advancement, crash, structure

Minecraft 18w06a, Minecraft 18w07a, Minecraft 1.13-pre6, Minecraft 1.13-pre7, Minecraft 1.13-pre8, Minecraft 1.13.1

Minecraft 18w49a

Retrieved