patcher: guard remaining NPE paths in CoreProtect-rollback crash cascade #2

Open
wait4mi wants to merge 1 commit from fix/coreprotect-rollback-npe-guards into main
First-time contributor

The existing update_isSpectator guard (a49e216) fixed the first crash but left LevelRenderer.update() running into a second direct minecraft.player access further down. Chasing that exposed three more null-player/null-connection paths that all trigger during the same transient window (heavy chunk reload / CoreProtect rollback):

  • LevelRenderer.update(): HEAD guard, cancel when minecraft.player is null
  • LevelRenderer.extractLevel(): HEAD guard, same condition
  • Entity.hasIndirectPassenger() WrapOperation: guard null passenger
  • MixinGui.extractCameraOverlays(): HEAD guard, cancel when player is null
  • ViewManager.updateLocation(): guard null getConnection() (CoreProtect reconnect race)

All five skip one frame / return a safe default with no observable gameplay effect.

Verification:

  • Compiles clean (--release 17)
  • Patches Axiom 5.4.2 (MC26.1, sha512-verified upstream) with all completeness checks passing
  • Bytecode smoke test passes (hasCommercialLicense=iconst_1, no network residue)
  • Tested in-game, reproducing the original CoreProtect-rollback crash context � no crash observed
The existing `update_isSpectator` guard (a49e216) fixed the first crash but left `LevelRenderer.update()` running into a second direct `minecraft.player` access further down. Chasing that exposed three more null-player/null-connection paths that all trigger during the same transient window (heavy chunk reload / CoreProtect rollback): - `LevelRenderer.update()`: HEAD guard, cancel when `minecraft.player` is null - `LevelRenderer.extractLevel()`: HEAD guard, same condition - `Entity.hasIndirectPassenger()` WrapOperation: guard null passenger - `MixinGui.extractCameraOverlays()`: HEAD guard, cancel when player is null - `ViewManager.updateLocation()`: guard null `getConnection()` (CoreProtect reconnect race) All five skip one frame / return a safe default with no observable gameplay effect. **Verification:** - Compiles clean (`--release 17`) - Patches Axiom 5.4.2 (MC26.1, sha512-verified upstream) with all completeness checks passing - Bytecode smoke test passes (`hasCommercialLicense`=iconst_1, no network residue) - Tested in-game, reproducing the original CoreProtect-rollback crash context � no crash observed
The existing update_isSpectator guard (a49e216) fixed the first crash but
left LevelRenderer.update() running into a second direct minecraft.player
access further down. Chasing that exposed three more null-player/null-
connection paths that all trigger during the same transient window
(heavy chunk reload / CoreProtect rollback):

- LevelRenderer.update(): HEAD guard, cancel when minecraft.player is null
- LevelRenderer.extractLevel(): HEAD guard, same condition
- Entity.hasIndirectPassenger() WrapOperation: guard null passenger
- MixinGui.extractCameraOverlays(): HEAD guard, cancel when player is null
- ViewManager.updateLocation(): guard null getConnection() (CoreProtect
  reconnect race)

All five skip one frame / return a safe default with no observable
gameplay effect. Verified locally: compiles clean, patches Axiom 5.4.2
(MC26.1) with all completeness checks passing, bytecode smoke test
(hasCommercialLicense=iconst_1, no network residue) passes, tested
in-game reproducing the original crash context.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/coreprotect-rollback-npe-guards:fix/coreprotect-rollback-npe-guards
git switch fix/coreprotect-rollback-npe-guards

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff fix/coreprotect-rollback-npe-guards
git switch fix/coreprotect-rollback-npe-guards
git rebase main
git switch main
git merge --ff-only fix/coreprotect-rollback-npe-guards
git switch fix/coreprotect-rollback-npe-guards
git rebase main
git switch main
git merge --no-ff fix/coreprotect-rollback-npe-guards
git switch main
git merge --squash fix/coreprotect-rollback-npe-guards
git switch main
git merge --ff-only fix/coreprotect-rollback-npe-guards
git switch main
git merge fix/coreprotect-rollback-npe-guards
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
exo/Ekaxiom!2
No description provided.