TeamPeril / Sculk-Horde

Sculk Hoard implements a new end-game era to your game that once activated, will force you to fight against the newly awaked ancient sculk hoard in order to survive. This ancient enemy seeks to infect and consume the world in it's entirety.
Apache License 2.0
24 stars 7 forks source link

java.util.ConcurrentModificationException: null Server Chunk Cache #31

Closed Mikeatron-User closed 7 months ago

Mikeatron-User commented 7 months ago

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

Mikeatron-User commented 7 months ago

image

Its not any of these

Mikeatron-User commented 7 months ago

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.

Mikeatron-User commented 7 months ago

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

Mikeatron-User commented 7 months ago

Wasnt that, its probably still my mod. : /

Mikeatron-User commented 7 months ago

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

Mikeatron-User commented 7 months ago

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

Mikeatron-User commented 7 months ago

Enabling these two caused the server to crash. Finally

SculkHorde.raidHandler.raidTick(); // Tick the raid handler
SculkHorde.deathAreaInvestigator.tick();
Mikeatron-User commented 7 months ago

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.

Mikeatron-User commented 7 months ago

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.

Mikeatron-User commented 7 months ago

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

Mikeatron-User commented 7 months ago

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

Mikeatron-User commented 7 months ago

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

Mikeatron-User commented 7 months ago

Summary of Progress so far:

Mikeatron-User commented 7 months ago

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

Mikeatron-User commented 7 months ago

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

Mikeatron-User commented 7 months ago

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