Lothrazar / Cyclic

Minecraft mod written in Java
MIT License
160 stars 96 forks source link

1.18.2 Artemis Beacon modified logic seems to hang world load with Brutal Bosses installed #2156

Open Raidobw2 opened 2 years ago

Raidobw2 commented 2 years ago

Minecraft Version: 1.18.2

Forge Version: 40.1.69

Mod Version: Cyclic 1.7.4+

Single Player or Server: Server


When Cyclic and Brutal Bosses are installed together, the world creation gets stuck between 96 and 98%. I believe the versions of the mods required for that to happen would be:

I'm not sure but I think the problem could originate from this commit, though I couldn't precisely understand why https://github.com/Lothrazar/Cyclic/commit/cb49405a75efc9b18d563fca0fc100aa2314c493#diff-87a831f713ac2710a04ac2addcf0fc275b89157a27bd19a5a0a4c67f4729d392

This is the output you get if you run a thread dump with jstack on the hanged process, which leads me to believe something in that commit earlier doesn't play nice with Brutal Bosses, or vice versa. I think Brutal Bosses can spawn with potion effects, they're similar to Apotheosis boss mobs

"Server thread" #99 prio=8 os_prio=1 cpu=3031.25ms elapsed=76.70s tid=0x0000018c3854a380 nid=0x4770 runnable  [0x00000079cf0fd000]
   java.lang.Thread.State: TIMED_WAITING (parking)
        at jdk.internal.misc.Unsafe.park(java.base@17.0.2/Native Method)
        - parking to wait for  <0x00000006c4200170> (a java.lang.String)
        at java.util.concurrent.locks.LockSupport.parkNanos(java.base@17.0.2/Unknown Source)
        at net.minecraft.util.thread.BlockableEventLoop.m_5667_(minecraft@1.18.2/BlockableEventLoop.java:152)
        at net.minecraft.util.thread.BlockableEventLoop.m_18701_(minecraft@1.18.2/BlockableEventLoop.java:142)
        at net.minecraft.server.level.ServerChunkCache.m_7587_(minecraft@1.18.2/ServerChunkCache.java:129)
        at net.minecraft.world.level.Level.m_6522_(minecraft@1.18.2/Level.java:169)
        at net.minecraft.world.level.LevelReader.m_46819_(minecraft@1.18.2/LevelReader.java:123)
        at net.minecraft.world.level.Level.m_6325_(minecraft@1.18.2/Level.java:164)
        at net.minecraft.world.level.Level.m_8055_(minecraft@1.18.2/Level.java:390)
        at com.lothrazar.cyclic.util.BlockstatesUtil.findBlocks(cyclic@1.18.2-1.7.6/BlockstatesUtil.java:41)
        at com.lothrazar.cyclic.block.antipotion.BlockAntiBeacon.isPotionApplicable(cyclic@1.18.2-1.7.6/BlockAntiBeacon.java:114)
        at com.lothrazar.cyclic.event.PotionEvents.isPotionApplicable(cyclic@1.18.2-1.7.6/PotionEvents.java:25)
        at net.minecraftforge.eventbus.ASMEventHandler_1672_PotionEvents_isPotionApplicable_PotionApplicableEvent.invoke(.dynamic)
        at net.minecraftforge.eventbus.ASMEventHandler.invoke(eventbus@5.0.3/ASMEventHandler.java:85)
        at net.minecraftforge.eventbus.EventBus$$Lambda$4543/0x0000000801824cf8.invoke(eventbus@5.0.3/Unknown Source)
        at net.minecraftforge.eventbus.EventBus.post(eventbus@5.0.3/EventBus.java:302)
        at net.minecraftforge.eventbus.EventBus.post(eventbus@5.0.3/EventBus.java:283)
        at net.minecraft.world.entity.LivingEntity.m_7301_(minecraft@1.18.2/LivingEntity.java:908)
        at net.minecraft.world.entity.LivingEntity.m_147207_(minecraft@1.18.2/LivingEntity.java:888)
        at net.minecraft.world.entity.LivingEntity.m_7292_(minecraft@1.18.2/LivingEntity.java:884)
        at com.brutalbosses.entity.BossType.initStats(brutalbosses@1.18.2-5.4/BossType.java:189)
        at com.brutalbosses.entity.BossType.initForEntity(brutalbosses@1.18.2-5.4/BossType.java:133)
        at com.brutalbosses.entity.capability.BossCapability.deserializeNBT(brutalbosses@1.18.2-5.4/BossCapability.java:132)
        at net.minecraftforge.common.capabilities.CapabilityDispatcher.deserializeNBT(forge@40.1.69/CapabilityDispatcher.java:127)
        at net.minecraftforge.common.capabilities.CapabilityProvider.deserializeCaps(forge@40.1.69/CapabilityProvider.java:148)
        at net.minecraft.world.entity.Entity.m_20258_(minecraft@1.18.2/Entity.java:1570)
        at net.minecraft.world.entity.EntityType.m_185988_(minecraft@1.18.2/EntityType.java:472)
        at net.minecraft.world.entity.EntityType$$Lambda$35032/0x000000080479ce10.accept(minecraft@1.18.2/Unknown Source)
        at net.minecraft.Util.m_137521_(minecraft@1.18.2/Util.java:395)
        at net.minecraft.world.entity.EntityType.m_20642_(minecraft@1.18.2/EntityType.java:469)
        at net.minecraft.world.entity.EntityType.m_20669_(minecraft@1.18.2/EntityType.java:552)
        at net.minecraft.world.entity.EntityType.m_20645_(minecraft@1.18.2/EntityType.java:508)
        at net.minecraft.world.entity.EntityType$1.m_147056_(minecraft@1.18.2/EntityType.java:529)
        at net.minecraft.world.entity.EntityType$1$$Lambda$35029/0x000000080479c760.accept(minecraft@1.18.2/Unknown Source)
        at java.util.ArrayList$ArrayListSpliterator.tryAdvance(java.base@17.0.2/Unknown Source)
        at net.minecraft.world.entity.EntityType$1.tryAdvance(minecraft@1.18.2/EntityType.java:528)
        at java.util.Spliterator.forEachRemaining(java.base@17.0.2/Unknown Source)
        at java.util.stream.ReferencePipeline$Head.forEach(java.base@17.0.2/Unknown Source)
        at net.minecraft.world.level.entity.PersistentEntitySectionManager.m_157559_(minecraft@1.18.2/PersistentEntitySectionManager.java:121)
        at net.minecraft.server.level.ServerLevel.m_143327_(minecraft@1.18.2/ServerLevel.java:1507)
        at net.minecraft.server.level.ChunkMap.m_143064_(minecraft@1.18.2/ChunkMap.java:634)
        at net.minecraft.server.level.ChunkMap.m_203035_(minecraft@1.18.2/ChunkMap.java:651)
        at net.minecraft.server.level.ChunkMap$$Lambda$34905/0x000000080476ebe8.m_196866_(minecraft@1.18.2/Unknown Source)
        at net.minecraft.world.level.chunk.LevelChunk.m_62952_(minecraft@1.18.2/LevelChunk.java:417)
        at net.minecraft.server.level.ChunkMap.m_202988_(minecraft@1.18.2/ChunkMap.java:659)
        at net.minecraft.server.level.ChunkMap$$Lambda$34904/0x000000080476e170.apply(minecraft@1.18.2/Unknown Source)
        at com.mojang.datafixers.util.Either.lambda$mapLeft$0(datafixerupper@4.1.27/Either.java:162)
        at com.mojang.datafixers.util.Either$$Lambda$34659/0x000000080472bbc8.apply(datafixerupper@4.1.27/Unknown Source)
        at com.mojang.datafixers.util.Either$Left.map(datafixerupper@4.1.27/Either.java:38)
        at com.mojang.datafixers.util.Either.mapLeft(datafixerupper@4.1.27/Either.java:162)
        at net.minecraft.server.level.ChunkMap.m_202985_(minecraft@1.18.2/ChunkMap.java:643)
        at net.minecraft.server.level.ChunkMap$$Lambda$34901/0x000000080476daf0.apply(minecraft@1.18.2/Unknown Source)
        at java.util.concurrent.CompletableFuture$UniApply.tryFire(java.base@17.0.2/Unknown Source)
        at java.util.concurrent.CompletableFuture$Completion.run(java.base@17.0.2/Unknown Source)
        at net.minecraft.server.level.ChunkTaskPriorityQueueSorter.m_143188_(minecraft@1.18.2/ChunkTaskPriorityQueueSorter.java:62)
        at net.minecraft.server.level.ChunkTaskPriorityQueueSorter$$Lambda$34547/0x000000080470bcb0.run(minecraft@1.18.2/Unknown Source)
        at net.minecraft.util.thread.BlockableEventLoop.m_6367_(minecraft@1.18.2/BlockableEventLoop.java:157)
        at net.minecraft.server.level.ServerChunkCache$MainThreadExecutor.m_6367_(minecraft@1.18.2/ServerChunkCache.java:542)
        at net.minecraft.util.thread.BlockableEventLoop.m_7245_(minecraft@1.18.2/BlockableEventLoop.java:131)
        at net.minecraft.server.level.ServerChunkCache$MainThreadExecutor.m_7245_(minecraft@1.18.2/ServerChunkCache.java:550)
        at net.minecraft.server.level.ServerChunkCache.m_8466_(minecraft@1.18.2/ServerChunkCache.java:266)
        at net.minecraft.server.MinecraftServer.m_129961_(minecraft@1.18.2/MinecraftServer.java:787)
        at net.minecraft.server.MinecraftServer.m_7245_(minecraft@1.18.2/MinecraftServer.java:776)
        at net.minecraft.util.thread.BlockableEventLoop.m_18699_(minecraft@1.18.2/BlockableEventLoop.java:116)
        at net.minecraft.server.MinecraftServer.m_130012_(minecraft@1.18.2/MinecraftServer.java:761)
        at net.minecraft.server.MinecraftServer.m_129940_(minecraft@1.18.2/MinecraftServer.java:475)
        at net.minecraft.server.MinecraftServer.m_130006_(minecraft@1.18.2/MinecraftServer.java:318)
        at net.minecraft.server.dedicated.DedicatedServer.m_7038_(minecraft@1.18.2/DedicatedServer.java:173)
        at net.minecraft.server.MinecraftServer.m_130011_(minecraft@1.18.2/MinecraftServer.java:661)
        at net.minecraft.server.MinecraftServer.m_177918_(minecraft@1.18.2/MinecraftServer.java:261)
        at net.minecraft.server.MinecraftServer$$Lambda$34203/0x0000000804638468.run(minecraft@1.18.2/Unknown Source)
        at java.lang.Thread.run(java.base@17.0.2/Unknown Source)

The original report of this is at https://github.com/FTBTeam/FTB-Modpack-Issues/issues/1242, though you'll likely find the same info here and there

I'm available anytime if you need me to run more tests or need more information,

Thanks for your time in advance and have a good day!

Raidobw2 commented 2 years ago

Seems to happen with Blood Magic's new dungeons with the Pathway to the endless realm, but only if Cyclic and Brutal Bosses are installed too. Versions that time:

Relayed from https://github.com/FTBTeam/FTB-Modpack-Issues/issues/1237 Game hangs: image

Truncated thread dump to relevant info, similar to earlier https://paste.feed-the-beast.com/view/eb1e3033 Full thread dump in case you need it https://paste.feed-the-beast.com/view/530cf5c7

someaddons commented 1 year ago

happens when adding a potion effect during entity creation in worldgen