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

Fix not deleted bossbar when stop the server again #569

Closed
wants to merge 4 commits into from
Closed

Fix not deleted bossbar when stop the server again #569

wants to merge 4 commits into from

Conversation

Elikill58
Copy link
Contributor

It's nice you made changes for async, but with this you re-create a new bug with bossbar that are not disappearing when restarting the sevrer.

Actually, bossbar created and not deleted could not be removed by owner as they are not showed in /bossbar remove command.

@Krakenied
Copy link
Collaborator

Make sure your server fork and your plugins dont break boss bar behavior, im unable to reproduce the issue

@Krakenied
Copy link
Collaborator

(unused boss bars are automatically collected by GC)

@Krakenied
Copy link
Collaborator

(so there is a memory leak on your server which is definitely not a sensible reason to put more unnecessary code to the plugin lol)

@Krakenied
Copy link
Collaborator

tbh it's also possible that there are old boss bars present on your server which were created using the keyed method

@Krakenied
Copy link
Collaborator

also, your fix will most likely cause CME because keyed boss bars are stored server side in a HashMap

@Elikill58
Copy link
Contributor Author

And not keyed bossbar are not saved ? Also, with this fix, the server that report me this bug no longer have issue.
They are using purpur

@Krakenied
Copy link
Collaborator

Krakenied commented Nov 6, 2023

And not keyed bossbar are not saved ? Also, with this fix, the server that report me this bug no longer have issue. They are using purpur

Simple boss bars aren't saved at all:
image
image

Keyed boss bars are:
image
image
image

As you can see, there is no logic to store the simple boss bars (they are basically collected by garbage collector), whereas the keyed ones are stored in a hash map and are even saved in the world files, making it necessary to remove them manually.

@Elikill58
Copy link
Contributor Author

Oh ok. And did you check if the /save-all command for example save them manually ? Like if there is another system that save them ?

@Krakenied
Copy link
Collaborator

image
As you can see, CustomBossEvents is empty after running the /save-all command

2023-11-07.00-46-48.mp4

@Elikill58
Copy link
Contributor Author

Oh ok, thanks for all of this informations, and sorry for disturbing

@Elikill58 Elikill58 closed this Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants