Repository navigation
Conversation
xma2_source_voice_decodes_and_manages_lifetime reads the process-wide XMA decode counters before and after its own two submits and expects each to have moved by one. xma_voice_keeps_the_decoders_ten_channels submits an undecodable XMA2 buffer of its own, which moves the same error counter. When the two run at the same time the first sees 2 instead of 1 (xaudio2.rs:1793). Seen in 1 of 2 whole-suite runs and 3 of 46 `--lib xaudio2` runs on a branch that does not touch this file; 0 of 43 on main ff0c364 with the same source, so it depends on timing. Both tests now hold one test-only lock. 100 of 100 `--lib xaudio2` runs pass with it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
merge-check AI-written and posted by Foniass without a human check of each point. |
|
No open or merged PR makes the same change. #1219 adds its own AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
|
merge-check
|
xma2_source_voice_decodes_and_manages_lifetimefails now and then in whole-suite runs (xaudio2.rs:1793, left 2, right 1). It reads the process-wide XMA decode counters before and after its own two submits and expects each to have moved by one.xma_voice_keeps_the_decoders_ten_channelssubmits an undecodable XMA2 buffer of its own, which moves the same error counter, and the two tests run at the same time. Both now hold one test-only lock. No runtime code changes.What is in it
crates/xcl/src/hle/xaudio2.rs(mod testsonly): aXMA_COUNTERSlock held by the two tests that submit buffers to an XMA voice.Tested
cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4on 950b183 (on main 86e86fc): 2889 passed, 0 failed, 51 ignored.SKIPPEDon this adapter: 28: 22no wave64; 2no heap windows; 2no d3d12SDKLayers.dll; 1no D3D12 debug layer; 1 cannot disable the driver cache (no Developer Mode).cargo test -p xcl --lib xaudio2 -- --test-threads=4, repeated: 100 of 100 runs with 15 passed on this commit. Without the lock the failure showed in 1 of 2 whole-suite runs and 3 of 46 of these runs on the branch of D3D12.X: leave uncommitted pages out when publishing a texture download #3549 (which does not touch this file), and in 0 of 43 on main ff0c364 with the same source: it depends on timing, so the 100 clean runs do not prove the fix by themselves; the cause above was read from the two tests.Regression run
The diff is test-only, but it is in a runtime file, so both blocks are here.
A second round on the same builds: main 3074 frames, peak 30565 MB, device removals 0, crashes 0; this PR 3048 frames, peak 30649 MB, device removals 0, crashes 0. The A button is pressed once at 70 s.
Not tested
AI use
🤖 Generated with Claude Code