Repurposed Structures (Quilt/Fabric)

Repurposed Structures (Quilt/Fabric)

8M Downloads

Crash when generating map

nightpool opened this issue · 7 comments

commented

The server crashed while trying to generate a new map for a villager trade:

[05:24:29] [Server Watchdog/ERROR]: A single server tick took 60.00 seconds (should be max 0.05)
[05:24:29] [Server Watchdog/ERROR]: Considering it to be crashed, server will forcibly shutdown.
Crash report:
---- Minecraft Crash Report ----
// Daisy, daisy...

Time: 2023-11-26 05:24:30
Description: Watching Server

java.lang.Error: Watchdog
        at net.minecraft.class_2919.method_43052(class_2919.java:50)
        at net.minecraft.class_2919.method_12665(class_2919.java:78)
        at com.telepathicgrunt.repurposedstructures.world.structures.placements.AdvancedRandomSpread.method_40169(AdvancedRandomSpread.java:110)
        at net.mehvahdjukaar.supplementaries.common.worldgen.StructureLocator.addAllPossibleFeatureChunksAtDistance(StructureLocator.java:212)
        at net.mehvahdjukaar.supplementaries.common.worldgen.StructureLocator.findNearestMapFeatures(StructureLocator.java:148)
        at net.mehvahdjukaar.supplementaries.common.worldgen.StructureLocator.findNearestRandomMapFeature(StructureLocator.java:44)
        at net.mehvahdjukaar.supplementaries.common.entities.trades.AdventurerMapsHandler.createMapOrQuill(AdventurerMapsHandler.java:161)
        at net.mehvahdjukaar.supplementaries.common.entities.trades.AdventurerMapsHandler$RandomAdventureMapTrade.method_7246(AdventurerMapsHandler.java:126)
        at net.minecraft.class_3988.method_19170(class_3988.java:251)
        at net.minecraft.class_1646.method_7237(class_1646.java:898)
[truncated]

Full crash report here: https://gist.github.com/nightpool/d9c13afc7388eab99a7097ba91132122

The proximate cause seems to be a deadlock between calling ChunkRandom#setSeed in two different threads at the same time

commented

It’s not a deadlock. That’s what the code path vanilla structure placement logic continuously runs through as it tries to locate a structure.

supplementaries is trying to locate an rs structure and is taking too long for whatever reason. Looks more like a supplementaries issue as if it was RS’s code running, RS generates its own map trades asynchronously to not lock up the server. supplementaries does not do it asynchronously and seems to be the own doing the locating here instead. RS is not at fault.

commented

@nightpool Please update supplementaries to latest and try again. The issue should be resolved now on their end. I'll close automatically if I don't hear back in a week

commented
commented

I don’t have any links on hand. I assumed the map stuff changelog update was it. I did already let the dev know and he was working on fixing the issue as it seemed he might had missed a condition that should’ve avoided the issue. It could also be that it is loading village tagged structure but his system located all structures in that tag. And since rs has nether villages, it could be stuff looking for nether villages in overworld. Or it could also be taking too long to find all the overworld villages as some are very rare like badlands or mushroom or so.

commented
commented

Looks like supplementary made a commit that will change their map logic to pick one structure from a structure tag to find instead of trying to find all entry. Should reduce their map load times
MehVahdJukaar/Supplementaries@2cfda0a

Closing as supplementary got a solution to resolve their map times

commented