Thaumic Augmentation

Thaumic Augmentation

7M Downloads

NullPointerException from ItemTieredCasterGauntlet kicks clients from server

RedRaspberry opened this issue ยท 4 comments

commented

[1.12.2]

Here's a snippet of the server log:

    at thecodex6824.thaumicaugmentation.common.item.ItemTieredCasterGauntlet.getNBTShareTag(ItemTieredCasterGauntlet.java:534) ~[ItemTieredCasterGauntlet.class:?]
    at net.minecraft.network.PacketBuffer.func_150788_a(PacketBuffer.java:339) ~[gy.class:?]
    at net.minecraft.network.play.server.SPacketEntityEquipment.func_148840_b(SourceFile:35) ~[kg.class:?]
    at net.minecraft.network.NettyPacketEncoder.encode(NettyPacketEncoder.java:51) ~[ha.class:?]
    at net.minecraft.network.NettyPacketEncoder.encode(NettyPacketEncoder.java:12) ~[ha.class:?]
    at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[minecraft_server.1.12.2.jar:?]
    ... 18 more

this is followed by the affected user disconnecting from the server.
I can't consistently reproduce it, but it happens fairly often on a server im hosting for 5 friends, and every time the server log shows the same NPE. Seems to only happen when the affected player is near the person with the gauntlet, or when they use it.
If any additional details are needed lmk

commented

I can make it stop crashing either way, but just so I get an idea of what's going on:

  1. Is the person crashing someone just near the person with gauntlet, or the person with the gauntlet themselves?
  2. Are any of the players involved in creative mode?

Answer to 1: The person with the gauntlet never crashes
2: No players are in creative, but we are all ops of the server (doubt that changes things)

commented

I should mention we did some more testing and found that it only occurs/doesn't occur under these conditions:

  • If you are the ONLY player looking directly at the person with the gauntlet as they put it in their main/offhand, then you will not disconnect. Anyone else within the nearby area (I assume within render distance of the person with the gauntlet) will disconnect.
  • If you are outside of what i assume is the render distance, then you will not disconnect even if you are looking in the general direction of the person causing the issue.
  • If multiple players are looking at the caster, or if no players are (but are within render distance), it seems to give very mixed results. Sometimes nobody will disconnect at first, sometimes both will disconnect.
    Glad to see that you have some idea for a fix though! It's not a major issue it's just very annoying for PVP
    my uneducated guess was that the NBT that contained the data about the focus was being sent to every player nearby instead of just who needed to see it?
commented

I can make it stop crashing either way, but just so I get an idea of what's going on:

  1. Is the person crashing someone just near the person with gauntlet, or the person with the gauntlet themselves?
  2. Are any of the players involved in creative mode?
commented

This should be fixed with the latest version, if it still crashes report back and I'll look at it again