CyclopsMC / IntegratedTunnels

Transfer other energy, items and fluids over Integrated Dynamics networks
MIT License
20 stars 13 forks source link

Server crash with items pushed between networks #194

Closed met4000 closed 4 years ago

met4000 commented 4 years ago

Issue type:


Short description:

Server crashes when items are pushed/transported between networks with certain configurations. Note: read TL;DR in second post for summary

Steps to reproduce the problem:

I've had difficulty in identifying what could be the cause of the crash here, so below the setup is a list of behaviours with different tunnel 'combinations' (i.e. crash/no crash). Note that in test cases where the server crashes, after the initial server crash the setup would operate as expected after each network had a network update with no further crashes; once it has crashed, anything I could think of to do to the networks to 'refresh' them (short of replacing the tunnels) didn't induce another crash. [edit]

  1. Place down an item container (tested with minecraft:chest)
  2. Create "network 1", with "tunnel 1_1" attached to the chest, and "tunnel 1_2" elsewhere
  3. Create "network 2", with "tunnel 2_1" attached to "tunnel 1_2", and "tunnel 2_2" elsewhere
  4. Place down another item container (tested with minecraft:chest), attached to "tunnel 2_2"
  5. Place items into the container attached to "network 1" (placed in step 1)

Any importers/exporters are set to "import/export all" using a blank variable card.

Picture of example setup of "test 4" from the table below (with "tunnel 1_1" = interface, "tunnel 1_2" = exporter, "tunnel 2_1" = interface, "tunnel 2_2" = interface): example

Behaviour of tested setups: test tunnel 1_1 tunnel 1_2 tunnel 2_1 tunnel 2_2 behaviour
1 interface interface interface exporter no crash, item transfer
2 interface interface importer interface no crash, item transfer
3 interface interface importer exporter no crash, no item transfer
4 interface exporter interface interface no crash, item transfer
5 interface exporter interface exporter crash, then item transfer
6 interface exporter importer interface no crash, item transfer
7 interface exporter importer exporter no crash, no item transfer
8 importer interface interface interface no crash, item transfer
9 importer interface interface exporter no crash, no item transfer
10 importer interface importer interface no crash, item transfer
11 importer interface importer exporter no crash, no item transfer

Expected behaviour:

Expected for "test 5" to not have to crash before transferring items :)

On a tangent, I would also expect "test 7" ("test 11" for similar reasons) to transfer items, as the items are being exported into an item importer, which should then try to store them anywhere, including in the inventory attached to the exporter. Does this imply that item exporters don't truly "push" items, but rather try to store them in the attached inventory, or am I just misunderstanding the pushed-input 'mechanic' for tunnels?


Versions:

Log file:

Pastebin of "test 4" crash report: https://pastebin.com/LYwrjix9 (I do have VanillaFix, so if you do need an actual stacktrace I can disable it and get one - at least, I assume that's why the stacktrace is missing in this crash report)

met4000 commented 4 years ago

Some more testing on specifically the setup of "test 5" that may help (if this information conflicts with anything in the first post, disregard the first post and refer to this):

It's hard for me to try and document the behaviour accurately, and I'm sure I've gotten some of it wrong somewhere;

TL;DR (for both posts): Chest -> Interface -> Exporter -> Interface -> Exporter -> Chest crashes the server if you breathe on it wrong, otherwise it transfers items as you would expect it to. See above post for crash log. If a specific behaviour is required, I would recommend testing it yourself and not relying on what I have written in these posts :)

rubensworks commented 4 years ago

Thanks for the detailed report!

rubensworks commented 4 years ago

I had to make use of my best debugging for this one... But it should be fixed now. Once the new ID release is out, and you would still have this problem, please let me know.