Sculk Horde

Sculk Horde

559k Downloads

java.util.ConcurrentModificationException: null Server Chunk Cache

Mikeatron-User opened this issue ยท 16 comments

commented

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

commented

After some updates to make my code safer, iv made a new branch to do some more testing

commented

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.
commented

image
Disabling this stopped the crashing on world unload. This might be it

commented

image
Got more information this time, what on earth is this?

commented

image
Telling the server to do this a tick later solved the problem.

commented

image

Its not any of these

commented

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.

commented

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

commented

Wasnt that, its probably still my mod. : /

commented

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

commented

Disabled reinforcement system, no dice. I disabled some internal ticking systems that run every world tick, bingo. The server stopped crashing. Going to investigate this further.
image

commented

Enabling these two caused the server to crash. Finally

SculkHorde.raidHandler.raidTick(); // Tick the raid handler
SculkHorde.deathAreaInvestigator.tick();
commented

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.

commented

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.

commented

image

It looks like it might be related to apply effects to entities, im going to investigate and see if there is a standard practice for apply effects to entities

commented

Removing all code related to apply affects to entities has been removed. This stopped the server from crashing.