[0.17.2] Bots get confused when upgrade planner is used twice

This subforum contains all the issues which we already resolved.
Post Reply
Altainia
Burner Inserter
Burner Inserter
Posts: 18
Joined: Sun May 20, 2018 5:27 pm
Contact:

[0.17.2] Bots get confused when upgrade planner is used twice

Post by Altainia »

Details:
When using the upgrade planner on something that has at least two upgrades, like a yellow belt (which can be upgraded to a red belt and yet again to a blue belt), if you select those belts for upgrade a second time while the first upgrade is in progress, some of your bots will get confused and stay motionless, hovering over belts that are not marked for upgrade in a perfect grid as if they had arrived at their destination and there was no work to do. They will stay there until they get low on power, at which point they will fly to the player (assuming you're using bots from your personal roboport) and recharge, but they will not leave that position. You must mine them for them to return to you.

Reproduction steps:
With personal roboports and construction bots on your person...
  1. Lay out an array of yellow belts such that there are more yellow belts than you have robots but the belts are all within range of your personal roboports. The more belts the better.
  2. Use an upgrade planner to select all the belts for upgrade.
  3. After some of the belts have been upgraded but before all of them have, select all the belts to be upgraded again (even the ones that are still pending upgrade and those that have already been upgraded).
  4. Observe that some of your bots get stuck at a belt that is not marked for upgrade and just stay there until they return to the player for a recharge. Observe that some of the belts are still yellow and have not been upgraded at all.
As an additional note, I have observed similar behavior when, instead of going for a second upgrade I go for a deconstruction of all the belts. However, in this case, the bots eventually figure it out and all the belts get deconstructed. But they are confused for a bit.

Expected behavior:
Bots should not be confused.

My own musings
It's just a guess, but all the bots that are confused are holding red belts, so it appears that they're trying to replace yellows but they went to the wrong spot and they don't update where to go. But all of them are above red or yellow belts (until they go to the player to recharge) so two bots may have been tasked with the same location. However, this problem does not occur if the upgrade planner's initial use is allowed to complete fully before issuing the second one or using the deconstruction planner. So maybe the subsequent use of the upgrade planner tasks another bot to a location even if a bot was already intending to go there. One of them gets there and does the job and the other one gets there and doesn't have anything to do. The deconstruction planner could similarly not realize that bots were already heading to upgrade a belt and instead remove it. When the upgrade happens, there's nothing to replace.
Attachments
screenshot-tick-672076.png
screenshot-tick-672076.png (7.35 MiB) Viewed 3527 times
factorio-current.log
(6.94 KiB) Downloaded 131 times

TheRaph
Fast Inserter
Fast Inserter
Posts: 221
Joined: Sun Sep 24, 2017 6:31 pm
Contact:

Re: [0.17.2] Bots get confused when upgrade planner is used twice

Post by TheRaph »

I think the reason for getting jammed is that the bots have the wrong item in inventory.

In slow:
Your bots get order to replace yellow belts with red ones.
One of your bots goes to your inventory and get one red belt.
At this point (or just be ore) the tile-entity will be assigned to exactly that bot (as stated by devs, the the work to be done select the worker).
Now you select the next upgrade - blue belt.
The tile-entity is the same, the assigned bot is the same, but that bit can't do the job, because it has the wrong item in inventory...
to go back and change item is not programmed.

Gummiente27
Inserter
Inserter
Posts: 49
Joined: Mon Jul 16, 2018 2:59 am
Contact:

Re: [0.17.2] Bots get confused when upgrade planner is used twice

Post by Gummiente27 »

Workaround: Put upgrade planner into your inv, open it. On first slot select yellow belt, on the slot to its right, select blue belt. In next rows do it for the undergorund belt and splitter. Then use upgrade planner again.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5148
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.2] Bots get confused when upgrade planner is used twice

Post by Klonan »

I am able to reproduce the problem:

Image

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

Re: [0.17.2] Bots get confused when upgrade planner is used twice

Post by Rseding91 »

Thanks for the report and steps to reproduce. I was able to reproduce the issue and it's now fixed for the next version of 0.17. I didn't add a migration for the stuck robots so you'll need to just mine them out of the air to fix them.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”