Tested with mmocore1.12 and md 1.1.2 & 1.2.0 & 1.2.1 all resulted with the above error.
Hi MD developers, I have been encountering some possible memory leak issues. I used a test server to test it. When I open and close dungeon over a specific times, the server will crash due to outofmemory error. The only plugins I installed are md and protocollib. I used paper 1.19.2 build 173 and 1.19.3 build 448 and md build 135 for testing. The logs are here: https://pastebin.com/pauDgDjp
For the queue issue, our players reported that sometimes the queue system would stuck, and no one can enter the dungeons or leave the queue. Our server limited 6 instances max. The normal queue situation is: player gets in queue -> player notified that theres a instance limit -> the ready info jumps out(when a instance is freed) -> get in the dungeon normally When a stuck happens: player gets in queue -> player notified that theres a instance limit -> stays in the queue even someone has finished a dungeon.
Summary
Our server is a rpg server that uses the mm + md. We found that the server crashes more often when there are more dungeons are opened. We performed a small experiment (on a test server) that shows that mm potentially has some memory leak issue when new worlds are loaded.
Steps to reproduce
We are using paper 1.19.2 build 173 + mm 5.2.3 dev build + md 1.1.1 Our experiment process is as follows:
Using the method above, we find that when mm is installed, we can only open around 5 md dungeons before crash. But when mm is not installed, the server wont crash and the memory is freed when the md worlds are unloaded.
Current behavior
MM seems to hold the memory even after the md world is unloaded.
Intended correct behavior
MM will free the memory when md worlds are closed or unloaded.
Server log file
Debug log snippet
Proposed fixes
Describe what you think the issue or any potential fixes may be.
Currently an exception output is separated into many lines. I know we should try to eliminate the errors instead of blocking it using plugins like CSF, but sometimes some errors are hard to eliminate in a short period. Making it into single line will allow us to block a specific error with single keyword instead have to block every line of the generated error.
We are using bungeecord + paper 1.18.2 + MythicDungeons v1.1.0 When using /recruit command, it will trigger the null pointer exception and nothing will happen. The log is here: https://pastebin.com/hkmUyNfT Thanks!
Summary
I am using MM with DungeonXL, which will create a temp world when players enters the dungeon (there are mm mobs in those dungeons). From the console logs we found out that sometimes mm will throw this error many many times (like an infinite loop) when the dxl temp world is created.
[00:22:48] [Craft Scheduler Thread - 226 - MythicMobs/ERROR]: [MythicMobs] [31m[SCHEDULER] Exception thrown whilst executing task[37m [00:22:48] [Craft Scheduler Thread - 226 - MythicMobs/WARN]: java.lang.NullPointerException: Cannot invoke "java.util.Collection.iterator()" because "c" is null [00:22:48] [Craft Scheduler Thread - 226 - MythicMobs/WARN]: at java.base/java.util.AbstractCollection.addAll(AbstractCollection.java:335) [00:22:48] [Craft Scheduler Thread - 226 - MythicMobs/WARN]: at MythicMobs-5.0.4.jar//io.lumine.mythic.core.skills.audience.WorldAudience.get(WorldAudience.java:25) [00:22:48] [Craft Scheduler Thread - 226 - MythicMobs/WARN]: at MythicMobs-5.0.4.jar//io.lumine.mythic.core.skills.mechanics.ParticleOrbitalEffect$Animator.run(ParticleOrbitalEffect.java:138) [00:22:48] [Craft Scheduler Thread - 226 - MythicMobs/WARN]: at MythicMobs-5.0.4.jar//io.lumine.mythic.bukkit.utils.Delegates$RunnableToConsumer.accept(Delegates.java:93) [00:22:48] [Craft Scheduler Thread - 226 - MythicMobs/WARN]: at MythicMobs-5.0.4.jar//io.lumine.mythic.bukkit.utils.Schedulers$LumineTask.run(Schedulers.java:162) [00:22:48] [Craft Scheduler Thread - 226 - MythicMobs/WARN]: at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftTask.run(CraftTask.java:101) [00:22:48] [Craft Scheduler Thread - 226 - MythicMobs/WARN]: at org.bukkit.craftbukkit.v1_18_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) [00:22:48] [Craft Scheduler Thread - 226 - MythicMobs/WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) [00:22:48] [Craft Scheduler Thread - 226 - MythicMobs/WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [00:22:48] [Craft Scheduler Thread - 226 - MythicMobs/WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [00:22:48] [Craft Scheduler Thread - 226 - MythicMobs/WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
Steps to reproduce
When players enters a dxl dungeon, there is a chance to trigger this infinite error loop.
Current behavior
There are a lot of errors in console, the log file grows to hundreds of MB after few hours.
Server log file
Debug log snippet
Still collecting the logs, I will upload it as soon as I capture it.