[1.1.53] Inserters won't insert despite shortage of input

We are aware of them, but they have low priority. We have more important things to do. They go here in order not to take space in the main bug thread list.
Post Reply
Anachrony
Fast Inserter
Fast Inserter
Posts: 133
Joined: Thu Sep 21, 2017 10:55 pm
Contact:

[1.1.53] Inserters won't insert despite shortage of input

Post by Anachrony »

What did you do?
Using Nullius Overhaul, set a Crusher 3 machine with the Grass Seed recipe, with a moderately but not completely full output pipe.

What happened?
After a short period of functioning properly, it gets into a bad state, where it stops production, reporting Item Ingredient Shortage. There is an inserter with a full chest of the required input, but the inserter refuses to insert it. If you rotate the inserter or do anything else to "wake it up" it will work for a while, but eventually will fall back into a bad state. All of the solid inputs or outputs in the recipe are well below the stack size for those items.

What did you expect to happen?
If there is insufficient input for the recipe, and the inserter is empty handed and has a supply of that item, then it should insert the item into the crafting machine. The crafting machine should not get permanently stuck with sleeping inserters when the outputs all have space and all the inputs are available.
crusher.jpg
crusher.jpg (421.35 KiB) Viewed 2013 times
Log file:
crusher.log
(49.7 KiB) Downloaded 85 times
Save file:
CrusherBug.zip
(2.07 MiB) Downloaded 76 times
This save is a small new game, currently stuck in the bad state. If you fix the stuck inserter, it should only take a minute or two before it gets stuck again.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2244
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.53] Inserters won't insert despite shortage of input

Post by boskid »

I looked at this issue and it is really annoying to fix without redoing large parts of the fluid system logic. Basically the issue happens because a fluid flow right now is unable to notify any entity to wake up so there is a bunch of workarounds everywhere. One of them is that crafting machines with fluid in the product fluid boxes are not going to sleep. In this case however, crafting machine is going to sleep because at certain point in time, all product fluid boxes are empty and there is item ingredient shortage which is one of the rare conditions where a crafting machine is expected to be able to go to sleep without any risk. Issue is that when the crafting machine goes to sleep with all product fluidboxes empty, it is no longer able to wakeup anything. Due to the oscillating fluid behavior (artifact of a fluidbox base area being too small, causing fluid flow values to transfer too much) and because the product fluidboxes are marked as "input-output" (not "output" only), product fluidbox becomes full for a moment. Fluid box will not wakeup that crafting machine when fluid amount drops, and when the input inserter checks if it can insert anything, crafting machine says it has a fluid product overload so the input inserter goes to sleep. At this point everything stalls because input inserter sleeps (saw machine full), machine sleeps (saw product empty) and fluid oscillates (unable to wakeup crafting machine).

If possible, please do not use "input-output" connection on the product fluidboxes of the crafting machine to avoid this issue. I will think if there are reasonable ways to solve this issue, but there is a chance it may become a "wont fix", at least for now.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.53] Inserters won't insert despite shortage of input

Post by Rseding91 »

Inserters should never go to sleep when there's a *fluid* product overload, only when there's an item-product overload. So that might be something we should change if they're doing that currently.
If you want to get ahold of me I'm almost always on Discord.

Anachrony
Fast Inserter
Fast Inserter
Posts: 133
Joined: Thu Sep 21, 2017 10:55 pm
Contact:

Re: [1.1.53] Inserters won't insert despite shortage of input

Post by Anachrony »

OK, I'll probably just change the pipe connection to output only then. Note that a lot of vanilla entities leave the pipe connection for output fluid boxes as the default type. For example the oil refinery and chemical plant pipe connections are all left as the default "input-output", not "output". So those are the precedents I used, rather than arbitrarily deciding that I should make them "input-output" on my own. A key difference is that they have base_level 1, so any vanilla pipe or tank should be 100% below that, which would effectively keep it flowing in only one direction. That isn't the case in Nullius, so that's probably the key difference rather than the pipe connection type itself.

It's possible there might be some analogous issue that could happen with entities that are legitimately passthrough with multiple pipe connections intentionally set to input-output. I'm not overly concerned about that though, since at least in Nullius the only intentionally input-output passthrough pipe connection is an input rather than an output, so it wouldn't be susceptible to this. There's no reason I can't mark the output fluid boxes as having output pipe connections.

Anachrony
Fast Inserter
Fast Inserter
Posts: 133
Joined: Thu Sep 21, 2017 10:55 pm
Contact:

Re: [1.1.53] Inserters won't insert despite shortage of input

Post by Anachrony »

This is fixed in the mod by making fluid boxes output only, so anyone attempting to reproduce this would need to downgrade to 1.2.15 or earlier.

Post Reply

Return to “Minor issues”