java.util.ConcurrentModificationException: null Server Chunk Cache
Mikeatron-User opened this issue ยท 16 comments
Specifications
Minecraft Version: 1.20.1
Forge Version: 1.20.1-47.1.0
Mod Version: 1.20.1-0.8.5
Modpack Version: Wrath of the Sculk Horde-1.27
Details
- So by leaving the server on by itself, this causes the server to crash.
- Crash log only mentions serverchunk cache, so its likely my chunk loading system.
- Crash Log: https://gist.github.com/Mikeatron-User/9cf20211a3b18e3a857df82331d820db
After some updates to make my code safer, iv made a new branch to do some more testing
Summary of Progress so far:
- I made mob spawning safer by only allowing it to occur next tick.
- Effects are only added / removed next tick aswell. This seems to have stopped the game from crashing randomly.
- The game no longer crashes on
/forceload remove all
- The game no longer crashes after a minute of loading.
- The game crashes when trying to save.
I disabled Phantoms, node, and ancient node from being able to request chunk loading. It still crashes. I suspect that it maybe has to do with me loading / saving data related to the chunk loading system? Not sure, but its my next lead.
Its not the chunkloading system at all, I completly deleted it from the code, and were still getting this error. My next lead is that maybe its argonauts. I know they have a chunk loading system, and its never worked in the game. Going to delete this mod and see what happens. Perhaps I misjudged this when i deleted my mod from the server and it suddenly started working
Was told it could be because spawning mobs, while a mob is ticking, is an issue. The solution is the following:
level().getServer().tell(new net.minecraft.server.TickTask(level().getServer().getTickCount() + 1, () -> {
spawnMob();
}));
However, doing this did not fix the crash
Enabling these two caused the server to crash. Finally
SculkHorde.raidHandler.raidTick(); // Tick the raid handler
SculkHorde.deathAreaInvestigator.tick();
Its the death area investigator apparently. Commenting it out causes the game not to crash. I cant imagine what has caused this to happen and why its only happening now.
For now, i made the death area investigator avoid ticking if raids are disabled in 1.20.1-0.8.5. The cause of the bug will be fixed soon.