PC-Logix / LanteaCraft

A Stargate-themed mod for Minecraft
http://lanteacraft.com
Other
43 stars 21 forks source link

Gate chevrons still lit when max wormhole time reached #457

Open joneschrisan opened 7 years ago

joneschrisan commented 7 years ago

Thank you for reporting an issue with LanteaCraft. Please fill out this template when submitting your report - thank you!

Submission checklist

Expected behavior

When the gate has been connected for a certqain time the wormhole should disconnect, gate address should clear from DHD, centre button shoul'd go out on DHD, and chevrons should go out.

Actual behavior

Chevrons still lit but gate has disengaged. Don't know if it's a feature but after this, pressing the centre button on the DHD reconnects the gate immediately to the gate just connected to even though there is no address and it does not dial just connects.

Steps to reproduce

Dial and connect gate. Wait.

System information

Server output when gate disconnects:

[01:59:21] [Server thread/WARN] [LanteaCraft]: Error when processing callback lcpd_handleEvent! java.lang.ArrayIndexOutOfBoundsException: 1 at lc.common.util.ReflectionHelper.invokeWithExpansions(ReflectionHelper.java:61) ~[ReflectionHelper.class:?] at lc.common.base.LCTile.doCallbacks(LCTile.java:160) [LCTile.class:?] at lc.common.base.LCTile.doCallbacksNow(LCTile.java:114) [LCTile.class:?] at lc.tiles.TileStargateBase.notifyConnectionState(TileStargateBase.java:894) [TileStargateBase.class:?] at lc.server.stargate.StargateConnection.sendUpdates(StargateConnection.java:190) [StargateConnection.class:?] at lc.server.stargate.StargateConnection.changeState(StargateConnection.java:184) [StargateConnection.class:?] at lc.server.stargate.StargateConnection.thinkSpinDown(StargateConnection.java:155) [StargateConnection.class:?] at lc.server.stargate.StargateConnection.think(StargateConnection.java:92) [StargateConnection.class:?] at lc.server.stargate.StargateManager.think(StargateManager.java:133) [StargateManager.class:?] at lc.common.util.game.LCTickConnector.doTick(LCTickConnector.java:104) [LCTickConnector.class:?] at lc.common.util.game.LCTickConnector.onWorldTick(LCTickConnector.java:67) [LCTickConnector.class:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler_0_LCTickConnector_onWorldTick_ServerTickEvent.invoke(.dynamic) [?:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) [ASMEventHandler.class:?] at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:140) [EventBus.class:?] at cpw.mods.fml.common.FMLCommonHandler.onPreServerTick(FMLCommonHandler.java:260) [FMLCommonHandler.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:536) [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:?] [01:59:21] [Server thread/WARN] [LanteaCraft]: Error when processing callback computerCraft_handleEvent! java.lang.ArrayIndexOutOfBoundsException: 1 at lc.common.util.ReflectionHelper.invokeWithExpansions(ReflectionHelper.java:61) ~[ReflectionHelper.class:?] at lc.common.base.LCTile.doCallbacks(LCTile.java:160) [LCTile.class:?] at lc.common.base.LCTile.doCallbacksNow(LCTile.java:114) [LCTile.class:?] at lc.tiles.TileStargateBase.notifyConnectionState(TileStargateBase.java:894) [TileStargateBase.class:?] at lc.server.stargate.StargateConnection.sendUpdates(StargateConnection.java:190) [StargateConnection.class:?] at lc.server.stargate.StargateConnection.changeState(StargateConnection.java:184) [StargateConnection.class:?] at lc.server.stargate.StargateConnection.thinkSpinDown(StargateConnection.java:155) [StargateConnection.class:?] at lc.server.stargate.StargateConnection.think(StargateConnection.java:92) [StargateConnection.class:?] at lc.server.stargate.StargateManager.think(StargateManager.java:133) [StargateManager.class:?] at lc.common.util.game.LCTickConnector.doTick(LCTickConnector.java:104) [LCTickConnector.class:?] at lc.common.util.game.LCTickConnector.onWorldTick(LCTickConnector.java:67) [LCTickConnector.class:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler_0_LCTickConnector_onWorldTick_ServerTickEvent.invoke(.dynamic) [?:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) [ASMEventHandler.class:?] at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:140) [EventBus.class:?] at cpw.mods.fml.common.FMLCommonHandler.onPreServerTick(FMLCommonHandler.java:260) [FMLCommonHandler.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:536) [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:?] [01:59:21] [Server thread/WARN] [LanteaCraft]: Error when processing callback lcpd_handleEvent! java.lang.ArrayIndexOutOfBoundsException: 1 at lc.common.util.ReflectionHelper.invokeWithExpansions(ReflectionHelper.java:61) ~[ReflectionHelper.class:?] at lc.common.base.LCTile.doCallbacks(LCTile.java:160) [LCTile.class:?] at lc.common.base.LCTile.doCallbacksNow(LCTile.java:114) [LCTile.class:?] at lc.tiles.TileStargateBase.notifyConnectionState(TileStargateBase.java:894) [TileStargateBase.class:?] at lc.server.stargate.StargateConnection.sendUpdates(StargateConnection.java:192) [StargateConnection.class:?] at lc.server.stargate.StargateConnection.changeState(StargateConnection.java:184) [StargateConnection.class:?] at lc.server.stargate.StargateConnection.thinkSpinDown(StargateConnection.java:155) [StargateConnection.class:?] at lc.server.stargate.StargateConnection.think(StargateConnection.java:92) [StargateConnection.class:?] at lc.server.stargate.StargateManager.think(StargateManager.java:133) [StargateManager.class:?] at lc.common.util.game.LCTickConnector.doTick(LCTickConnector.java:104) [LCTickConnector.class:?] at lc.common.util.game.LCTickConnector.onWorldTick(LCTickConnector.java:67) [LCTickConnector.class:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler_0_LCTickConnector_onWorldTick_ServerTickEvent.invoke(.dynamic) [?:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) [ASMEventHandler.class:?] at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:140) [EventBus.class:?] at cpw.mods.fml.common.FMLCommonHandler.onPreServerTick(FMLCommonHandler.java:260) [FMLCommonHandler.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:536) [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:?] [01:59:21] [Server thread/WARN] [LanteaCraft]: Error when processing callback computerCraft_handleEvent! java.lang.ArrayIndexOutOfBoundsException: 1 at lc.common.util.ReflectionHelper.invokeWithExpansions(ReflectionHelper.java:61) ~[ReflectionHelper.class:?] at lc.common.base.LCTile.doCallbacks(LCTile.java:160) [LCTile.class:?] at lc.common.base.LCTile.doCallbacksNow(LCTile.java:114) [LCTile.class:?] at lc.tiles.TileStargateBase.notifyConnectionState(TileStargateBase.java:894) [TileStargateBase.class:?] at lc.server.stargate.StargateConnection.sendUpdates(StargateConnection.java:192) [StargateConnection.class:?] at lc.server.stargate.StargateConnection.changeState(StargateConnection.java:184) [StargateConnection.class:?] at lc.server.stargate.StargateConnection.thinkSpinDown(StargateConnection.java:155) [StargateConnection.class:?] at lc.server.stargate.StargateConnection.think(StargateConnection.java:92) [StargateConnection.class:?] at lc.server.stargate.StargateManager.think(StargateManager.java:133) [StargateManager.class:?] at lc.common.util.game.LCTickConnector.doTick(LCTickConnector.java:104) [LCTickConnector.class:?] at lc.common.util.game.LCTickConnector.onWorldTick(LCTickConnector.java:67) [LCTickConnector.class:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler_0_LCTickConnector_onWorldTick_ServerTickEvent.invoke(.dynamic) [?:?] at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) [ASMEventHandler.class:?] at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:140) [EventBus.class:?] at cpw.mods.fml.common.FMLCommonHandler.onPreServerTick(FMLCommonHandler.java:260) [FMLCommonHandler.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:536) [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:?]

AfterLifeLochie commented 7 years ago

Your entire tile and network state is becoming out of sync for some reason (also possibly causing #455). From the info above there's clearly a problem processing callbacks (perhaps the varargs expansion isn't working properly; I might have made a mistake -- java vendor/version?).

There's also either something wrong or something throwing an unchecked exception within the internal datagram handling loop. Since there's technically no way to nicely handle this (I have to assume that re-processing the datagram in the future will a) create inconsistent network state and b) has no guarantee of not raising the same exception, so how many times can we try?), the entire queue is cleared. Perhaps this should be narrowed to throw out a single datagram, but generally entities which don't have a known state will request it if required (rendering, min range, etc). If you're seeing this on a server, then something is very wrong.

Could you provide full copies of the logs in the log storage folder (core.log, game.log)? These should include debugging information that isn't output to the console by default which might narrow the issue.