Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Killing a mob disguised as player crashes the server with an NPE when 'Ticking player' #23

Open
Shnupbups opened this issue Feb 6, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@Shnupbups
Copy link

Shnupbups commented Feb 6, 2022

Crash log here!
Version: 1.1.2
Using 'Mob Disguises' mod
Minecraft 1.18.1

I was on a singleplayer world, and had run /disguise @e as minecraft:player to disguise every entity as a player, and proceeded to punch a nearby cat (now disguised as a player) to death. The server crashed with an NPE when 'Ticking player', unable to get the networkHandler field in ServerPlayerEntity.

This also caused the world to report the same error anytime an attempt to load it up again was made, rendering it unplayable.

I understand that 1.1.2 is not the latest DisguiseLib, but it is the latest that works with the 'Mob Disguises' mod, and thus is what I used. I am unsure if the issue is reproducible on 1.2.0.

@Shnupbups Shnupbups changed the title Killing a mob disguised as player crashes the game with an NPE when 'Ticking player' Killing a mob disguised as player crashes the server with an NPE when 'Ticking player' Feb 6, 2022
@samolego
Copy link
Member

samolego commented Feb 6, 2022

It's probably reproducible, as there weren't many changes in 1.2.0

@samolego samolego added the bug Something isn't working label Feb 6, 2022
@samolego
Copy link
Member

samolego commented Feb 6, 2022

could be that network handler is trying to send "you died" packet to diguised entity ... I'll have to investigate

@samolego
Copy link
Member

samolego commented Feb 9, 2022

Ok, this is really weird, as it crashes when you pick up a new item therefore unlock new recipes.
I could reproduce it with first cow I killed, however, afterwards none of the cows caused the crash anymore.
Same happened with polar bears.

No baby animals were hurt while debugging.

@samolego
Copy link
Member

samolego commented Feb 9, 2022

Further observations; it seems that crash can occur with other entities as well, but only if you pick up the dropped items immediately after their death 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants