Immersive Intelligence

Immersive Intelligence

2M Downloads

[BUG] Crash due to wiring loop involving data combiner

Hawk777 opened this issue · 0 comments

commented

Describe the bug
If you feed the output of a data combiner into one of its inputs, any packet sent into the combiner crashes the game.

To Reproduce
Steps to reproduce the behavior:

  1. Place a data combiner.
  2. Attach connectors to its three terminals.
  3. Run a wire from its output to its right input.
  4. Run a wire from a data input machine to the combiner’s left input.
  5. Activate the data input machine to send a packet.

Expected behavior
I’m not sure, but not a crash.

Logs

java.lang.StackOverflowError: Ticking block entity
	at pl.pabilo8.immersiveintelligence.api.data.DataPacket.clone(DataPacket.java:121)
	at pl.pabilo8.immersiveintelligence.common.blocks.metal.TileEntityDataMerger.onReceive(TileEntityDataMerger.java:144)
	at pl.pabilo8.immersiveintelligence.common.blocks.metal.TileEntityDataConnector.onPacketReceive(TileEntityDataConnector.java:95)
	at pl.pabilo8.immersiveintelligence.api.data.DataWireNetwork.sendPacket(DataWireNetwork.java:107)
	at pl.pabilo8.immersiveintelligence.common.blocks.metal.TileEntityDataConnector.sendPacket(TileEntityDataConnector.java:102)
	at pl.pabilo8.immersiveintelligence.common.blocks.metal.TileEntityDataMerger.onReceive(TileEntityDataMerger.java:211)
	at pl.pabilo8.immersiveintelligence.common.blocks.metal.TileEntityDataConnector.onPacketReceive(TileEntityDataConnector.java:95)
	at pl.pabilo8.immersiveintelligence.api.data.DataWireNetwork.sendPacket(DataWireNetwork.java:107)
	at pl.pabilo8.immersiveintelligence.common.blocks.metal.TileEntityDataConnector.sendPacket(TileEntityDataConnector.java:102)
	at pl.pabilo8.immersiveintelligence.common.blocks.metal.TileEntityDataMerger.onReceive(TileEntityDataMerger.java:211)
	at pl.pabilo8.immersiveintelligence.common.blocks.metal.TileEntityDataConnector.onPacketReceive(TileEntityDataConnector.java:95)
	at pl.pabilo8.immersiveintelligence.api.data.DataWireNetwork.sendPacket(DataWireNetwork.java:107)
	at pl.pabilo8.immersiveintelligence.common.blocks.metal.TileEntityDataConnector.sendPacket(TileEntityDataConnector.java:102)
	at pl.pabilo8.immersiveintelligence.common.blocks.metal.TileEntityDataMerger.onReceive(TileEntityDataMerger.java:211)
	at pl.pabilo8.immersiveintelligence.common.blocks.metal.TileEntityDataConnector.onPacketReceive(TileEntityDataConnector.java:95)
	at pl.pabilo8.immersiveintelligence.api.data.DataWireNetwork.sendPacket(DataWireNetwork.java:107)
	at pl.pabilo8.immersiveintelligence.common.blocks.metal.TileEntityDataConnector.sendPacket(TileEntityDataConnector.java:102)
	at pl.pabilo8.immersiveintelligence.common.blocks.metal.TileEntityDataMerger.onReceive(TileEntityDataMerger.java:211)
	at pl.pabilo8.immersiveintelligence.common.blocks.metal.TileEntityDataConnector.onPacketReceive(TileEntityDataConnector.java:95)

and so on; the cause is obvious, every received packet causes a packet to be sent; in the case of an arithmetic logic machine this stops after a few packets when the machine runs out of energy, but combiners don’t consume energy so it never ends.

Environment

  • OS: Linux
  • Minecraft version: 1.12.2
  • Forge version: 14.23.5.2854
  • Immersive Intelligence version: 0.1.1
  • Immersive Engineering version: 0.12-98