Skip to content

make_game: discard partial WAVs after XMA decoder errors - #8639

Open
GonZiin wants to merge 1 commit into
ItsNotRexed:mainfrom
GonZiin:fix/xma-strict-decode
Open

GonZiin wants to merge 1 commit into
ItsNotRexed:mainfrom
GonZiin:fix/xma-strict-decode

Conversation

@GonZiin

@GonZiin GonZiin commented Nov 23, 2026

Copy link
Copy Markdown

BUILD-XMA-STRICT-DECODE (coordination claim).

Change

FFmpeg can report a decoder error, write partial PCM, and exit 0. The XMA2 conversion then publishes that WAV and treats it as complete on later runs. Pass -xerror so the existing failure path removes the staging file and leaves the XMA source pending for a retry.

The regression simulates a decoder that writes an output even on error. It fails on the previous invocation, then verifies cleanup and a successful retry with the fix. #5317 also edits this invocation for concurrent staging and currently conflicts with main.

Verification

  • Linux x86-64, Python 3.14.4, CPU only. Audio stage, preflight, asset decoder and texture-pool tests passed (119 passed, 1 skipped).
  • FFmpeg 7.0.2 with synthetic PCM WAV data through the XMA stage's converter path. A malformed final packet left no published WAV, and a corrected input produced all 16,384 samples on retry.
  • Python compilation, CLI help, the no-game-data scan and git diff --check passed.
  • The full translator suite ran 5,957 tests and reported the same two failing files on this branch and main (test_image_atomics_guard and test_image_store_d16). The shader-resume fixture errors (Restore shader resume regression tests for the polling scheduler #7018) and line-ending check failure (tools: pin text writes to newline="\n" in leonida_tui and wave_diff #7857) also reproduced on main.

AI-assisted (Codex). The tests used synthetic files.

@Grimkeh Grimkeh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Independent Linux CPU review (61000529)

What changed: make_game discards partial WAVs after XMA decoder errors so a failed decode does not leave a truncated WAV that resume would treat as done.

Checked:

  • python3 -I tests/test_audio_stage_resume.py → 12 OK.

Looks correct; no game files.

@garuspl

garuspl commented Nov 23, 2026

Copy link
Copy Markdown

Tested 6100052 on Windows 11 (CPU only, no GPU needed): pass

Windows 11 Pro, Python 3.14.7, no GPU or game files involved; pytest/numpy/Pillow pinned from tests/requirements.txt in a fresh venv. Method: PR head merged onto main 867d922, the PR's test files run with python -m pytest before and after the merge, plus python -m compileall -q on the changed files (clean).

  • tests/test_audio_stage_resume.py: 12 passed on main and with the PR.

AI-assisted (Claude Code, Claude Opus 5.5).

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.

3 participants