Native Windows (MSVC) unit test failures on main: views_die_with_their_resource access violation, WARP compute pipeline rejected #357
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem#357
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Kal0s-design on GitHub · 2026-12-03 19:32 UTC · original
While checking a few PRs I ran the unit tests of victory-shader and victory-gpu natively on Windows 11 (x86_64-pc-windows-msvc built with MSVC, not Wine, toolchain 1.98.1) at main
00aa4d3. Hardware D3D12 is one NVIDIA desktop card, plus WARP. Some tests fail there on main with no PR applied. I don't know how much native Windows matters for you since the project targets Wine, so this is mostly a heads-up in case these hide real bugs.victory-gpu,
cargo test -p victory-gpu --lib -- --test-threads=4descriptor::tests::views_die_with_their_resourcekills the whole test binary with exit code 0xc0000005 (STATUS_ACCESS_VIOLATION), even with--test-threads=1, so the rest of the suite only runs with--skip descriptor::tests::views_die_with_their_resource. With that skip it's 338 passed, 5 failed, 23 ignored.indirect::tests::host_list_reuses_and_grows_scratch_across_submissionspanics at indirect.rs:2833, "a clamp leaves the scratch readable as arguments", leftD3D12_RESOURCE_STATES(0), rightD3D12_RESOURCE_STATES(512)indirect::tests::host_list_window_executions_need_no_barrier_of_their_ownsame assertion at indirect.rs:3255, 0 vs 512pipeline::host::tests::a_mesh_pipeline_loads_from_the_librarypanics at pipeline/host.rs:1421, "the mesh pipeline was compiled again instead of loaded from the library"pipeline::host::tests::depth_bounds_pipeline_loads_and_filters_drawspanics at pipeline/host.rs:1561, "the depth-bounds pipeline was compiled again instead of loaded from the library"watch::tests::the_rest_of_the_one_asking_has_a_number_of_its_ownpanics at watch.rs:3608 with "watched". This one is flaky, it failed in 4 of 5 full-suite runs but passed 10 of 10 when run alone, so it looks like it shares state with another watch test.The two pipeline library ones may just be how the NVIDIA driver handles pipeline libraries (it can decline to load a stored PSO and the test treats a recompile as failure). I haven't dug into that.
victory-shader,
cargo test -p victory-shader --lib -- --test-threads=4414 passed, 1 failed, 4 ignored. The failing one is
emit::size_tests::a_reused_descriptor_register_read_only_behind_its_flag, which panics at emit/waterfall_tests.rs:128 with "warp: compute_pipeline failed: The parameter is incorrect." It's the same alone and in the full run, so WARP rejects that compute pipeline outright.Related, in PR #344 the new
a_wave32_pixel_lane_number_stays_below_32also fails on WARP because WARP runs 4-lane waves. I left a note there.Happy to run anything specific on this setup if it helps.
AI-assisted: yes
@Kal0s-design on GitHub · 2026-12-03 19:39 UTC · original
A bit more on the flaky watch one,
watch::tests::the_rest_of_the_one_asking_has_a_number_of_its_own. It passes alone every time, but run in the same process right afterbits_go_at_every_view(--test-threads=1) it fails 3 out of 3, and a few other view tests trigger it the same way. With a temporary print I saw a staleVIEWSbit left on an address thatVirtualAllocthen hands out again to the next test, sorefused_as_viewis true andwrites()returns None even thoughGetWriteWatchitself answered. So it looks like test isolation rather than a watch bug, at least on native Windows where the allocator reuses that address. Wine may not reuse it the same way.AI-assisted: yes
@Kal0s-design on GitHub · 2026-12-03 20:40 UTC · original
One more set, this time in victory-hle. At
00aa4d3cargo test -p victory-hle --libgives 157 passed, 3 failed, 1 ignored on native Windows. Same result alone, together and with--test-threads=1, three runs each, so it's deterministic and not an ordering problem.gameinput::tests::keys_feed_the_keyboard_and_the_stand_in_padpanics at gameinput.rs:2489, the stand-in pad comes back all zero instead ofbuttons: 4, left_y: 1.0, right_x: 1.0, right_trigger: 1.0gameinput::tests::a_host_pad_feeds_the_one_pad_which_never_goespanics at gameinput.rs:2555,left_xis 0.0 instead of 1.0gameinput::tests::pc_kbm_maps_pc_style_keys_and_smooths_mouse_lookpanics at gameinput.rs:2747, buttons 0 instead of 8192 (RIGHT_STICK)I think the cause is the native input default and not anything Windows specific in the input stack.
mouse::native_input()(gameinput/mouse.rs:40) is on unlessVICTORY_NATIVE_INPUT=0, and with it on the#[cfg(windows)]branch ofState::poll(gameinput.rs:932 onwards) builds the stand-in pad frommouse::read_native()andkeyboard_events::held_axes(). The fake source's keys and mouse pad are never used for it. In a test there's no capture window and nothing held, so the stand-in is all zero, which is exactly what the three asserts see. The keyboard reading itself is fine, the count and key checks before line 2489 pass.With
VICTORY_NATIVE_INPUT=0the whole lib suite passes here, 160 passed, 0 failed, 1 ignored.Since
cfg(windows)is about the target and not the host, I'd expect the same three to fail when the msvc build runs under Wine unless that variable is set. I haven't run it under Wine myself, but the description of #179 mentions running the fake-source tests withVICTORY_NATIVE_INPUT=0 VICTORY_PC_CONTROLS=0 VICTORY_KBM_PC=0for this same reason. So it looks like the tests fell behind the default rather than a bug in the input code. Maybe the hub could take the native-input choice as a parameter so these tests can turn it off without touching the environment, but that's your call.AI-assisted: yes
@Kal0s-design on GitHub · 2026-12-04 02:35 UTC · original
Found the cause of the victory-shader failure listed above. With
VICTORY_D3D12_DEBUG=1the error fromemit::size_tests::a_reused_descriptor_register_read_only_behind_its_flagreads "ID3D12Device::CreateComputeShader: Shader wants wave lane count of 32 but maximum wave lane count for device is 4". So it's the same thing as the #344 note, WARP runs 4-lane waves and the test's compute shader asks for wave 32. Not a translator bug, the test just can't run on WARP as written.AI-assisted: yes
@tommiehansen on GitHub · 2026-12-05 13:32 UTC · original · edited 2026-12-05 13:41 UTC
Thanks for the detailed testing! #558, #559 and #566 address the resource crash, flaky watch tests and indirect buffer tests. I've now reproduced all three GameInput failures on Windows and #592 passes 13/13 tests with both input settings. All four PRs are still open, not merged. The remaining failures need separate verification.
@tommiehansen on GitHub · 2026-12-05 17:39 UTC · original
Quick update: #592 has now been merged into main. The three GameInput tests passed on Windows after the fix.