Crash when clicking achievement in chat (0.2.0.129)
Nauthul opened this issue ยท 8 comments
Issue: Game crash when clicking an achievement link in chat.
Version: Alpha 0.2.0.129 (Forge)
Modpack: All the Mods 7 (0.3.12)
Details: Crashed multiple time with achievements from different mods (Apotheosis, Alex's Mobs).
Crash Report: crash-2022-04-19_21.37.12-client.txt
java.lang.NullPointerException: Cannot invoke "net.minecraft.advancements.CriterionProgress.m_12911_()" because the return value of "net.minecraft.advancements.AdvancementProgress.m_8214_(String)" is null
at betteradvancements.util.CriterionGrid.findOptimalCriterionGrid(CriterionGrid.java:94) ~[BetterAdvancements-1.18.2-0.2.0.129.jar%2382!/:0.2.0.129] {re:classloading}
at betteradvancements.gui.BetterAdvancementWidget.refreshHover(BetterAdvancementWidget.java:76) ~[BetterAdvancements-1.18.2-0.2.0.129.jar%2382!/:0.2.0.129] {re:classloading,pl:runtimedistcleaner:A}
at betteradvancements.gui.BetterAdvancementWidget.getAdvancementProgress(BetterAdvancementWidget.java:247) ~[BetterAdvancements-1.18.2-0.2.0.129.jar%2382!/:0.2.0.129] {re:classloading,pl:runtimedistcleaner:A}
at betteradvancements.gui.BetterAdvancementsScreen.m_7922_(BetterAdvancementsScreen.java:473) ~[BetterAdvancements-1.18.2-0.2.0.129.jar%2382!/:0.2.0.129] {re:classloading,pl:runtimedistcleaner:A}
at com.clickadv.event.ClientEventHandler.OnTick(ClientEventHandler.java:131) ~[clickadv-1.18.2-2.5.jar%2399!/:1.18.2-2.5] {re:classloading}
Error comes from ClientEventHandler (https://www.curseforge.com/minecraft/mc-mods/clickable-advancements) will have to check on compatibility with this.
I just got the same error shown above, twice.
Better Advancements version: 0.2.0.129 (Forge)
Modpack: All the Mods 7 (versions 0.3.20 and 0.3.22)
Crash report 1: crash-2022-05-07_14.29.09-client.txt
Crash report 2: crash-2022-05-12_10.38.42-client.txt
See someaddons/ClickableAdvancements#8 for further details.
I'm using an empty advancements progress for a simple flashing/unflashing animation for easier finding of the advancement the user clicked on. Better advancements seems to not like when AdvancementProgress#getCriterion returns null, though should probably add a null check for it as vanilla explicitly has @nullable on its return
crash-2022-05-15_19.17.10-client.txt
I had the same problem
Crash With clickadv-1.18.2-2.5.jar and BetterAdvancements-1.18.2-0.2.0.129.jar
Somebody else crashed with the same error in an older version of Minecraft and the mod pack and posted the logs in AllTheMods/ATM-7#575.
Better Advancements version: 0.1.2.122
Clickable Advancements version: 2.4
See the linked issue for further details and the crash report.
Also see AllTheMods/ATM-7#553 (different crash report, different author, but same cause)
hey, i noticed this null check has been added to the 1.19 version. could we maybe get a backport to 1.18.2 please? :p
Closing as this was fixed in PR #120