Auto HUD

Auto HUD

665k Downloads

[Bug] NullPointerException in ClientPlayNetworkHandler on getScoreboard() with Auto HUD

wling-art opened this issue ยท 1 comments

commented

Description:
When playing Minecraft with the Auto HUD mod enabled, the game crashes due to a NullPointerException in the ClientPlayNetworkHandler class. This issue occurs when attempting to handle a team update packet (clientbound/minecraft:set_player_team). It appears that the world object is null, causing the getScoreboard() method to fail.

Steps to Reproduce:

  1. Launch Minecraft with the Auto HUD mod installed.
  2. Connect to a multiplayer server.
  3. The game crashes with the attached error.

Expected Behavior:
The game should handle team update packets without crashing.

Actual Behavior:
The game crashes with a NullPointerException.

Crash Log:

java.lang.NullPointerException: Cannot invoke "net.minecraft.client.world.ClientWorld.getScoreboard()" because "this.world" is null
    at MC//net.minecraft.client.network.ClientPlayNetworkHandler.handler$zzd000$autohud$autoHud$onTeamUpdate(ClientPlayNetworkHandler.java:3513)
    at MC//net.minecraft.client.network.ClientPlayNetworkHandler.onTeam(ClientPlayNetworkHandler.java:2027)
    at MC//net.minecraft.network.packet.s2c.play.TeamS2CPacket.apply(TeamS2CPacket.java:132)
    ...

System Details:

  • Minecraft Version: 1.21.1
  • Fabric Loader Version: 0.16.0
  • Mods Installed:
    • Auto HUD 7.2.7+1.21
    • Fabric API 0.102.1+1.21.1
    • Other mods (see full list in the attached crash log).
  • Operating System: Windows 11
  • Java Version: OpenJDK 21.0.1 (Eclipse Adoptium)
  • Graphics Card: NVIDIA GeForce RTX 3060 Laptop GPU

Additional Notes:

  • The issue appears to be related to the Auto HUD mod.
  • The crash does not occur when the mod is disabled.
  • Full crash report and mod list are attached for reference.

disconnect-2024-11-28_18.28.55-client.txt

commented

Thank you for the detailed bug report! Servers are acting in ever more surprising ways; why are they updating teams before the world even exists? Should be an easy fix though!