victory-gpu: a view of no resource is not looked up as an alias (null dereference that ends every run after the account screen) #2931
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2933"
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?
Imported from Marvisak/VIctory. Originally posted by pes7 on 2026-11-26T00:30:49Z.
The title binds a shader-visible descriptor whose resource is null, and a draw's table then asks
resource::alias_sourceabout it. The function went straight toresource(placed)and read the description of the null one: an access violation at 0x30 (null plus the field's offset), which took the whole run down about a minute after the title leaves the account screen, every time. Symbolised from the crash log's offsets againstvictory.pdb:The registers agree (
rax 0x0). Its neighbours already do this —resource::host_resourceandresource::host_copyreturnNonefor a null handle — this is the one that did not.With the guard the fault is gone: the same run now ends in the known GPU device removal instead of the title's own crash handler, which is where the next piece of work is.
Found by building
--features diagnostics(which keeps debug info in the release profile), running the title, and resolving the offsets the crash log prints withllvm-symbolizer --relative-address --obj=target/release/victory.exe.cargo test --release -p victory-gpu: 195 pass.Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-26T00:33:05Z.
Heads-up: this guard already landed on main —
alias_sourceatresource.rs:1790now readsfrom the earlier merge of the same fix for issue #2847's crash class ("GPU: a null shader view has no alias source",
219878a). This PR is functionally identical to what's already in — rebase would leave it empty. Issue #2852 reported the same signature and was pointed at a main retest for the same reason.(Matching independently: the call site
draw.rschecks*b != 0for its own read, so thisalias_sourceguard is the only place a null view was still dereferenced — the fix is complete there.)Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T00:41:25Z.
Heads-up from checking head
eca1d364a223against currentmain(63bcca43c6a0):crates/victory-gpu/src/resource.rscurrently conflicts withmain, because commit219878a0e775(GPU: a null shader view has no alias source) already landed the sameif placed.is_null() { return None; }guard inalias_sourcealong with the unit testresource::tests::a_null_view_has_no_alias_source.main:alias_sourceis only called fromdraw.rsView::Shader(placed_texture/readable),host_resource/made_copy/host_copyalready returnNonefor nullthis, andView::Unordereddoes not go throughalias_source.eca1d364a223itself passescargo xtask policy(184 files ok),clippy(default +--features diagnostics, 0 warnings), andresource::tests draw::tests28/28 on both RTX 5090 and WARP (VICTORY_D3D12_DEBUG=1).Since
219878a0e775already covers this exact guard onmain, this PR looks safe to close as superseded.Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T01:14:37Z.
Automated triage for the maintainers.
Needs rebase. This pull request conflicts with
main(conflicting:crates/victory-gpu/src/resource.rs). It will be reviewed once it is rebased onto the currentmain.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by pes7 on 2026-11-26T13:34:46Z.
Superseded: main already has this guard (
219878a0,esource::alias_source), so a rebase leaves no diff. Closing.
Pull request closed