victory-gpu: a view of no resource is not looked up as an alias (null dereference that ends every run after the account screen) #2933
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2933
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@pes7 on GitHub · 2026-11-26 00:30 UTC · original
pes7:fix/null-alias-source→main· +5 −0 · 1 files · 1 commits · closed without mergingThe 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.The title binds a shader-visible descriptor whose resource is null, and a draw's table then asks `resource::alias_source` about it: the function went straight to `resource(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: #0 resource::alias_source::closure$1 resource.rs:1797 (read 0x30) #1 resource::alias_source resource.rs:1802 #2 draw::readable draw.rs:1897 #3 draw::State::table_entry draw.rs:1222 #4 draw::State::tables draw.rs:1263 #5 draw::State::bind draw.rs:644 #6 draw::State::execute_indirect draw.rs:1761 Its neighbours (`resource::host_resource`, `resource::host_copy`) already return `None` for a null handle; this is the one that did not. Found by running the title with `target\release\victory.pdb` and `llvm-symbolizer --relative-address` on the offsets the crash log prints. With the guard the fault is gone (the same run now ends in the known GPU device removal instead, not in the title's own handler). cargo build --release -p victory --features diagnostics.@kotekompotek on GitHub · 2026-11-26 00:33 UTC · original
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.)@fuzeofficlal on GitHub · 2026-11-26 00:41 UTC · original
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.@Marvisak on GitHub · 2026-11-26 01:14 UTC · original
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
@pes7 on GitHub · 2026-11-26 13:34 UTC · original
Superseded: main already has this guard (
219878a0,esource::alias_source), so a rebase leaves no diff. Closing.
Pull request closed