CitizensDev / Citizens2

Citizens - the premier plugin and API for creating server-side NPCs in Minecraft.
https://citizensnpcs.co
Open Software License 3.0
600 stars 316 forks source link

Possible Memory Leak with DUMMY_SCOREBOARD #3050

Closed RandomTomato closed 1 year ago

RandomTomato commented 1 year ago

/version output

10.09 19:27:50 [Server] [INFO] This server is running Paper version git-Paper-169 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT) (Git: b4e3b3d)
10.09 19:27:50 [Server] [INFO] You are 3 version(s) behind
10.09 19:27:50 [Server] [INFO] Download the new version at: https://papermc.io/downloads/paper
10.09 19:27:50 [Server] [INFO] Previous version: git-Paper-129 (MC: 1.20.1)

/version Citizens output

10.09 19:28:09 [Server] [INFO] Citizens version 2.0.32-SNAPSHOT (build 3198)
10.09 19:28:09 [Server] [INFO] Website: https://www.citizensnpcs.co
10.09 19:28:09 [Server] [INFO] Author: fullwall

Log file

https://paste.denizenscript.com/View/115066

config.yml

https://paste.denizenscript.com/View/115064

saves.yml

https://paste.denizenscript.com/View/115065

Profiler report

No response

Description

Hello!

I am writing this Bug Report to hopefully get this fixed. I also do understand that the versions that I am currently using are slightly out of date although it takes a while for this to occur which is why they haven't been updated.

On my server I created a custom Trait which when applied allows NPCs to randomly wander around a midpoint to give various towns on my server a more realistic feel. However recently I have noticed that over time the variable DUMMY_SCOREBOARD seems to get larger and larger and eventually causes the server to crash.

I have spent numerous hours trying to fix this is in my WanderingNPC plugin (which can be viewed here). However no where in my code do I modify anything related to the scoreboard which is why I believe it could be an issue with Citizens rather than my plugin. (However if the Memory Leak is my fault I am very sorry for the inconvenience)

Here is one photo from the memory leak

Any help would be much appreciated as I have spent ages trying to fix this! If you need any more information I am more than happy to provide it!

Kind Regards RandomTomato 🍅

fullwall commented 1 year ago

You'd have to investigate what minecraft is actually storing in the scoreboard. probably easier to talk through this on discord.

RandomTomato commented 1 year ago

You'd have to investigate what minecraft is actually storing in the scoreboard. probably easier to talk through this on discord.

Hey! Thank you for responding to this! My discord is @randomtomato 😊😁

mcmonkey4eva commented 1 year ago

You don't appear to be in the Citizens Discord https://discord.gg/Q6pZGSR