Skip to content

Remove empty replay recordings#1933

Open
DevOpsOfChaos wants to merge 1 commit intoReturn-To-The-Roots:masterfrom
DevOpsOfChaos:sidequest/skip-empty-replay-recordings
Open

Remove empty replay recordings#1933
DevOpsOfChaos wants to merge 1 commit intoReturn-To-The-Roots:masterfrom
DevOpsOfChaos:sidequest/skip-empty-replay-recordings

Conversation

@DevOpsOfChaos
Copy link
Copy Markdown

Summary

  • remove replay files when recording stops without any recorded game frame
  • keep normal replay recording unchanged once the replay has a non-zero last game frame
  • add regression coverage for empty replay recording cleanup

Motivation

Starting a game and aborting during early setup, for example after a script error, can leave behind 0-GF replay files. These files are not useful as actual replays and clutter the replay folder.

This keeps completed/non-empty replay recordings unchanged, but removes empty recordings when recording is stopped cleanly.

Fixes #984

Validation

  • Built Test_integration locally with Visual Studio 2022 Debug
  • Ran Serialization/EmptyReplayRecordingIsRemoved
  • Ran Serialization/ReplayWithMap
  • Ran Serialization

Copy link
Copy Markdown
Member

@Flow86 Flow86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds reasonable to me. cleaning up clutter is always good

@Flamefire Flamefire enabled auto-merge May 2, 2026 10:58
@Spikeone
Copy link
Copy Markdown
Member

Spikeone commented May 2, 2026

Doesn't this potentially also mean, that if during game setup something wents wrong, we won't be able to find this by loading a replay? Maybe there are some special addon combinations that would break the game on startup so no GF is run. Not sure so guess you know better @Flamefire

@Flamefire
Copy link
Copy Markdown
Member

I'd say in those cases we could as well start the game from whatever was chosen there.
So far we never needed that but you were annoyed by those 0 GF replays. So I'd use this until we see actual uses where those replays would help.

@DevOpsOfChaos
Copy link
Copy Markdown
Author

I'd say in those cases we could as well start the game from whatever was chosen there. So far we never needed that but you were annoyed by those 0 GF replays. So I'd use this until we see actual uses where those replays would help.

Thanks, that matches my reasoning as well.

I mainly wanted to remove the useless 0-GF replay clutter for cleanly stopped recordings. If we later find a real debugging case where such empty replays are useful, we can revisit this, but for now I would keep the cleanup as-is.

@Flamefire Flamefire force-pushed the sidequest/skip-empty-replay-recordings branch from a4789e9 to e968df3 Compare May 6, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not record 0 GF replays

4 participants