BuildCraft|Core

BuildCraft|Core

7M Downloads

IndexOutOfBoundsException

Opened this issue ยท 5 comments

commented

Using Buildcraft 3.7.2, but looking at the source code, the bug is still present on 4.0.1.

Happened when I put a Diamond AND Gate on a Wooden Conductive Pipe, which is sitting on a Stirling Engine and right clicked the gate to open the GUI.

net.minecraft.util.ReportedException: Ticking memory connection
    at net.minecraft.network.NetworkListenThread.func_71747_b(NetworkListenThread.java:60)
    at net.minecraft.server.integrated.IntegratedServerListenThread.func_71747_b(IntegratedServerListenThread.java:109)
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:677)
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:573)
    at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:127)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:470)
    at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:573)
Caused by: java.lang.IndexOutOfBoundsException: Index: 36, Size: 36
    at java.util.ArrayList.rangeCheck(ArrayList.java:604)
    at java.util.ArrayList.get(ArrayList.java:382)
    at buildcraft.core.gui.BuildCraftContainer.func_75144_a(BuildCraftContainer.java:29)
    at invtweaks.forge.PacketHandler.onClickPacket(PacketHandler.java:46)
    at invtweaks.forge.PacketHandler.onPacketData(PacketHandler.java:23)
    at cpw.mods.fml.common.network.NetworkRegistry.handlePacket(NetworkRegistry.java:255)
    at cpw.mods.fml.common.network.NetworkRegistry.handleCustomPacket(NetworkRegistry.java:245)
    at cpw.mods.fml.common.network.FMLNetworkHandler.handlePacket250Packet(FMLNetworkHandler.java:84)
    at net.minecraft.network.NetServerHandler.func_72501_a(NetServerHandler.java:1098)
    at net.minecraft.network.packet.Packet250CustomPayload.func_73279_a(SourceFile:59)
    at net.minecraft.network.MemoryConnection.func_74428_b(MemoryConnection.java:89)
    at net.minecraft.network.NetServerHandler.func_72570_d(NetServerHandler.java:134)
    at net.minecraft.network.NetworkListenThread.func_71747_b(NetworkListenThread.java:53)
    ... 6 more
commented

Care to enlighten us what the bug is if you "looked at the source code"?

commented

Isn't InventoryTweak causing it?? Look at Stack Trace...

commented

BuildCraft is calling get() on an ArrayList without checking the size first...

commented

Reproduce it without inventory tweaks and we'll look at it.

commented

BuildCraft is calling get() on an ArrayList without checking the size first...

Countered by the fact that it shouldn't be out of bounds in the first place.