Mekanism

Mekanism

111M Downloads

3rd party ISidedInventory implementations can cause crashes

cobra opened this issue ยท 1 comments

commented

Connect a logistical transporter to an item robin from immersive integration (TE implementation is here), start pumping items, crash the server.

Stacktrace:

java.lang.ArrayIndexOutOfBoundsException: 5
    at mekanism.common.content.transporter.TransporterManager.copyInvFromSide(TransporterManager.java:104)
    at mekanism.common.content.transporter.TransporterManager.getPredictedInsert(TransporterManager.java:334)
    at mekanism.common.InventoryNetwork.calculateAcceptors(InventoryNetwork.java:62)
    at mekanism.common.content.transporter.TransporterPathfinder.getPaths(TransporterPathfinder.java:241)
    at mekanism.common.content.transporter.TransporterPathfinder.getNewBasePath(TransporterPathfinder.java:315)
    at mekanism.common.content.transporter.TransporterStack.recalculatePath(TransporterStack.java:184)
    at mekanism.common.multipart.MultipartTransporter.insert_do(MultipartTransporter.java:280)
    at mekanism.common.multipart.MultipartTransporter.insert(MultipartTransporter.java:262)
    at mekanism.common.util.TransporterUtils.insert(TransporterUtils.java:75)
    at mekanism.common.multipart.PartLogisticalTransporter.pullItems(PartLogisticalTransporter.java:183)
    at mekanism.common.multipart.MultipartTransporter.update(MultipartTransporter.java:61)
    at mekanism.common.multipart.PartLogisticalTransporter.update(PartLogisticalTransporter.java:163)
    at codechicken.multipart.TileMultipart$$anonfun$updateEntity$1.apply(TileMultipart.scala:82)
    at codechicken.multipart.TileMultipart$$anonfun$updateEntity$1.apply(TileMultipart.scala:82)
    at codechicken.multipart.TileMultipart.operate(TileMultipart.scala:76)
    at codechicken.multipart.TileMultipart.func_145845_h(TileMultipart.scala:82)
    at net.minecraft.world.World.func_72939_s(World.java:1939)
    at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489)
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:636)
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547)
    at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:111)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:396)
    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)

I think the problem of the crashing method is pretty obvious. Needs more checks and/or a bigger array.

commented

Try updating Mekanism to the very latest build.