MarkusBordihn / BOs-Easy-NPC

Create easily NPC for your world or for your mod.
Other
20 stars 8 forks source link

[Crash Report] Client crash Null Pointer Exception because "dialogData" is null - 1.19.2 Forge #209

Closed Darkweaver66 closed 3 months ago

Darkweaver66 commented 5 months ago

Description of the crash 💥 I have an NPC who has two dialogue options. One that outputs chat, and one that runs the /openstarterscreen command from Cobblemon to allow players to choose their first pokemon. If you speak to that NPC a few times, it will eventually crash the client with an error log indicating a Null Pointer Exception due to "dialogData" being null. This doesn't affect the server or any other online players, and the client can just relog back in again.

Steps to reproduce the crash ⚙️

  1. Right click NPC
  2. Choose chat dialogue option
  3. Repeat until client kicked and error generated

Expected behavior before the crash ✔️ Should show the same dialogue each time it is clicked into. It's just a basic yes/no dialogue. The one causing the crash is purely text output, and the output that runs the command works fine.

Logs 📝 crash-2024-05-26_23.12.14-client.txt

Additional context 📋 The mod is version 4.5.1, running on Forge 1.19.2 - version 43.3.9. The NPC has existed in the world for the last couple of mod updates so I'm unsure if the mod has had changes which could have caused this error too

Darkweaver66 commented 5 months ago

Just re-imported the NPC to see if that would fix it, but it still caused the error. One thing of note is that this time the error occured when the NPC was first right clicked, not even when choosing options in dialogue crash-2024-05-26_23.38.13-client.txt

MarkusBordihn commented 5 months ago

Thanks a lot for the report.

In the last update I moved away from the "Forge" specific data exchange and so the server is now sending the data as separate data package before opening the screen to the client.

Normally the screen should wait for the data, but according the log it seems that when the delay is to high that it leads to this client side crashes.

I will test this more in detail and adding some additional checks and local caches to avoid such crashes when these data are delayed.

lluiiz commented 5 months ago

I'm having the same problem with the 1.18.2 version

badkidpmg commented 4 months ago

Is this planned to be solved for the next update on fabric?