Page 1 of 1

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

Posted: Thu Dec 28, 2017 10:58 pm
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).

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

Posted: Sat Dec 30, 2017 7:35 pm
by Rseding91
Is there anything for them to charge at on the neutral force?

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

Posted: Sat Dec 30, 2017 9:21 pm
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.

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

Posted: Sun Dec 31, 2017 11:02 pm
by Rseding91
Ok, I found the issue and it's now fixed for the next version of 0.16.