McJtyMods / XNet

Advanced item/liquid/energy/... networking
MIT License
91 stars 49 forks source link

Server Crash when interacting with "Item Channel" in Xnet. (Ticking block entity error) #579

Closed lolachilada closed 1 month ago

lolachilada commented 1 month ago

Issue description: I've noticed no items were being moved from the Storage scanner to chests after I've applied some filters in their whitelist fields (items I tried to transfer where available in the Storage modules). Chests were in "Items" channel set to "Ins" mode and Scanner set to "Ext" mode. When a filter was removed from the whitelist of a chest, items were being pushed to its inventory. After failing to resolve the issue I've decided to update Xnet and RFtools. Once I've updated all the necessary mods I noticed server would not start successfully. I've used the setting in forge-server.toml to delete the entity that might have corrupted the world. I was able to restart it and log in, then I noticed the Xnet Controller was reset and had no power. I've setup my storage network in the Controller again and tried to setup the "Item" channel with filters, hoping it would work this time. Items were still not being transferred, however this time when I tried to remove the item from the whitelist of a chest, it has caused the server to crash.

Steps to reproduce:

  1. Setup storage system using Storage Scanner and Xnet Controller.
  2. Setup Item Channel.
  3. Set Storage scanner to "Ext" mode, then few chests to "Ins" mode and apply some filter items in the whitelist fields of the chests. (Nothing happens, items are not being moved to the chests from the storage network as expected).
  4. Clicking on an item from the whitelist of a chest to try to remove the filter causes the server to crash.

Versions:

crash-2024-05-14_10.32.41-server.txt

Possibly incompatible mods and versions:

Relevant logs, if any: Applying the "removeErroringBlockEntities = true" in forge-server.toml config file allows the server to start successfully again. After that all the settings in Xnet controller are erased and the power bank is empty. Consecutive attempts in setting up "Item" channel yield same result.

Error message from the server console when I tried to restart the server before letting the server remove the error ticking block entity:

Console error message.txt

McJty commented 1 month ago

Are you sure you updated all my mods? Can you give me the complete server log?

lolachilada commented 1 month ago

I'm pretty sure I've updated them all. Here are latest logs I've found.

latest.log

2024-05-14-1.log

debug.log

McJty commented 1 month ago

Weird. Not sure what's going on there to be honest. Don't really understand how XNet can cause this

lolachilada commented 1 month ago

I understand. I guess that's the kinda problem you can run into when there are so many mods loaded. Thanks for looking into it. I'll keep trying to find what could be the cause behind it and give you an update. Take care.

McJty commented 1 month ago

If you could try again. The bug might be fixed now. You have to update McJtyLib and XNet

lolachilada commented 1 month ago

Sorry for the delay. I was trying to avoid testing with other players connected in case it crashed again. Should be able to verify this evening if the updates fixed it. Thanks for working on it.

Edit: That have seemed to resolve the server crash when interacting with the whitelist items. Thank you.
On a side note: Is Storage Scanner not meant to work on Item Channel in Xnet? I couldn't extract items from the network to the chests through it, however when I added each individual Storage Module to the channel and deleted the Scanner from it the items started to go into my chests inventories as intended. I was under Impression Scanner would allow I/O from it, but it doesn't work when there are whitelists enabled. Other than that thanks again for a prompt fix !

Dertiende commented 1 month ago

Can you check the functionality of the scanner for your task on Xnet version 6.0.2 or earlier?

lolachilada commented 1 month ago

6.0.2 is the version that initially came in a modpack and that's where I noticed some functionality issues. At first I was using RFTools filter in Xnet filter index to setup up basic ore processing automation which worked for a while. Items transfer on Xnet also worked if I didn't use any filter at all. Then I expanded the network to some other machines which required me to use whitelist from Xnet and that's when I noticed things stopped working on Items channel. Went to next patch (6.1.0) and whitelist still was preventing any item transfer, but this time interacting with it caused server to crash. Newest patch has stopped the crashes. I hope I'm setting it up right. Do all the storages and machines I use on "Item Channel" have to also be connected to the "Storage" channel? Btw, all the storage modules and chests in RFtools Storage channel are set to "inventory" while only Scanner is set as "storage". Xnet controller is not connected to any channels except one with power.

Dertiende commented 1 month ago

Ok, thanks for info. I just wanted to make sure that the problem is not only with new versions

ChanceNCounter commented 1 month ago

My specific experience was different from what OP described, but it seems like it must have been the same bug, and I can confirm that the update resolved it.

I set up a single, many-to-one item channel on a controller which I then realized was unpowered. I rearranged some spaghetti to power it off an existing Pipez universal pipe that had been powering adjacent machines. Then I reconnected the controller to its network, and immediately the game (SSP, ATM9) crashed. The logs complained about a ticking Xnet controller. I restarted the pack, expecting to have lost progress, but had not, and the controller dutifully crashed again the same way.

I saw this ticket, and decided to try the update before chiming in, so foolishly didn't get the log. But, encouragingly, after updating the pack, the game loaded without drama, and the controller had already moved a ton of items by the time I finished loading in.