Infinite loop crash when placing two forge hammers side-by-side in the world
jimmed opened this issue ยท 2 comments
Bug Report
Observed Behaviour
Two Forge Hammers were placed side-by-side in the world:
On placing the second one, both client AND server crashed with an infinite loop. Note that loading a world where the blocks are already placed like this does not trigger the crash.
I'm afraid I don't have a client log as this comes from a user report on a server I maintain. The server crashed as follows:
[09:57:22] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.StackOverflowError: null
at net.minecraft.world.World.func_217353_a(World.java:167) ~[?:?]
at net.minecraft.world.IWorldReader.func_217348_a(IWorldReader.java:112) ~[?:?]
at net.minecraft.world.World.func_212866_a_(World.java:163) ~[?:?]
at net.minecraft.world.World.func_175726_f(World.java:159) ~[?:?]
at net.minecraft.world.World.func_175625_s(World.java:598) ~[?:?]
at se.mickelus.tetra.util.TileEntityOptional.from(TileEntityOptional.java:11) ~[tetra:3.5.3]
at se.mickelus.tetra.blocks.forged.hammer.HammerBaseBlock.onNeighborChange(HammerBaseBlock.java:323) ~[tetra:3.5.3]
at net.minecraftforge.common.extensions.IForgeBlockState.onNeighborChange(IForgeBlockState.java:475) ~[forge:?]
at net.minecraft.world.World.func_175666_e(World.java:1009) ~[?:?]
at net.minecraft.world.World.func_175646_b(World.java:805) ~[?:?]
at net.minecraft.tileentity.TileEntity.func_70296_d(TileEntity.java:103) ~[?:?]
at se.mickelus.tetra.blocks.forged.hammer.HammerBaseTile.sync(HammerBaseTile.java:411) ~[tetra:3.5.3]
at se.mickelus.tetra.blocks.forged.hammer.HammerBaseTile.updateRedstonePower(HammerBaseTile.java:184) ~[tetra:3.5.3]
at java.util.Optional.ifPresent(Optional.java:159) ~[?:1.8.0_212]
at se.mickelus.tetra.blocks.forged.hammer.HammerBaseBlock.onNeighborChange(HammerBaseBlock.java:323) ~[tetra:3.5.3]
at net.minecraftforge.common.extensions.IForgeBlockState.onNeighborChange(IForgeBlockState.java:475) ~[forge:?]
at net.minecraft.world.World.func_175666_e(World.java:1009) ~[?:?]
at net.minecraft.world.World.func_175646_b(World.java:805) ~[?:?]
at net.minecraft.tileentity.TileEntity.func_70296_d(TileEntity.java:103) ~[?:?]
at se.mickelus.tetra.blocks.forged.hammer.HammerBaseTile.sync(HammerBaseTile.java:411) ~[tetra:3.5.3]
at se.mickelus.tetra.blocks.forged.hammer.HammerBaseTile.updateRedstonePower(HammerBaseTile.java:184) ~[tetra:3.5.3]
// ... repeats until the max stack depth is reached ...
Expected Behaviour
Neither client nor server crashes.
Minimal setup needed to reproduce
- Forge version: 1.16.5-36.0.10
- Tetra version: 3.5.3
- Tetra configuration: As per Enigmatica 6's default configuration
- Other mods: Enigmatica 6 Modpack v0.3.13
Note: I believe this will be reproducible with just Tetra alone, but I have not had time to verify this yet.
Steps to reproduce
- Place a Forge Hammer
- Place another Forge Hammer horizontally adjacent to the first
- Client & server crash.
This was fixed in 3.6.0, please make sure you're using the latest version before submitting issues in the future.