[Rseding91] [0.16.7] Recharging robots freeze if their force is changed

This subforum contains all the issues which we already resolved.
User avatar
Dustine
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Tue Mar 31, 2015 4:52 pm
Contact:

[Rseding91] [0.16.7] Recharging robots freeze if their force is changed

Post by Dustine »

Essentially, if you do (cell being a logistic cell):

Code: Select all

for _, bot in pairs(cell.to_charge_robots) do
  bot.force = "neutral"
  bot.force = "player"
end
any robots caught by this code that aren't near a roboport will freeze in mid-air, and nothing save from mining them seems to fix it (replacing roboports, forcing to swap the force of a robot once again, ...).

Image

It's... really hard to replicate, as the bug only happens to robots within that array and not any other way I've tried so far, so I had to use a dummy mod (zzzDebug) with the code above on on_tick for it, which I attached to this post, together with two savegames where the bug is happening (with robots already frozen and some about to freeze the next tick).
Attachments
Game 2.zip
(1.8 MiB) Downloaded 137 times
Game.zip
(907.52 KiB) Downloaded 140 times
zzzDebug_0.0.0.zip
(2.07 KiB) Downloaded 151 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 14264
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.7] Recharging robots freeze if their force is changed

Post by Rseding91 »

Is there anything for them to charge at on the neutral force?
If you want to get ahold of me I'm almost always on Discord.
User avatar
Dustine
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Tue Mar 31, 2015 4:52 pm
Contact:

Re: [0.16.7] Recharging robots freeze if their force is changed

Post by Dustine »

Rseding91 wrote:Is there anything for them to charge at on the neutral force?
Not on the examples above. I swear I remembered testing that yesterday, but just in case...

Image
Image

I tested it right now, on 0.16.11, on a brand new map with a neutral roboport nearby and they still froze in place. I attached the savegame with the neutral roboport to this post.
Just for fun, after saving, I set the game.speed to 100 and waited a bit, and they never recovered even after what the savegame timer said 20 or so in-game minutes had passed.
Attachments
Game 3.zip
(1.12 MiB) Downloaded 136 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 14264
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [0.16.7] Recharging robots freeze if their force is changed

Post by Rseding91 »

Ok, I found the issue and it's now fixed for the next version of 0.16.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”