OpenBlocks

OpenBlocks

56M Downloads

[Bug] Skyblock server kick

aschmois opened this issue ยท 2 comments

commented

Sometimes when applying a redstone signal to the skyblock my character gets kicked from my server and throws a stack overflow error.

13:59:39] [Server thread/WARN]: Failed to handle packet for /127.0.0.1:50479
net.minecraft.util.ReportedException: Exception while updating neighbours
    at net.minecraft.world.World.func_147460_e(World.java:730) ~[ahb.class:?]
    at net.minecraft.world.World.func_147459_d(World.java:648) ~[ahb.class:?]
    at net.minecraft.world.World.func_147444_c(World.java:613) ~[ahb.class:?]
    at net.minecraft.world.World.func_72921_c(World.java:553) ~[ahb.class:?]
    at net.minecraft.block.BlockLever.func_149727_a(BlockLever.java:273) ~[alv.class:?]
    at net.minecraft.server.management.ItemInWorldManager.func_73078_a(ItemInWorldManager.java:376) ~[mx.class:?]
    at net.minecraft.network.NetHandlerPlayServer.func_147346_a(NetHandlerPlayServer.java:556) ~[nh.class:?]
    at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.func_148833_a(SourceFile:60) ~[jo.class:?]
    at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.func_148833_a(SourceFile:9) ~[jo.class:?]
    at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:212) ~[ej.class:?]
    at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:165) [nc.class:?]
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:659) [MinecraftServer.class:?]
    at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:334) [lt.class:?]
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) [li.class:?]
Caused by: java.lang.StackOverflowError
    at java.lang.Class.getEnclosingMethodInfo(Class.java:964) ~[?:1.7.0_75]
    at java.lang.Class.getEnclosingClass(Class.java:1137) ~[?:1.7.0_75]
    at java.lang.Class.getSimpleBinaryName(Class.java:1282) ~[?:1.7.0_75]
    at java.lang.Class.getSimpleName(Class.java:1174) ~[?:1.7.0_75]
    at net.minecraft.crash.CrashReportCategory$Entry.<init>(CrashReportCategory.java:275) ~[o.class:?]
    at net.minecraft.crash.CrashReportCategory.func_71507_a(CrashReportCategory.java:112) ~[k.class:?]
    at net.minecraft.crash.CrashReportCategory.func_71499_a(CrashReportCategory.java:117) ~[k.class:?]
    at net.minecraft.crash.CrashReportCategory.func_71500_a(CrashReportCategory.java:106) ~[k.class:?]
    at net.minecraft.crash.CrashReport.func_71504_g(CrashReport.java:54) ~[b.class:?]
    at net.minecraft.crash.CrashReport.<init>(CrashReport.java:41) ~[b.class:?]
    at net.minecraft.crash.CrashReport.func_85055_a(CrashReport.java:379) ~[b.class:?]
    at net.minecraft.world.World.func_147460_e(World.java:701) ~[ahb.class:?]
    at net.minecraft.world.World.func_147459_d(World.java:648) ~[ahb.class:?]
    at net.minecraft.world.World.func_147444_c(World.java:613) ~[ahb.class:?]
    at net.minecraft.world.World.func_72921_c(World.java:553) ~[ahb.class:?]

And then it repeats this:

at openblocks.common.block.BlockSky.func_149695_a(BlockSky.java:45) ~[BlockSky.class:?]
    at net.minecraft.world.World.func_147460_e(World.java:697) ~[ahb.class:?]
    at net.minecraft.world.World.func_147459_d(World.java:651) ~[ahb.class:?]
    at net.minecraft.world.World.func_147444_c(World.java:613) ~[ahb.class:?]
    at net.minecraft.world.World.func_72921_c(World.java:553) ~[ahb.class:?]
    at openblocks.common.block.BlockSky.func_149695_a(BlockSky.java:45) ~[BlockSky.class:?]
    at net.minecraft.world.World.func_147460_e(World.java:697) ~[ahb.class:?]
    at net.minecraft.world.World.func_147459_d(World.java:651) ~[ahb.class:?]
    at net.minecraft.world.World.func_147444_c(World.java:613) ~[ahb.class:?]
    at net.minecraft.world.World.func_72921_c(World.java:553) ~[ahb.class:?]
...

Fortunately the server doesn't crash and neither does the client. But I can't make a working switch for the skyblocks. It might have something to do that I'm using red alloy wires placed on the skyblocks but sometimes it works sometimes it doesn't.

commented

Oh and when I log back in this happens

http://i.imgur.com/cxW8Tqu.jpg (large picture, just click on it)

commented

Looks like it could be a loop of world.setBlockMetadataWithNotify
It doesn't look like the Block is checking it's current state before updating it's metadata, allowing for a recursive update. It wouldn't make a difference if it was just a lever but it could be that the alloy wire is also doing the same thing as we are, and they echo off each other.

I'm not confident enough to do a patch for this just on Github and I don't have a development environment set up currently (Can't test my changes). Though it looks like a trivial fix so it wont take long.

Thanks for your report.