[boskid][2.0.15] Stack inserters do not respond to stack size change
Posted: Mon Nov 11, 2024 9:14 pm
As the topic title says, stack inserters do not respond to their stack size changing while waiting for items. If a stack inserter is waiting for an item while already having a few in-hand, it does not respond to the stack size being changed. This will result in situations where the stack inserter is holding more items than its stack size allows, but the inserter refuses to drop them despite its destination being empty.
My expectation would be that if the stack size is set equal or less than the number of items the inserter is holding, the stack inserter should drop the items (if the destination is free, of course) and then continue operating using the new stack size. The stack size can be changed either by manually configuring the inserter or by circuit network control, the behavior is the same (as in, nothing happens either way).
I have attached a video showing the issue and hopefully explaining clearly what is happening. It seems the problem originates from the fact that the stack inserters are inactive while waiting for a change in the inventory they are picking up from (makes sense, generally speaking). Changing the inserter configuration does not wake the inserter up and it does not re-evaluate its state, so it remains stuck in a now-invalid waiting state until something else wakes it up for some other reason. This can effectively lead to deadlocks if the pickup inventory isn't modified externally, as the stack inserters themselves do not obey changes to their configuration which should result in them operating rather than waiting. Note that in the video I show this happening with circuit network stack size control, but the same thing happens if the stack size is changed manually from the inserter's UI.
I have attached my save file and the log as well.
My expectation would be that if the stack size is set equal or less than the number of items the inserter is holding, the stack inserter should drop the items (if the destination is free, of course) and then continue operating using the new stack size. The stack size can be changed either by manually configuring the inserter or by circuit network control, the behavior is the same (as in, nothing happens either way).
I have attached a video showing the issue and hopefully explaining clearly what is happening. It seems the problem originates from the fact that the stack inserters are inactive while waiting for a change in the inventory they are picking up from (makes sense, generally speaking). Changing the inserter configuration does not wake the inserter up and it does not re-evaluate its state, so it remains stuck in a now-invalid waiting state until something else wakes it up for some other reason. This can effectively lead to deadlocks if the pickup inventory isn't modified externally, as the stack inserters themselves do not obey changes to their configuration which should result in them operating rather than waiting. Note that in the video I show this happening with circuit network stack size control, but the same thing happens if the stack size is changed manually from the inserter's UI.
I have attached my save file and the log as well.