[Crash] NullPointerException in Axiom mixin on LevelRenderer.update() during server disconnect #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Client crashes with a
NullPointerExceptionwhenLocalPlayeris null while Axiom's mixin interceptsLevelRenderer.update(). This happens during server disconnection — Axiom'swrapOperationforisSpectatordoes not null-check the player before calling it.Environment
Steps to Reproduce
Crash
Secondary confirmation — the level section also threw a NPE when trying to read
connection:Root Cause
Axiom's mixin (
wrapOperation$zdj000$axiom$update_isSpectator) wrapsLevelRenderer.update()to check whether the local player is in spectator mode. During disconnection,minecraft.player(theLocalPlayer) is set tonullbefore the current render frame completes. Axiom's mixin does not guard against this case.The fix is a null-check before accessing the player in the mixin, e.g.:
Additional Context
AutoReconnectmod present — client reconnects after the crash, so no data loss observedphoton_v1.3b.zip(profile: high) — unlikely to be relatedDynamic FPSmod also wrapsrenderFramebut its frame in the stack is above the NPE, not the causeLoaded Mods (relevant)
axiom: Ekaxiom 5.4.1+lattice 2.0.1+26.1iris 1.10.9+mc26.1.1sodium 0.8.11+mc26.1.2dynamic_fps 3.11.6fabric-api 0.149.0+26.1.2moreculling 1.7.0(MixinSquared)lambdynlights 4.10.2+26.1.2Update — post-mortem après lecture du code source
La majorité de ce rapport est obsolète. Voici la situation réelle après lecture de
AxiomPatcher.java.Ce que j'avais tort
Mon suggestion de fix dans le rapport initial était inexacte :
Le mixin en question a la signature :
La variable à tester est le paramètre
instance(arg 1), pasminecraft.player. Et le type de retour estboolean, doncreturn falseet nonreturn.Ce qui existe déjà dans le patcher
Le fix est déjà implémenté dans
AxiomPatcher.java, méthoderewriteMixinLevelRenderer(), commita49e2166du 2026-05-23 :Le commentaire dans le patcher décrit même le repro différemment du mien (rollback CoreProtect → chunks rechargés brutalement → player null transitoire) mais c'est la même race condition.
Cause réelle du crash
Le jar distribué au moment du crash était une version antérieure au fix (v5.4.1-unlock1 ou v5.4.1-unlock2, buildiés le 2026-05-03). La release v5.4.1-unlock3 (2026-05-23T17:00Z) contient le fix — buildée au même instant que le commit.
Le problème était un jar non mis à jour côté client.
Action requise
Fermé comme "already fixed in v5.4.1-unlock3".