[2.0.69] --run-replay runs indefinetely after game is won
Posted: Fri Oct 17, 2025 2:52 am
Hello,
We're using --run-replay for automated speedrun validation.
However, for some saves, the replay fails to terminate and hangs indefinitely.
The shortest/latest run that reproduces (v2.0.69): see run linked in description of https://www.speedrun.com/factorio/runs/z5g361gm
I suspect this happens after a scenario is finished:
- I injected a script to log ticks and rocket launches; the very last tick is when the rocket is launched
- Hang still happens without the rocket launch script, so that rules out the script
- Same hang happens with space age, for a run that ends in reaching the solar system edge
- Doesn't happen for speedruns that don't end in a scenario win
The process still consumes CPU afterwards indefinitely.
I tried creating more minimal example,in the latest version, but this somehow didn't reproduce the issue: making a freeplay save, going into editor mode, and launching a rocket; or /c game.set_game_state(). Tried both saving the replay on the victory ui, and afterwards.
I have a hacky workaround for this right now.
We're using --run-replay for automated speedrun validation.
However, for some saves, the replay fails to terminate and hangs indefinitely.
The shortest/latest run that reproduces (v2.0.69): see run linked in description of https://www.speedrun.com/factorio/runs/z5g361gm
I suspect this happens after a scenario is finished:
- I injected a script to log ticks and rocket launches; the very last tick is when the rocket is launched
- Hang still happens without the rocket launch script, so that rules out the script
- Same hang happens with space age, for a run that ends in reaching the solar system edge
- Doesn't happen for speedruns that don't end in a scenario win
The process still consumes CPU afterwards indefinitely.
I tried creating more minimal example,in the latest version, but this somehow didn't reproduce the issue: making a freeplay save, going into editor mode, and launching a rocket; or /c game.set_game_state(). Tried both saving the replay on the victory ui, and afterwards.
I have a hacky workaround for this right now.