Skip to content

fix(ngs2): return native voice-index error for Dark Forces - #4788

Closed
PrintOrb wants to merge 1 commit into
boykopovar:mainfrom
PrintOrb:fix/ngs2-native-voice-index
Closed

PrintOrb wants to merge 1 commit into
boykopovar:mainfrom
PrintOrb:fix/ngs2-native-voice-index

Conversation

@PrintOrb

Copy link
Copy Markdown
Contributor

What

STAR WARS: Dark Forces Remaster (PPSA19728 02.000.000) terminates during startup with sceNgs2RackGetVoiceHandle: invalid argument. The title creates a one-voice reverb rack, obtains index 0 and requests index 1. Return the native bounds error 0x804A8305 without changing the output handle rather than throwing. The value and no-output-write path follow prosper's pinned native-module analysis linked in the debt note; no independent PS5 probe performed here.

Tested

Native Windows, Release build, based on main 529f7bfd4. Full libs build passes. The new ngs2_voiceindex regression aborts with current main's Rack.cpp and passes after restoring the fix. Existing ngs2_render and ngs2_stream also pass (3/3). Conventions, test registration and whitespace checks pass. Newer main ee4962190 was checked before publication: neither affected library changed, and the branch merges cleanly; the build/test results above are for the stated tested base.

Earlier title testing with this fix passed the reported stop and exposed a separate SDL audio initialization race. With both fixes, manual testing completed the first mission; Tab/PDA performance problems remain. Gameplay was not repeated on the refreshed main build.

Checklist

@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed build docs prx labels Oct 12, 2026
@PrintOrb
PrintOrb force-pushed the fix/ngs2-native-voice-index branch from a9fe4ac to 23b0124 Compare October 13, 2026 03:51
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 13, 2026
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 13, 2026
@PrintOrb
PrintOrb force-pushed the fix/ngs2-native-voice-index branch from 23b0124 to 62978cd Compare October 13, 2026 22:53
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 13, 2026
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#5470 docs/dev/debt/libSceNgs2.native.md L27
#5548 docs/dev/debt/libSceNgs2.native.md L27

@johnohhh1

Copy link
Copy Markdown
Contributor

Independent Linux validation of 62978cda4cde7f6171cfceacf8668a8e8838754c, applied alone to main 959d39fb2b050fa76beed0b49b4c2f13a119ab5a.

Ubuntu 26.04.1 x86-64, GCC 15.2.0, Release, bundled dependencies, testing and SPIR-V Tools enabled.

  • Full baseline and patched builds pass. All 12 selected NGS2/patched-library suites pass on the candidate without skips, including ngs2_voiceindex; serial CTest with a 30-second maximum.
  • The identical candidate ngs2_voiceindex_tests executable aborts against frozen baseline libraries with sceNgs2RackGetVoiceHandle: invalid argument, and passes against the patched libraries.
  • A supplemental probe passes 24 configurations: sampler, submixer, reverb and mastering racks with 1, 2, 3, 17, 255 and 256 voices. It checks 2,136 valid indices and 432 invalid-index/output-sentinel combinations, guarded outputs, stable valid handles after errors, preserved null-output/invalid-rack behavior, and 1,024 concurrent valid/invalid lookup pairs across eight threads. All 10,544 probe assertions pass. The same probe aborts against baseline libraries at an invalid index.
  • Conventions and whitespace checks pass; the local change matches the original stable patch ID and retains its author.

These are synthetic Linux checks of the implementation and its documented bounds-error contract. No title or native PS5 was run, and this does not independently establish the console's error code or the unchanged validation-order semantics. No additional Windows run. SDL_AUDIODRIVER=dummy was set only in child test processes.

AI-assisted validation/report: Codex. Original implementation and authorship preserved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants