Page 1 of 1

[2.0.14] Crash mining roboport with bot with .active = false (Entity::changePositionWithoutCollisionOrAABBCheck)

Posted: Tue Nov 05, 2024 8:39 pm
by Hanakocz
Hello,
I am working on some scripting with robots and networks, I found out few issues with them, especially I am getting reproducible crash in this specific case.

Steps to reproduce:
1) Build a roboport
2) Pause a game (in editor for example)
3) Place logistic/construction robot anywhere close to the roboport, then hover over it and write /c game.player.selected.active = false
4) Remove the roboport and get a crash

There are few more issues with this, namely:
1) Roboport can't be made .active = false. I believe roboports should be able to be switched off by script, especially when they are already switching off by losing power.
2) robots keep flying even when they are supposed to not be active, and then they rubberband back to their positions (this is cosmetic but yea)

Re: [2.0.14] Crash when mining roboport while there is robot that has .active = false

Posted: Tue Nov 05, 2024 9:25 pm
by boskid
I suspect this was already fixed by 119911 but that needs to be verified.

Re: [2.0.14] Crash when mining roboport while there is robot that has .active = false

Posted: Fri Nov 08, 2024 11:05 pm
by Hanakocz
This crash actually still happens in 2.0.16, with the same actions taken as reported previously.

Is it to be noticed in this message or should I make new post?

Re: [2.0.14] Crash mining roboport with bot with .active = false (Entity::changePositionWithoutCollisionOrAABBCheck)

Posted: Tue Nov 12, 2024 3:29 pm
by Rseding91
Can you please give new steps to reproduce this? I've tried the ones you listed and it never crashes for me. I suspect there's something else you're doing that's missing. Maybe record a video?

Re: [2.0.14] Crash mining roboport with bot with .active = false (Entity::changePositionWithoutCollisionOrAABBCheck)

Posted: Tue Nov 12, 2024 5:58 pm
by Hanakocz
Adding video. No mods except SA, default scenario.

Oh, I see what is probably the problem. If the roboport is mined in same tick (e.q. stayed paused by editor), then robot doesn't get assigned to the network, and the crash doesn't happen. The robot has to be assigned to the network of the mined roboport, so the game has to be unpaused (I included editor pause just to have easier to target the robot, so that's my mistake)

So it is:
1) build roboport and robot
2) make robot .active = false - it will stop at the spot (but visually continues)
3) make sure the bot was in roboport network more than one tick so it got at least one update
4) delete the roboport the bot is assigned to
Factorio 2024.11.12 - 18.47.58.09.mp4
(40.2 MiB) Downloaded 28 times
also adding new log from version 2.0.17