Project Red - Illumination

Project Red - Illumination

37M Downloads

Crash when inserting Item Broadcaster Chip

jodamm opened this issue ยท 2 comments

commented

Project Red 4.3.7 build 32 Minecraft 1.6.4 (Attack of the B Team 1.0.9c)

Time: 03.04.14 17:48
Description: Ticking tile entity

java.lang.IllegalArgumentException: Comparison method violates its general contract!
    at java.util.TimSort.mergeHi(Unknown Source)
    at java.util.TimSort.mergeAt(Unknown Source)
    at java.util.TimSort.mergeCollapse(Unknown Source)
    at java.util.TimSort.sort(Unknown Source)
    at java.util.TimSort.sort(Unknown Source)
    at java.util.Arrays.sort(Unknown Source)
    at scala.collection.SeqLike$class.sorted(SeqLike.scala:615)
    at scala.collection.AbstractSeq.sorted(Seq.scala:40)
    at mrtjp.projectred.transportation.RequestBranchNode.doPullReq(requests.scala:83)
    at mrtjp.projectred.transportation.RequestBranchNode.doRequest$1(requests.scala:48)
    at mrtjp.projectred.transportation.RequestBranchNode.<init>(requests.scala:52)
    at mrtjp.projectred.transportation.RequestRoot.<init>(requests.scala:341)
    at mrtjp.projectred.transportation.RequestConsole.makeRequest(requests.scala:669)
    at mrtjp.projectred.transportation.ChipStockKeeper$$anonfun$update$1$$anonfun$apply$mcVI$sp$1.apply$mcV$sp(ChipStockKeeper.scala:55)
    at mrtjp.projectred.transportation.ChipStockKeeper$$anonfun$update$1$$anonfun$apply$mcVI$sp$1.apply(ChipStockKeeper.scala:43)
    at mrtjp.projectred.transportation.ChipStockKeeper$$anonfun$update$1$$anonfun$apply$mcVI$sp$1.apply(ChipStockKeeper.scala:43)
    at mrtjp.projectred.core.utils.LabelBreaks.label(LabelBreaks.scala:13)
    at mrtjp.projectred.core.utils.LabelBreaks.label(LabelBreaks.scala:25)
    at mrtjp.projectred.transportation.ChipStockKeeper$$anonfun$update$1.apply$mcVI$sp(ChipStockKeeper.scala:43)
    at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:141)
    at mrtjp.projectred.transportation.ChipStockKeeper.update(ChipStockKeeper.scala:42)
    at mrtjp.projectred.transportation.RoutedInterfacePipePart$$anonfun$updateServer$1.apply(RoutedInterfacePipePart.scala:63)
    at mrtjp.projectred.transportation.RoutedInterfacePipePart$$anonfun$updateServer$1.apply(RoutedInterfacePipePart.scala:63)
    at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
    at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:108)
    at mrtjp.projectred.transportation.RoutedInterfacePipePart.updateServer(RoutedInterfacePipePart.scala:63)
    at mrtjp.projectred.transportation.RoutedJunctionPipePart.update(RoutedJunctionPipePart.scala:187)
    at codechicken.multipart.TileMultipart$$anonfun$updateEntity$1.apply(TileMultipart.scala:85)
    at codechicken.multipart.TileMultipart$$anonfun$updateEntity$1.apply(TileMultipart.scala:85)
    at codechicken.multipart.TileMultipart.operate(TileMultipart.scala:79)
    at codechicken.multipart.TileMultipart.func_70316_g(TileMultipart.scala:85)
    at net.minecraft.world.World.func_72939_s(World.java:2209)
    at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:550)
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:668)
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:587)
    at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:129)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:484)
    at net.minecraft.server.ThreadMinecraftServer.run(SourceFile:583)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
    at java.util.TimSort.mergeHi(Unknown Source)
    at java.util.TimSort.mergeAt(Unknown Source)
    at java.util.TimSort.mergeCollapse(Unknown Source)
    at java.util.TimSort.sort(Unknown Source)
    at java.util.TimSort.sort(Unknown Source)
    at java.util.Arrays.sort(Unknown Source)
    at scala.collection.SeqLike$class.sorted(SeqLike.scala:615)
    at scala.collection.AbstractSeq.sorted(Seq.scala:40)
    at mrtjp.projectred.transportation.RequestBranchNode.doPullReq(requests.scala:83)
    at mrtjp.projectred.transportation.RequestBranchNode.doRequest$1(requests.scala:48)
    at mrtjp.projectred.transportation.RequestBranchNode.<init>(requests.scala:52)
    at mrtjp.projectred.transportation.RequestRoot.<init>(requests.scala:341)
    at mrtjp.projectred.transportation.RequestConsole.makeRequest(requests.scala:669)
    at mrtjp.projectred.transportation.ChipStockKeeper$$anonfun$update$1$$anonfun$apply$mcVI$sp$1.apply$mcV$sp(ChipStockKeeper.scala:55)
    at mrtjp.projectred.transportation.ChipStockKeeper$$anonfun$update$1$$anonfun$apply$mcVI$sp$1.apply(ChipStockKeeper.scala:43)
    at mrtjp.projectred.transportation.ChipStockKeeper$$anonfun$update$1$$anonfun$apply$mcVI$sp$1.apply(ChipStockKeeper.scala:43)
    at mrtjp.projectred.core.utils.LabelBreaks.label(LabelBreaks.scala:13)
    at mrtjp.projectred.core.utils.LabelBreaks.label(LabelBreaks.scala:25)
    at mrtjp.projectred.transportation.ChipStockKeeper$$anonfun$update$1.apply$mcVI$sp(ChipStockKeeper.scala:43)
    at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:141)
    at mrtjp.projectred.transportation.ChipStockKeeper.update(ChipStockKeeper.scala:42)
    at mrtjp.projectred.transportation.RoutedInterfacePipePart$$anonfun$updateServer$1.apply(RoutedInterfacePipePart.scala:63)
    at mrtjp.projectred.transportation.RoutedInterfacePipePart$$anonfun$updateServer$1.apply(RoutedInterfacePipePart.scala:63)
    at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
    at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:108)
    at mrtjp.projectred.transportation.RoutedInterfacePipePart.updateServer(RoutedInterfacePipePart.scala:63)
    at mrtjp.projectred.transportation.RoutedJunctionPipePart.update(RoutedJunctionPipePart.scala:187)
    at codechicken.multipart.TileMultipart$$anonfun$updateEntity$1.apply(TileMultipart.scala:85)
    at codechicken.multipart.TileMultipart$$anonfun$updateEntity$1.apply(TileMultipart.scala:85)
    at codechicken.multipart.TileMultipart.operate(TileMultipart.scala:79)
    at codechicken.multipart.TileMultipart.func_70316_g(TileMultipart.scala:85)

-- Tile entity being ticked --
Details:
    Name: savedMultipart // TileMultipart_cmp$$7
    Block type: ID #1281 (tile.ccmultipart // codechicken.multipart.BlockMultipart)
    Block data value: 0 / 0x0 / 0b0000
    Block location: World: (-59,5,536), Chunk: (at 5,0,8 in -4,33; contains blocks -64,0,528 to -49,255,543), Region: (-1,1; contains chunks -32,32 to -1,63, blocks -512,0,512 to -1,255,1023)
    Actual block type: ID #1281 (tile.ccmultipart // codechicken.multipart.BlockMultipart)
    Actual block data value: 0 / 0x0 / 0b0000
Stacktrace:
    at net.minecraft.world.World.func_72939_s(World.java:2209)
    at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:550)

setup

I can reproduce this bug by building the setup shown in the picture.
After building the Pipes:

  1. put a configured Item Stock Keeper Chip in the Routed Interface pipe in the blue box so that it is requesting items.
  2. put 8 Item Broadcaster Chips with priority : 0 in the Routed Interface pipes in the yellow box.
  3. put 4 Item Broadcaster Chips with priority : -10 in the Routed Interface pipes in the red box.
commented

This looks similar to #379 especially because I think doPullReq used to be getPromisesFromBroadcasters but apparently that error should no longer happen

commented

Finally, instructions to reproduce this!
Thanks @jodamm, for the very helpful report :)