Page 1 of 1

[2.0.30] Inserter Deadlock when nutrients spoil in Inserter hand

Posted: Sat Jan 11, 2025 11:14 am
by mr_fancy_pants
When items spoil in the inserter hand before they land in the target machine, they are supposed to be put into trash slots as per viewtopic.php?p=638498#p638498. This generally seems to work, however, for the specific case of Nutrients (to be used as fuel for the machine), the inserter will deadlock instead, not inserting the Spoilage or doing anything else until the Spoilage is manually removed. For example:
gleba-nutrients-deadlock.png
gleba-nutrients-deadlock.png (10.73 MiB) Viewed 1815 times
Here you can see the Long-handed inserter on the left for the hovered Biochamber has a Spoilage in hand, the fuel slot is empty, the output is empty, and there are no trash slots in use, but this inserter will not do anything without manual intervention. I would expect that this Spoilage would get inserted into the Biochamber's trash slot, where it could then be removed (by the Long-handed Inserter beside it).

This is a little tricky to trigger on demand as you need the Nutrients to spoil at exactly the right time (after being picked up, but before being inserted into the target machine), but with a factory of any meaningful size it will trigger quite regularly. I had been going around and manually fixing it, thinking I had broken something, before really taking a careful look at it.

I believe this is a fairly recent regression (within the past couple point releases), as I don't remember running into it before and it's happening quite regularly now. I'm also very surprised nobody else has reported this, but I am normally running experimental and most others don't seem to be.

This also seems to happen in essentially the same way for recipes that require Nutrients as an input (but not as fuel), for example:
gleba-nutrients-deadlock-mk2.png
gleba-nutrients-deadlock-mk2.png (11.89 MiB) Viewed 1815 times
Here there is no fuel slot because it's an AM3, but the output slot is empty, there are no trash slots in use and the Bulk inserter is deadlocked in the same way as above with Spoilage in its hand.

Re: [2.0.30] Inserter Deadlock when nutrients spoil in Inserter hand

Posted: Sat Jan 11, 2025 12:24 pm
by Rseding91
Have you actually been able to reproduce this in the latest version from scratch? The tests say it doesn’t happen, but if the inserter had the spoilage in hand during the update from the previous version to latest experimental it could happen (there is no migration yet).

Re: [2.0.30] Inserter Deadlock when nutrients spoil in Inserter hand

Posted: Sat Jan 11, 2025 6:30 pm
by ferrofibrous
Here is a save where the bug occurs about 20 seconds after loading on the pinned Biochamber. Noticed this about 10 minutes after loading my game on 2.0.30 for the first time. Watch the red inserter putting in nutrients, after about 20 seconds one spoils mid swing and the inserter deadlocks.

Re: [2.0.30] Inserter Deadlock when nutrients spoil in Inserter hand

Posted: Sat Jan 11, 2025 9:22 pm
by mr_fancy_pants
I'm fairly sure that was from scratch all in 2.0.30, but I went through and manually cleared every existing deadlock and sure enough here's another one:
gleba-nutrients-deadlock-mk3.png
gleba-nutrients-deadlock-mk3.png (9.86 MiB) Viewed 1563 times
That is definitely from scratch in 2.0.30.

Re: [2.0.30] Inserter Deadlock when nutrients spoil in Inserter hand

Posted: Sat Jan 11, 2025 10:33 pm
by loganb
Hello,

I just wanted to share that I've also seen this regression on 2.0.30 Mac. It's a long handed inserter placing nutrients into a bioreactor. I cleared all the deadlocks manually and it recurred after a few minutes. Lmk if you still need a repro.

Re: [2.0.30] Inserter Deadlock when nutrients spoil in Inserter hand

Posted: Sat Jan 11, 2025 10:58 pm
by Jan
I have the same behavior on fresh 2.0.30 with an Biochamber producing pentapod eggs and a fast inserter

Re: [2.0.30] Inserter Deadlock when nutrients spoil in Inserter hand

Posted: Sat Jan 11, 2025 11:41 pm
by Rseding91
So, looking into it - it's not that the item spoils in the inserter hand - that works just fine. It's that the item spoils on the belt while the inserter is swinging to grab it. Anyway, it's now fixed for the next release.

Re: [2.0.30] Inserter Deadlock when nutrients spoil in Inserter hand

Posted: Sun Jan 12, 2025 12:33 am
by Shuisman
Thank you very much, had so many deadlocks now! I thought I did something wrong.

Re: [2.0.30] Inserter Deadlock when nutrients spoil in Inserter hand

Posted: Sun Jan 12, 2025 12:58 am
by mr_fancy_pants
Very nice, thank you for the quick fix!

Re: [2.0.30] Inserter Deadlock when nutrients spoil in Inserter hand

Posted: Sun Jan 12, 2025 1:44 am
by loganb
Thanks so much! Out of curiosity, when do you expect the next release is going out?

Re: [2.0.30] Inserter Deadlock when nutrients spoil in Inserter hand

Posted: Sun Jan 12, 2025 8:01 pm
by MechBFP
loganb wrote: Sun Jan 12, 2025 1:44 am Thanks so much! Out of curiosity, when do you expect the next release is going out?
If you look at the release history, it's usually not very long between releases.

Re: [2.0.30] Inserter Deadlock when nutrients spoil in Inserter hand

Posted: Wed Jan 15, 2025 6:43 pm
by Stewart43
Rseding91 wrote: Sat Jan 11, 2025 11:41 pm So, looking into it - it's not that the item spoils in the inserter hand - that works just fine. It's that the item spoils on the belt while the inserter is swinging to grab it. Anyway, it's now fixed for the next release.
Are you certain that you're looking at nutrients, not inputs? My experience is that this problem is way more common in 2.0.30 than this unusual timing would explain. I believe that when the FUEL spoils in the inserter hand, it blocks.

Re: [2.0.30] Inserter Deadlock when nutrients spoil in Inserter hand

Posted: Wed Jan 15, 2025 10:20 pm
by Neutronium
Stewart43 wrote: Wed Jan 15, 2025 6:43 pm Are you certain that you're looking at nutrients, not inputs? My experience is that this problem is way more common in 2.0.30 than this unusual timing would explain. I believe that when the FUEL spoils in the inserter hand, it blocks.
+1. I AFK run my game almost every night to grind out research/quality and my Gleba setup which has been largely untouched for a while only started exhibiting this behavior once I downloaded this latest version (2.0.30)

Re: [2.0.30] Inserter Deadlock when nutrients spoil in Inserter hand

Posted: Thu Jan 16, 2025 4:38 pm
by evanrinehart
I was experiencing this bug a lot in 2.0.30, just updated to .31 and made a test rig in sandbox for sanity's sake

Yay it's fixed! But just to clarify what works and what doesn't...

Nutrient spoils in inserter's hand while it is going to insert: attempts to insert into the output slot (not waste slot). If not-spoilage is already there, it will get stuck until slot clears. Probably not a bug.

Nutrient spoils on belt while inserter is going to get it: inserter cancels the attempt. Yay

Spoilage is placed in the inserter's hand manually: inserter tries to insert it but gets permanently stuck if recipe doesn't call for it. OK just avoid doing that

Cheers