fix(vk): the game no longer crashes where Streamline's plugins cannot resolve their folders in the sandbox #3131

Merged
HumanBean merged 5 commits from HumanBean/Longshot:fix/sl-folder-check into main 2026-12-03 23:52:18 +00:00
Owner

Summary

On at least one Windows PC (nightly-1045, RTX 4060), turning on DLSS Frame Generation made the game crash with 0xc0000005 at every start, since the setting is saved.

Each Streamline plugin, as it loads, calls std::filesystem::weakly_canonical on its own folder and on NVIDIA's models folder. On that PC the sandboxed game is refused (weakly_canonical: Access is denied.: "...\builds\default\"). The plugin swallows the error and reports success half set up, the plugin manager trips on the missing data, and the game faults. Since #3068 Streamline really starts in the sandbox, so this became reachable. It needs the sandbox on: since #3132 the sandbox is off by default, so on current main only a run with HOS_SANDBOX=1 or strict should be affected.

To see it on main: that PC, a Windows build with Streamline's files, HOS_SANDBOX=1 in the real environment, Frame generation at Fixed by DLSS FG, "DLSS FG through" at Streamline, then start the game. No other PC is known to show it.

This change stops the crash; it does not make Streamline work on that PC:

  • Before sl.interposer.dll is loaded, folder_resolves makes the same two calls on both folders (CreateFile2, then GetFinalPathNameByHandleW), and on a missing folder's parents, as weakly_canonical does. If Windows refuses one, the log names it with the error, Streamline is not loaded, and the run goes on as without it.
  • A refusal of a Streamline DLL (sl.*.dll) by the builder's file service is now logged. It was taken for the game's own module and left out.

Which of the two calls is refused is not known yet. The log line from that PC decides the fix for the cause, so this says "See", not "Fixes".

See #3109.

Read first: folder_resolves and dlssg_load in gpu/vk/vk_dlssg.cpp, asker in host/hos_file_windows.c.

Testing

Tested: nothing has run in the game. The change is Windows-only and the PC it was written on is Linux.

  • tests/test_dlssg_folders.py (new, g++ and clang++, stand-ins for the Windows calls): the check on a made-up tree of folders (refused parents of a missing folder, a 4000-character name), and dlssg_load's own lines from the check to the load (no load after a refusal). Fails on main (no check before the load), passes here.
  • tests/test_sandbox_refusals_wine.py (Wine, llvm-mingw): the new sl.test.dll case fails without the asker change, passes with it.
  • tests/test_builder_files_wine.py, tests/test_sandbox_program_data_wine.py, tests/test_dlssg.py, tests/test_doc_anchors.py: pass.
  • llvm-mingw -fsyntax-only -Wall -Wextra: gpu/vk/vk_dlssg.cpp (with Streamline's headers) and host/hos_file_windows.c: no errors. Not a game build.
  • mise run lint passes on the head. mise run test: 876 passed, 3 failed, 12 skipped, on an earlier head and base: not rerun since the rebase onto the current main or the review fixes (after them: test_dlssg_folders.py, test_dlssg.py, test_doc_anchors.py, test_sandbox_refusals_wine.py, test_builder_files_wine.py and the renderer's syntax check pass). The three failures come from files this PR doesn't change, and were not run on main:
    • test_utf8_paths.py: CP_ACP in note_load_ansi (host/hos_file_windows.c, the line is on main).
    • test_run_all_junit.py: its inner run fails.
    • test_lifter.py: rustfmt and clippy in builder/crates/build-core/src/addons.rs, and an ffi-gen test.

Still to test:

  • Windows, the RTX 4060 from #3109, HOS_SANDBOX=1, Streamline chosen: expect no crash, a vk: Streamline: ... (CreateFile2 or GetFinalPathNameByHandleW, error N) line, then not started, and DLSS FG through NGX (by hand, the reporter)
  • Windows, NVIDIA RTX 40 or 50 where Streamline works, HOS_SANDBOX=1 and again unset: expect Streamline started as on main, no refusal line. This is the main risk (by hand or Test Farm)
  • Linux: a start, expecting the same as main (Test Farm or by hand)

Measurements

Nothing to measure: two file-system calls per folder, once at the start, and only where Streamline would start.

Risks

  • A wrong refusal by the check would turn Streamline off on a PC where it works; DLSS FG then goes through NGX.
  • The check may pass on the affected PC (some other refused call) and the crash stay. Only the reporter's run settles that.
  • The models folder is taken from the ProgramData variable (Streamline asks SHGetKnownFolderPath; normally the same). Streamline's staging models folder (an NVIDIA registry setting) is not checked.
  • Revert is enough. Saves, settings and caches don't change. Workaround without this change: RX_VK_DLSSG=0, or on a build with #3132, the sandbox left off.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says. (No: Windows-only change, Linux PC)
  • mise run test passes (any failure that also fails on main is named). (Three failures, in files unchanged here; not rerun on main)
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Windows: syntax check only; the host C changed is Windows-only)
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary On at least one Windows PC (nightly-1045, RTX 4060), turning on DLSS Frame Generation made the game crash with `0xc0000005` at every start, since the setting is saved. Each Streamline plugin, as it loads, calls `std::filesystem::weakly_canonical` on its own folder and on NVIDIA's models folder. On that PC the sandboxed game is refused (`weakly_canonical: Access is denied.: "...\builds\default\"`). The plugin swallows the error and reports success half set up, the plugin manager trips on the missing data, and the game faults. Since #3068 Streamline really starts in the sandbox, so this became reachable. It needs the sandbox on: since #3132 the sandbox is off by default, so on current `main` only a run with `HOS_SANDBOX=1` or `strict` should be affected. To see it on `main`: that PC, a Windows build with Streamline's files, `HOS_SANDBOX=1` in the real environment, Frame generation at Fixed by DLSS FG, "DLSS FG through" at Streamline, then start the game. No other PC is known to show it. This change **stops the crash; it does not make Streamline work on that PC**: - Before `sl.interposer.dll` is loaded, `folder_resolves` makes the same two calls on both folders (`CreateFile2`, then `GetFinalPathNameByHandleW`), and on a missing folder's parents, as `weakly_canonical` does. If Windows refuses one, the log names it with the error, Streamline is not loaded, and the run goes on as without it. - A refusal of a Streamline DLL (`sl.*.dll`) by the builder's file service is now logged. It was taken for the game's own module and left out. Which of the two calls is refused is not known yet. The log line from that PC decides the fix for the cause, so this says "See", not "Fixes". See #3109. Read first: `folder_resolves` and `dlssg_load` in `gpu/vk/vk_dlssg.cpp`, `asker` in `host/hos_file_windows.c`. ## Testing **Tested:** **nothing has run in the game.** The change is Windows-only and the PC it was written on is Linux. - `tests/test_dlssg_folders.py` (new, g++ and clang++, stand-ins for the Windows calls): the check on a made-up tree of folders (refused parents of a missing folder, a 4000-character name), and `dlssg_load`'s own lines from the check to the load (no load after a refusal). Fails on `main` (no check before the load), passes here. - `tests/test_sandbox_refusals_wine.py` (Wine, llvm-mingw): the new `sl.test.dll` case fails without the `asker` change, passes with it. - `tests/test_builder_files_wine.py`, `tests/test_sandbox_program_data_wine.py`, `tests/test_dlssg.py`, `tests/test_doc_anchors.py`: pass. - llvm-mingw `-fsyntax-only -Wall -Wextra`: `gpu/vk/vk_dlssg.cpp` (with Streamline's headers) and `host/hos_file_windows.c`: no errors. Not a game build. - `mise run lint` passes on the head. `mise run test`: 876 passed, 3 failed, 12 skipped, on an earlier head and base: not rerun since the rebase onto the current `main` or the review fixes (after them: `test_dlssg_folders.py`, `test_dlssg.py`, `test_doc_anchors.py`, `test_sandbox_refusals_wine.py`, `test_builder_files_wine.py` and the renderer's syntax check pass). The three failures come from files this PR doesn't change, and were not run on `main`: - `test_utf8_paths.py`: `CP_ACP` in `note_load_ansi` (`host/hos_file_windows.c`, the line is on `main`). - `test_run_all_junit.py`: its inner run fails. - `test_lifter.py`: rustfmt and clippy in `builder/crates/build-core/src/addons.rs`, and an `ffi-gen` test. **Still to test:** - Windows, the RTX 4060 from #3109, `HOS_SANDBOX=1`, Streamline chosen: expect no crash, a `vk: Streamline: ... (CreateFile2 or GetFinalPathNameByHandleW, error N)` line, then `not started`, and DLSS FG through NGX (by hand, the reporter) - Windows, NVIDIA RTX 40 or 50 where Streamline works, `HOS_SANDBOX=1` and again unset: expect `Streamline started` as on `main`, no refusal line. **This is the main risk** (by hand or Test Farm) - Linux: a start, expecting the same as `main` (Test Farm or by hand) ## Measurements Nothing to measure: two file-system calls per folder, once at the start, and only where Streamline would start. ## Risks - A wrong refusal by the check would turn Streamline off on a PC where it works; DLSS FG then goes through NGX. - The check may pass on the affected PC (some other refused call) and the crash stay. Only the reporter's run settles that. - The models folder is taken from the `ProgramData` variable (Streamline asks `SHGetKnownFolderPath`; normally the same). Streamline's staging models folder (an NVIDIA registry setting) is not checked. - Revert is enough. Saves, settings and caches don't change. Workaround without this change: `RX_VK_DLSSG=0`, or on a build with #3132, the sandbox left off. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [ ] Tested on my own PC, in the game for a change the game runs, as Testing says. (No: Windows-only change, Linux PC) - [ ] `mise run test` passes (any failure that also fails on `main` is named). (Three failures, in files unchanged here; not rerun on `main`) - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Windows: syntax check only; the host C changed is Windows-only) - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Fails: dlssg_load loads sl.interposer.dll with no check (#3109).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Each plugin calls std::filesystem::weakly_canonical on its folder and NVIDIA's
models folder as it loads. Refused, it is left half loaded and the game faults at
every start (#3109). dlssg_load now makes the same two calls first, logs the one
refused with Windows' error, and leaves Streamline unloaded.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Fails: they are taken for the game's own modules.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
docs: Streamline's folder check and its refusals in the log
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
41982b409c
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Member

Possibly related, for context:

  • PR #3110 fix(sandbox): Windows add-ons: only a layer's DLL is opened to the game, added layers load, and false alarms leave the log — Overlapping Windows sandbox and Streamline layer handling; includes related refusal/access fixes
  • issue #3109 Game: DLSS Frame Generation causes crash on launch after enabling it — Reported launch crash when DLSS Frame Generation via Streamline is enabled; likely issue this addresses
  • PR #3068 fix(vk): DLSS Frame Generation through Streamline starts again, in the sandboxed game too — Merged Streamline sandbox startup support; context for this newly exposed failure
Possibly related, for context: - PR #3110 fix(sandbox): Windows add-ons: only a layer's DLL is opened to the game, added layers load, and false alarms leave the log — Overlapping Windows sandbox and Streamline layer handling; includes related refusal/access fixes - issue #3109 Game: DLSS Frame Generation causes crash on launch after enabling it — Reported launch crash when DLSS Frame Generation via Streamline is enabled; likely issue this addresses - PR #3068 fix(vk): DLSS Frame Generation through Streamline starts again, in the sandboxed game too — Merged Streamline sandbox startup support; context for this newly exposed failure
Author
Owner
@review
BeanBot left a comment

Recommendation: Request changes. The folder check can let Streamline load even when resolving an existing parent of a missing models folder would fail, leaving a crash path open. The new test also does not verify that a failed check prevents loading.

The change probes Streamline’s folders before loading it and logs sandbox refusals from its DLLs. It could avoid the reported startup crash, but the probe does not yet cover the parent-directory walk and its behavior has not been verified in the game.

Blocking (1): must change before merging.

  1. L1 gpu/vk/vk_dlssg.cpp:386: A missing folder is accepted without checking the existing parent that weakly_canonical will resolve. (more on the line) Do: Walk back to the first existing parent and check its final path, matching weakly_canonical’s handling of missing components; add a test for a missing leaf with an inaccessible parent.

Should fix (2): not blocking, but worth doing before merging.

  • L2 tests/test_dlssg_folders.py:111: The test checks for the probe’s text before LoadLibraryW but does not test that a failed probe stops the load. (more on the line) Do: Exercise the load decision with stand-ins and assert that neither refusal reaches LoadLibraryW, while successful checks do.
  • L3 gpu/vk/vk_dlssg.cpp:378: The fixed UTF-8 buffer can leave the folder name empty in the refusal log. (more on the line) Do: Size the UTF-8 string from WideCharToMultiByte’s required length and handle conversion failure explicitly.

Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)

  • L4 gpu/vk/vk_dlssg.cpp:450: The reported crash and the fallback remain unverified on the affected PC. (more on the line) Do: Reproduce on the reported Windows RTX 4060 with the sandbox and saved Streamline settings, then run this change and record the log and whether startup succeeds.
  • L5 gpu/vk/vk_dlssg.cpp:450: The probe’s effect on a working Streamline installation has not been checked in the game. (more on the line) Do: Run on a working Windows RTX 40 or 50 Streamline setup with the sandbox enabled and disabled, and record startup and frame-generation behavior.

@fix can do L1, L2 and L3.

Questions (1) (not confirmed from the code; they don't hold the recommendation)

  • Does Streamline obtain the models path from the same ProgramData environment value, including when that variable is absent or differs from the Windows known folder?

Checks: Still running: 11 checks.

More: does it help, other systems, switches, what was read

Does it help: Unproven. The PR reports game-free tests but no game run on either the affected PC or a working Streamline setup; the refused call on the affected PC is not yet known.

Other systems: The new probe runs only in Windows builds with Streamline selected and an NVIDIA adapter. It can disable Streamline on otherwise working systems; Linux’s renderer path is unchanged. The sandbox logging change affects Windows DLL refusals.

Switches: No switches added, changed or removed.

Reviewed: 41982b409c against ca5d307814: Read the repository rules, PR template, diff and commits, changed tests, and the relevant renderer and Windows file-hook code. Skimmed the changed reference documentation and surrounding call sites; the complete renderer and host files were not read in full. Tooling’s AGENTS.md was unavailable in the checkout.; nothing run (a code review).

Checked and fine:

  • The commit messages record AI assistance.
  • No game-derived files, generated outputs, API version changes or third-party changes appear in the diff.
  • The new folder probe closes its handle on the successful-open path.
  • The Streamline DLL refusal test exercises the changed asker classification.

Testing: No commands from the project were run, as requested. The PR reports game-free checks and syntax checks, but no in-game run; CI was still running.

Overlaps and merge order: PR #3132 changes the sandbox default and is reported merged after this branch’s base; the affected path must be tested with the sandbox explicitly enabled.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The folder check can let Streamline load even when resolving an existing parent of a missing models folder would fail, leaving a crash path open. The new test also does not verify that a failed check prevents loading. The change probes Streamline’s folders before loading it and logs sandbox refusals from its DLLs. It could avoid the reported startup crash, but the probe does not yet cover the parent-directory walk and its behavior has not been verified in the game. **Blocking (1)**: must change before merging. 1. **L1** `gpu/vk/vk_dlssg.cpp:386`: A missing folder is accepted without checking the existing parent that weakly_canonical will resolve. (more on the line) **Do:** Walk back to the first existing parent and check its final path, matching weakly_canonical’s handling of missing components; add a test for a missing leaf with an inaccessible parent. **Should fix (2)**: not blocking, but worth doing before merging. - **L2** `tests/test_dlssg_folders.py:111`: The test checks for the probe’s text before LoadLibraryW but does not test that a failed probe stops the load. (more on the line) **Do:** Exercise the load decision with stand-ins and assert that neither refusal reaches LoadLibraryW, while successful checks do. - **L3** `gpu/vk/vk_dlssg.cpp:378`: The fixed UTF-8 buffer can leave the folder name empty in the refusal log. (more on the line) **Do:** Size the UTF-8 string from WideCharToMultiByte’s required length and handle conversion failure explicitly. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L4** `gpu/vk/vk_dlssg.cpp:450`: The reported crash and the fallback remain unverified on the affected PC. (more on the line) **Do:** Reproduce on the reported Windows RTX 4060 with the sandbox and saved Streamline settings, then run this change and record the log and whether startup succeeds. - **L5** `gpu/vk/vk_dlssg.cpp:450`: The probe’s effect on a working Streamline installation has not been checked in the game. (more on the line) **Do:** Run on a working Windows RTX 40 or 50 Streamline setup with the sandbox enabled and disabled, and record startup and frame-generation behavior. `@fix` can do L1, L2 and L3. **Questions (1)** (not confirmed from the code; they don't hold the recommendation) - Does Streamline obtain the models path from the same ProgramData environment value, including when that variable is absent or differs from the Windows known folder? **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven. The PR reports game-free tests but no game run on either the affected PC or a working Streamline setup; the refused call on the affected PC is not yet known. **Other systems:** The new probe runs only in Windows builds with Streamline selected and an NVIDIA adapter. It can disable Streamline on otherwise working systems; Linux’s renderer path is unchanged. The sandbox logging change affects Windows DLL refusals. **Switches:** No switches added, changed or removed. **Reviewed:** 41982b409c03 against ca5d3078149a: Read the repository rules, PR template, diff and commits, changed tests, and the relevant renderer and Windows file-hook code. Skimmed the changed reference documentation and surrounding call sites; the complete renderer and host files were not read in full. Tooling’s AGENTS.md was unavailable in the checkout.; nothing run (a code review). **Checked and fine:** - The commit messages record AI assistance. - No game-derived files, generated outputs, API version changes or third-party changes appear in the diff. - The new folder probe closes its handle on the successful-open path. - The Streamline DLL refusal test exercises the changed asker classification. **Testing:** No commands from the project were run, as requested. The PR reports game-free checks and syntax checks, but no in-game run; CI was still running. **Overlaps and merge order:** PR #3132 changes the sandbox default and is reported merged after this branch’s base; the affected path must be tested with the sandbox explicitly enabled. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
@ -367,0 +375,4 @@
e == ERROR_BAD_PATHNAME || e == ERROR_DIRECTORY || e == ERROR_NETNAME_DELETED;
};
char name[3072] = ""; // (the log's strings are UTF-8)
WideCharToMultiByte(CP_UTF8, 0, folder, -1, name, (int)sizeof name - 1, nullptr, nullptr);
Member

L3 (should fix): The fixed UTF-8 buffer can leave the folder name empty in the refusal log.

When: For a supported long path whose UTF-8 encoding needs more than the buffer, WideCharToMultiByte fails and name remains empty, so the diagnostic does not identify the refused folder.

Do: Size the UTF-8 string from WideCharToMultiByte’s required length and handle conversion failure explicitly.

**L3** (should fix): The fixed UTF-8 buffer can leave the folder name empty in the refusal log. *When:* For a supported long path whose UTF-8 encoding needs more than the buffer, WideCharToMultiByte fails and name remains empty, so the diagnostic does not identify the refused folder. **Do:** Size the UTF-8 string from WideCharToMultiByte’s required length and handle conversion failure explicitly.
@ -367,0 +383,4 @@
OPEN_EXISTING, &x);
if (h == INVALID_HANDLE_VALUE) {
const DWORD e = GetLastError();
if (not_there(e)) return true;
Member

L1 (blocking): A missing folder is accepted without checking the existing parent that weakly_canonical will resolve.

When: If NVIDIA’s models folder does not exist but an existing parent cannot be canonicalized in the sandbox, the initial open returns a not-found error and this returns true. Streamline then walks to that parent and can encounter the same exception and crash this check is meant to prevent.

Do: Walk back to the first existing parent and check its final path, matching weakly_canonical’s handling of missing components; add a test for a missing leaf with an inaccessible parent.

**L1** (blocking): A missing folder is accepted without checking the existing parent that weakly_canonical will resolve. *When:* If NVIDIA’s models folder does not exist but an existing parent cannot be canonicalized in the sandbox, the initial open returns a not-found error and this returns true. Streamline then walks to that parent and can encounter the same exception and crash this check is meant to prevent. **Do:** Walk back to the first existing parent and check its final path, matching weakly_canonical’s handling of missing components; add a test for a missing leaf with an inaccessible parent.
@ -414,0 +447,4 @@
// (what each plugin resolves as it loads, asked first: a refusal inside one takes the game down (folder_resolves))
const wchar_t* const program_data = _wgetenv(L"ProgramData");
const std::wstring models = program_data ? std::wstring(program_data) + L"\\NVIDIA\\NGX\\models" : std::wstring();
if (!folder_resolves(s.dir.c_str()) || (!models.empty() && !folder_resolves(models.c_str()))) {
Member

L4 (should fix): The reported crash and the fallback remain unverified on the affected PC.

When: If the refusal occurs in a call or folder the probe does not reproduce, the probe passes and Streamline still crashes at startup.

Do: Reproduce on the reported Windows RTX 4060 with the sandbox and saved Streamline settings, then run this change and record the log and whether startup succeeds.

**L4** (should fix): The reported crash and the fallback remain unverified on the affected PC. *When:* If the refusal occurs in a call or folder the probe does not reproduce, the probe passes and Streamline still crashes at startup. **Do:** Reproduce on the reported Windows RTX 4060 with the sandbox and saved Streamline settings, then run this change and record the log and whether startup succeeds.
Member

L5 (should fix): The probe’s effect on a working Streamline installation has not been checked in the game.

When: A refusal from the new probe disables Streamline for the entire run, including on a system where the plugin would otherwise start.

Do: Run on a working Windows RTX 40 or 50 Streamline setup with the sandbox enabled and disabled, and record startup and frame-generation behavior.

**L5** (should fix): The probe’s effect on a working Streamline installation has not been checked in the game. *When:* A refusal from the new probe disables Streamline for the entire run, including on a system where the plugin would otherwise start. **Do:** Run on a working Windows RTX 40 or 50 Streamline setup with the sandbox enabled and disabled, and record startup and frame-generation behavior.
@ -0,0 +108,4 @@
a = ap.parse_args()
source = (ROOT / "gpu" / "vk" / "vk_dlssg.cpp").read_text(encoding="utf-8")
load = block(source, "PFN_vkGetInstanceProcAddr dlssg_load() {\n State& s = st();")
at = [load.find(m) for m in ("!folder_resolves(s.dir.c_str())", "LoadLibraryW(path.c_str())")]
Member

L2 (should fix): The test checks for the probe’s text before LoadLibraryW but does not test that a failed probe stops the load.

When: Removing the return from the refusal branch leaves both searched strings in the same order, and the extracted folder_resolves tests still pass, although the game loads Streamline after a refusal.

Do: Exercise the load decision with stand-ins and assert that neither refusal reaches LoadLibraryW, while successful checks do.

**L2** (should fix): The test checks for the probe’s text before LoadLibraryW but does not test that a failed probe stops the load. *When:* Removing the return from the refusal branch leaves both searched strings in the same order, and the extracted folder_resolves tests still pass, although the game loads Streamline after a refusal. **Do:** Exercise the load decision with stand-ins and assert that neither refusal reaches LoadLibraryW, while successful checks do.
HumanBean force-pushed fix/sl-folder-check from 41982b409c
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 6d2741262f
Some checks failed
CI / What the change needs (pull_request) Successful in 8s
CI / Third-party parts and guide screenshots (pull_request) Successful in 12s
PR description / Title and description (pull_request_target) Failing after 6s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 19s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 1m24s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 13m11s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 16m53s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 14m45s
CI / Website build and checks (pull_request) Failing after 1m9s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 13m53s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 52m59s
2026-12-03 23:47:19 +00:00
Compare
Author
Owner

BeanBot's review, fixed in 6d2741262f (rebased onto current main):

  • L1 (missing folder, refused parent): a folder that is not there now has each prefix resolved from the first below the root, up to the first that is not there, as weakly_canonical does. Tested with a refused open and a refused final path on a parent.
  • L2 (a refusal must stop the load): the test now compiles dlssg_load's own lines from the check to LoadLibraryW and asserts that neither refusal reaches it.
  • L3 (long names): the UTF-8 name is sized from WideCharToMultiByte, and now comes last in the line, since a log line is cut at 1024 bytes. The call and the error stay.
  • L4, L5 (in game): still open. Nothing has run in the game; see "Still to test".
  • Question (models path): Streamline asks SHGetKnownFolderPath(FOLDERID_ProgramData) (sl.ota/ota.cpp); this reads the ProgramData variable, normally the same. Not changed. Streamline's staging folder, chosen by an NVIDIA registry setting, is not checked. Both are in Risks.
BeanBot's review, fixed in 6d2741262f69 (rebased onto current `main`): - **L1** (missing folder, refused parent): a folder that is not there now has each prefix resolved from the first below the root, up to the first that is not there, as `weakly_canonical` does. Tested with a refused open and a refused final path on a parent. - **L2** (a refusal must stop the load): the test now compiles `dlssg_load`'s own lines from the check to `LoadLibraryW` and asserts that neither refusal reaches it. - **L3** (long names): the UTF-8 name is sized from `WideCharToMultiByte`, and now comes last in the line, since a log line is cut at 1024 bytes. The call and the error stay. - **L4, L5** (in game): still open. Nothing has run in the game; see "Still to test". - **Question** (models path): Streamline asks `SHGetKnownFolderPath(FOLDERID_ProgramData)` (`sl.ota/ota.cpp`); this reads the `ProgramData` variable, normally the same. Not changed. Streamline's staging folder, chosen by an NVIDIA registry setting, is not checked. Both are in Risks.
Author
Owner
@review
HumanBean changed title from WIP: fix(vk): the game no longer crashes where Streamline's plugins cannot resolve their folders in the sandbox to fix(vk): the game no longer crashes where Streamline's plugins cannot resolve their folders in the sandbox 2026-12-03 23:48:33 +00:00
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The probe and its fallback have not yet been verified in the game on either the affected PC or a working Streamline installation. The recorded game-free checks support the implementation, but do not establish that it prevents the reported crash. Recommend approval; not approved on the forge.

Before loading Streamline, the change probes its plugin and models folders and falls back to NGX if resolution is refused. It also logs refusals from Streamline DLLs; the cost is extra startup file operations and a risk of disabling Streamline where it would otherwise work.

Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)

  • L4 gpu/vk/vk_dlssg.cpp:450: The reported crash and the fallback remain unverified on the affected PC. When: If the refusal occurs in a call or folder the probe does not reproduce, the probe passes and Streamline still crashes at startup. Do: Reproduce on the reported Windows RTX 4060 with the sandbox and saved Streamline settings, then run this change and record the log and whether startup succeeds.
  • L5 gpu/vk/vk_dlssg.cpp:450: The probe’s effect on a working Streamline installation has not been checked in the game. When: A refusal from the new probe disables Streamline for the entire run, including on a system where the plugin would otherwise start. Do: Run on a working Windows RTX 40 or 50 Streamline setup with the sandbox enabled and disabled, and record startup and frame-generation behavior.

Since the last review (on 41982b409c)
Resolved: L1 (A missing folder is accepted without checking the existing parent that weakly_canonical wi…); L2 (The test checks for the probe’s text before LoadLibraryW but does not test that a failed p…); L3 (The fixed UTF-8 buffer can leave the folder name empty in the refusal log.)
Still open: L4 (The reported crash and the fallback remain unverified on the affected PC.); L5 (The probe’s effect on a working Streamline installation has not been checked in the game.)

Checks: Still running: 11 checks.

Also noticed (2; not asked for, not blocking)
  • The models probe uses ProgramData, which can differ from the known-folder path Streamline obtains.
  • The full test suite was not rerun on the current head or compared with the current base, and CI is still running.
More: does it help, other systems, switches, what was read

Does it help: Unproven: no game run has confirmed that the probe catches the reported refusal or that the fallback prevents the crash. The description reports passing game-free stand-in tests, but no in-game results.

Other systems: The probe runs only in the Windows Streamline build and can affect working NVIDIA installations by preventing Streamline from starting. Linux does not execute it; the host logging change affects Windows sandbox refusal reporting. Neither platform has a recorded in-game run for this change.

Switches: None added, changed or removed.

Reviewed: 6d2741262f against 067e83629b: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the full diff, the new folder test and the changed code around the probe and sandbox logging. The full output of the renderer and host files was truncated; the remaining code, referenced standards and existing Wine test were not read in full. Recorded test claims were skimmed.; nothing run (a code review).

Checked and fine:

  • The refusal path returns before loading sl.interposer.dll.
  • The folder probe closes successfully opened handles.
  • The recorded test covers both open and final-path refusals on a missing folder's parent.

Testing: No commands that build or run the project were executed. The pull request reports passing game-free tests and Windows syntax checks; affected-PC and working-Streamline game runs remain outstanding.

Overlaps and merge order: Not checked; network access is closed.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left. The probe and its fallback have not yet been verified in the game on either the affected PC or a working Streamline installation. The recorded game-free checks support the implementation, but do not establish that it prevents the reported crash. Recommend approval; not approved on the forge. Before loading Streamline, the change probes its plugin and models folders and falls back to NGX if resolution is refused. It also logs refusals from Streamline DLLs; the cost is extra startup file operations and a risk of disabling Streamline where it would otherwise work. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L4** `gpu/vk/vk_dlssg.cpp:450`: The reported crash and the fallback remain unverified on the affected PC. *When:* If the refusal occurs in a call or folder the probe does not reproduce, the probe passes and Streamline still crashes at startup. **Do:** Reproduce on the reported Windows RTX 4060 with the sandbox and saved Streamline settings, then run this change and record the log and whether startup succeeds. - **L5** `gpu/vk/vk_dlssg.cpp:450`: The probe’s effect on a working Streamline installation has not been checked in the game. *When:* A refusal from the new probe disables Streamline for the entire run, including on a system where the plugin would otherwise start. **Do:** Run on a working Windows RTX 40 or 50 Streamline setup with the sandbox enabled and disabled, and record startup and frame-generation behavior. **Since the last review** (on 41982b409c03) Resolved: L1 (A missing folder is accepted without checking the existing parent that weakly_canonical wi…); L2 (The test checks for the probe’s text before LoadLibraryW but does not test that a failed p…); L3 (The fixed UTF-8 buffer can leave the folder name empty in the refusal log.) Still open: L4 (The reported crash and the fallback remain unverified on the affected PC.); L5 (The probe’s effect on a working Streamline installation has not been checked in the game.) **Checks:** Still running: 11 checks. <details> <summary>Also noticed (2; not asked for, not blocking)</summary> - The models probe uses ProgramData, which can differ from the known-folder path Streamline obtains. - The full test suite was not rerun on the current head or compared with the current base, and CI is still running. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven: no game run has confirmed that the probe catches the reported refusal or that the fallback prevents the crash. The description reports passing game-free stand-in tests, but no in-game results. **Other systems:** The probe runs only in the Windows Streamline build and can affect working NVIDIA installations by preventing Streamline from starting. Linux does not execute it; the host logging change affects Windows sandbox refusal reporting. Neither platform has a recorded in-game run for this change. **Switches:** None added, changed or removed. **Reviewed:** 6d2741262f69 against 067e83629bf6: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the full diff, the new folder test and the changed code around the probe and sandbox logging. The full output of the renderer and host files was truncated; the remaining code, referenced standards and existing Wine test were not read in full. Recorded test claims were skimmed.; nothing run (a code review). **Checked and fine:** - The refusal path returns before loading sl.interposer.dll. - The folder probe closes successfully opened handles. - The recorded test covers both open and final-path refusals on a missing folder's parent. **Testing:** No commands that build or run the project were executed. The pull request reports passing game-free tests and Windows syntax checks; affected-PC and working-Streamline game runs remain outstanding. **Overlaps and merge order:** Not checked; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The folder probe and fallback have not yet been verified on the affected PC, and a working Streamline installation has not been checked for false refusals. Recommend approval; not approved on the forge.

The change checks Streamline’s plugin and model folders before loading it, falls back when access is refused, and logs refusals from Streamline DLLs. It adds a small startup check and may disable Streamline where the probe incorrectly reports a refusal.

Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)

  • L4 gpu/vk/vk_dlssg.cpp:450: The reported crash and the fallback remain unverified on the affected PC. When: If the refusal occurs in a call or folder the probe does not reproduce, the probe passes and Streamline still crashes at startup. Do: Reproduce on the reported Windows RTX 4060 with the sandbox and saved Streamline settings, then run this change and record the log and whether startup succeeds.
  • L5 gpu/vk/vk_dlssg.cpp:450: The probe’s effect on a working Streamline installation has not been checked in the game. When: A refusal from the new probe disables Streamline for the entire run, including on a system where the plugin would otherwise start. Do: Run on a working Windows RTX 40 or 50 Streamline setup with the sandbox enabled and disabled, and record startup and frame-generation behavior.

Since the last review (on 6d2741262f)
Still open: L4 (The reported crash and the fallback remain unverified on the affected PC.); L5 (The probe’s effect on a working Streamline installation has not been checked in the game.)

Checks: Still running: 11 checks.

Also noticed (4; not asked for, not blocking)
  • The models probe uses ProgramData, which can differ from the known-folder path Streamline obtains.
  • The full test suite was not rerun on the current head or compared with the current base, and CI is still running.
  • The PR also lists a Linux startup check and tier-one hardware testing as outstanding.
  • CI checks are still running, and the reported full test run predates this head.
More: does it help, other systems, switches, what was read

Does it help: Unproven: the reported crash and fallback have not been tested in the game on the affected PC. The reported game-free tests use stand-ins and Wine.

Other systems: The probe runs on Windows when Streamline would start; a false refusal can route DLSS frame generation through NGX. Linux excludes the Streamline implementation. A working NVIDIA installation and the affected sandboxed PC still need game runs.

Switches: None added, changed or removed.

Reviewed: 6d2741262f against 067e83629b: Read the repository rules, PR template, commits and diff; inspected the folder probe, load path, refusal logging and test changes. The large changed code and reference files were only partly visible in the captured output. Tooling’s AGENTS.md was unavailable; docs/review-checklist.md does not exist.; nothing run (a code review).

Checked and fine:

  • The probe returns before LoadLibraryW when either checked folder is refused.
  • The reported stand-in tests cover refused opens and final-path calls, missing parents, long names and stopping the load.

Testing: No commands that build or run project code were executed. The author reports game-free checks and Windows syntax checks passing; no game run has been reported.

Overlaps and merge order: none found


Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as HumanBean took it out of WIP. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left. The folder probe and fallback have not yet been verified on the affected PC, and a working Streamline installation has not been checked for false refusals. Recommend approval; not approved on the forge. The change checks Streamline’s plugin and model folders before loading it, falls back when access is refused, and logs refusals from Streamline DLLs. It adds a small startup check and may disable Streamline where the probe incorrectly reports a refusal. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L4** `gpu/vk/vk_dlssg.cpp:450`: The reported crash and the fallback remain unverified on the affected PC. *When:* If the refusal occurs in a call or folder the probe does not reproduce, the probe passes and Streamline still crashes at startup. **Do:** Reproduce on the reported Windows RTX 4060 with the sandbox and saved Streamline settings, then run this change and record the log and whether startup succeeds. - **L5** `gpu/vk/vk_dlssg.cpp:450`: The probe’s effect on a working Streamline installation has not been checked in the game. *When:* A refusal from the new probe disables Streamline for the entire run, including on a system where the plugin would otherwise start. **Do:** Run on a working Windows RTX 40 or 50 Streamline setup with the sandbox enabled and disabled, and record startup and frame-generation behavior. **Since the last review** (on 6d2741262f69) Still open: L4 (The reported crash and the fallback remain unverified on the affected PC.); L5 (The probe’s effect on a working Streamline installation has not been checked in the game.) **Checks:** Still running: 11 checks. <details> <summary>Also noticed (4; not asked for, not blocking)</summary> - The models probe uses ProgramData, which can differ from the known-folder path Streamline obtains. - The full test suite was not rerun on the current head or compared with the current base, and CI is still running. - The PR also lists a Linux startup check and tier-one hardware testing as outstanding. - CI checks are still running, and the reported full test run predates this head. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven: the reported crash and fallback have not been tested in the game on the affected PC. The reported game-free tests use stand-ins and Wine. **Other systems:** The probe runs on Windows when Streamline would start; a false refusal can route DLSS frame generation through NGX. Linux excludes the Streamline implementation. A working NVIDIA installation and the affected sandboxed PC still need game runs. **Switches:** None added, changed or removed. **Reviewed:** 6d2741262f69 against 067e83629bf6: Read the repository rules, PR template, commits and diff; inspected the folder probe, load path, refusal logging and test changes. The large changed code and reference files were only partly visible in the captured output. Tooling’s AGENTS.md was unavailable; docs/review-checklist.md does not exist.; nothing run (a code review). **Checked and fine:** - The probe returns before LoadLibraryW when either checked folder is refused. - The reported stand-in tests cover refused opens and final-path calls, missing parents, long names and stopping the load. **Testing:** No commands that build or run project code were executed. The author reports game-free checks and Windows syntax checks passing; no game run has been reported. **Overlaps and merge order:** none found </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as HumanBean took it out of WIP. Nothing was run; a maintainer decides.</sub>
HumanBean deleted branch fix/sl-folder-check 2026-12-03 23:52:19 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!3131
No description provided.