ryandw11 / UltraBar

Ultra Bar Send Boss Bar messages, Titles, and Actionbars! |1.12 - 1.18|
MIT License
7 stars 5 forks source link

Async usage of the API makes the server crash #45

Open ZeTioZ opened 2 years ago

ZeTioZ commented 2 years ago

Hi,

I recently tried to use your API to make some boss bar. I've noticed that your plugin does make the server crash if you use the api in async. Maybe you could add a little warning in the api documentation to not use it async and exclusively use it sync to avoid issues like that.

To reproduce that, you just have to create a bossbar with your API and then delete it in async. And if you do it a lot quite some time, it can crash the server saying that there is an unexisting entity ticked inside a chunk (which I guess is the EnderDragon). The stack trace would not even help you since it's a crash on the server core side, exactly on the chunk ticking system.

I'm on Spigot 1.19.2 and it does also occur on Paper 1.19.2.

Here is the error if you want to take a look at it: https://pastebin.com/ithdKiMn

Regards, ZeTioZ

ryandw11 commented 2 years ago

Correct, almost none of the bukkit api is thread safe so the same goes with my plugin. I'll add the warning to the documentation.