MarkusBordihn / BOs-Easy-NPC

Create easily NPC for your world or for your mod.
Other
19 stars 7 forks source link

[Crash Report] NPC crashing players whenever they get close #338

Open SnakeTheSolid opened 1 week ago

SnakeTheSolid commented 1 week ago

💡 Check the Bug Tracker and Crash Tracker before reporting a new crash. There you can find a lot of useful information and solutions for common problems.

Note: Please make sure to fill out the following template to the best of your ability. This will help us diagnose and resolve the issue faster. Without the necessary logs, there might not be much we can do to help.

Minecraft and Mod version 🐞 1.20.1

Description of the crash 💥 Whenever we change an attribute, skin or pretty much anything that isn't messing with trade offers it kicks any player within render distance of the ncp giving an error with the only fix either being remove the mod or having someone not in the area force load the chunk and do a command to delete every NPC (note, it works in singleplayer worlds but not in the server)

Steps to reproduce the crash ⚙️

1.Spawn NPC in a server (not a singleplayer world) 2.Load any skin from a URL, change any of its attributes and/or saving presets

Expected behavior before the crash ✔️ Do this causes a connection loss by internal exception " Internal Exception: io.netty.handler.codec.DecoderException: java.lang.StringIndexOutOfBoundsException: offset 947, count 101, length 979"

Logs 📝 To speed up the diagnosis, please provide the following files if possible:

ERROR NPC

These logs contain essential details that will help me identify the problem and offer more accurate assistance. You can upload the logs to https://gist.github.com/ or https://mclo.gs/ and share the link here.

Additional context 📋 Add any other context or information about the crash here.

MarkusBordihn commented 1 week ago

This error usually indicates a mismatch between the server and client versions. Please ensure that both the client and server are running the exact same version of the mod.

If the issue persists, kindly provide the specific version of the mod you're using, as well as whether you're using Fabric, Forge, or NeoForge. Thank you!

SnakeTheSolid commented 4 days ago

NPC Version ^Version of the mod we're using^

ForgeVersion ^Version of Forge we're on^

ServerSide Version ^Servers version of the mod^

Still seems to be giving us the same issue. I have previded the Forge version with mod versions from both clients and server.

MarkusBordihn commented 4 days ago

Thank you for the confirmation. I attempted to reproduce the issue on my end but was unable to replicate it.

image

Could you please provide the relevant logs from both the server and an affected client after the connection is lost? You can upload the logs to https://gist.github.com/ or https://mclo.gs/ and share the link here.

This may be related to certain "connection optimization" mods, but the log files should give us clearer insight into what might be causing the issue.

SnakeTheSolid commented 3 days ago

ServerLog.log

Client.log

https://drive.google.com/drive/folders/1tUuAwcgCnCzcnXJrzANf7F4NxXaTC6k9?usp=drive_link ^ Here are 3 videos of the errors happening while doing various things with them ^

In addition to the previous, i learned just minutes ago that merely placing them, going far away then returning give the error as soon as they render in.

MarkusBordihn commented 2 days ago

Thank you for the logs, which provide more insight into the error, particularly this part:

An exception 'java.lang.NullPointerException: Cannot invoke "net.minecraft.server.MinecraftServer.m_18691_(java.util.function.Supplier)" because the return value of "net.minecraftforge.server.ServerLifecycleHooks.getCurrentServer()" is null.

However, Easy NPC mod does not use getCurrentServer() anywhere in its code, so this error is unrelated to the mod itself. You can verify this here: GitHub Search.

It appears that another mod is improperly adjusting the ClientboundAddEntityPacket, which is likely causing the issue. This would also explain why the error occurs when the NPC needs to respawn after you move too far away and then return.

I recommend checking the client-side crash log for more details. It might help identify which mod is causing these problems.

If you are using a public avaible modpack on CurseForge I'm happy to reproduce the issue here, but I'm not able to perform tests with custom mod packs or so.