Biomancy

Biomancy

311k Downloads

Pehkui: Stack overflow with PehkuiCompat$ScaleModifier.

ByThePowerOfScience opened this issue ยท 1 comments

commented

Please complete the following information:

  • Forge-Version: 47.2.30
  • Mod-Version: 2.8.1.0

Describe the bug

PehkuiCompat$1 calls itself when trying to get scale data.

Stacktrace
[17Jun2024 20:31:24.976] [Server thread/WARN] [net.minecraft.world.entity.EntityType/]: Exception loading entity: 
net.minecraft.ReportedException: Loading entity NBT
	at net.minecraft.world.entity.Entity.m_20258_(Entity.java:1765) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.world.entity.EntityType.m_185988_(EntityType.java:532) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.Util.m_137521_(Util.java:419) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.world.entity.EntityType.m_20642_(EntityType.java:529) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.world.entity.EntityType.m_20669_(EntityType.java:607) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.world.entity.EntityType.m_20645_(EntityType.java:563) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.world.entity.EntityType$1.m_147056_(EntityType.java:584) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1856) ~[?:?]
	at net.minecraft.world.entity.EntityType$1.tryAdvance(EntityType.java:583) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at java.util.Spliterator.forEachRemaining(Spliterator.java:332) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
	at net.minecraft.world.level.chunk.storage.EntityStorage.m_223456_(EntityStorage.java:62) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?]
	at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
	at net.minecraft.util.thread.ProcessorMailbox.m_18759_(ProcessorMailbox.java:91) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.util.thread.ProcessorMailbox.m_18747_(ProcessorMailbox.java:146) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.util.thread.ProcessorMailbox.run(ProcessorMailbox.java:102) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:156) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:770) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:161) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:130) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:753) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:747) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:115) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:732) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:665) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[server-1.20.1-20230612.114412-srg.jar%23637!/:?]
	at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: java.lang.StackOverflowError
	at virtuoel.pehkui.api.ScaleType.getScaleData(ScaleType.java:37) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at com.github.elenterius.biomancy.integration.pehkui.PehkuiCompat$1.modifyScale(PehkuiCompat.java:58) ~[biomancy-forge-1.20.1-2.8.1.0.jar%23397!/:2.8.1.0]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at com.github.elenterius.biomancy.integration.pehkui.PehkuiCompat$1.modifyScale(PehkuiCompat.java:58) ~[biomancy-forge-1.20.1-2.8.1.0.jar%23397!/:2.8.1.0]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at com.github.elenterius.biomancy.integration.pehkui.PehkuiCompat$1.modifyScale(PehkuiCompat.java:58) ~[biomancy-forge-1.20.1-2.8.1.0.jar%23397!/:2.8.1.0]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at com.github.elenterius.biomancy.integration.pehkui.PehkuiCompat$1.modifyScale(PehkuiCompat.java:58) ~[biomancy-forge-1.20.1-2.8.1.0.jar%23397!/:2.8.1.0]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at com.github.elenterius.biomancy.integration.pehkui.PehkuiCompat$1.modifyScale(PehkuiCompat.java:58) ~[biomancy-forge-1.20.1-2.8.1.0.jar%23397!/:2.8.1.0]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at com.github.elenterius.biomancy.integration.pehkui.PehkuiCompat$1.modifyScale(PehkuiCompat.java:58) ~[biomancy-forge-1.20.1-2.8.1.0.jar%23397!/:2.8.1.0]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at com.github.elenterius.biomancy.integration.pehkui.PehkuiCompat$1.modifyScale(PehkuiCompat.java:58) ~[biomancy-forge-1.20.1-2.8.1.0.jar%23397!/:2.8.1.0]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at com.github.elenterius.biomancy.integration.pehkui.PehkuiCompat$1.modifyScale(PehkuiCompat.java:58) ~[biomancy-forge-1.20.1-2.8.1.0.jar%23397!/:2.8.1.0]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at com.github.elenterius.biomancy.integration.pehkui.PehkuiCompat$1.modifyScale(PehkuiCompat.java:58) ~[biomancy-forge-1.20.1-2.8.1.0.jar%23397!/:2.8.1.0]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.TypedScaleModifier.modifyScale(TypedScaleModifier.java:44) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at virtuoel.pehkui.api.ScaleData.getScale(ScaleData.java:252) ~[Pehkui-3.8.2+1.20.1-forge.jar%23542!/:?]
	at com.github.elenterius.biomancy.integration.pehkui.PehkuiCompat$1.modifyScale(PehkuiCompat.java:58) ~[biomancy-forge-1.20.1-2.8.1.0.jar%23397!/:2.8.1.0]
	<repeats for about 2000 lines>

I made an issue with Pehkui thinking it was on their end, but they said it only happened because this mod's scale modifier class didn't check if it was the same as the one it was calling before doing it.

They suggested to use TypedScaleModifier, so I tried that (through Mixin), which just gave the same result but without the PehkuiCompat$1 lines.

You should sort this out with them since I've already reported the issue and had my ticket dismissed.

Expected behavior

The entity fetches the scale data without crashing the server. :/

Additional context

This is in a fairly-substantial modpack, but there's nothing in it that would be messing with this mechanism. If you can't reproduce the issue on your own, I could try to run a debugger on the server and figure out what's up.

commented

Well i can't reproduce the issue, but I made a blind fix with the suggested TypedScaleModifier even though you mentioned your mixin attempt didn't work.

@ByThePowerOfScience please try the following build and let me know if that solves your issue or not:
https://github.com/Elenterius/Biomancy/releases/download/1.20.1-v2.8.2.1/biomancy-forge-1.20.1-2.8.2.1.jar