ngs2: degrade custom user-FX modules instead of aborting #1684
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1684
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1684/head"
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?
@theantipopau on GitHub · 2026-10-19 01:55 UTC · original
theantipopau:ngs2-custom-module-fallbacks→main· +168 −9 · 2 files · 3 commits · closed without mergingSequel to #1683: with creation tolerated, the next custom-module aborts (failed FX setup, buffer-routed or handler-less modules, failed processing, unhandled/mismatched controls, failed cleanup) would each still kill the title. Convert them to warn-and-skip-module semantics — a failing module stays skipped and its voice plays through unprocessed; teardown always succeeds. Adds TestCustomModuleFallbacks (setup-failure skip, routing skip with sample passthrough, ignored mismatched control, warn-once process failure) to ngs2_sampler_tests.
@coderabbitai[bot] on GitHub · 2026-10-19 01:58 UTC · original · edited 2026-10-19 02:30 UTC
📝 Walkthrough
Custom-module setup and cleanup failures no longer abort rack operations. Rendering bypasses skipped modules and skips modules with buffer routing or no process handler. A failed process call marks the module skipped. Unhandled controls and parameter-size mismatches are ignored. Tests cover these failure paths and continued rendering after a process failure.
Suggested reviewers:
nmzikPriority: ➖ Normal
Change: Bug fix
Merge Risk: 🔵 Low · up to
8e0a6A failing custom effect can cause an audible glitch instead of cleanly passing audio through. Restore the original samples on failure before merging, or explicitly accept this bounded risk.
Pre-merge checks:
4 ·
1
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.@ -1440,0 +1447,4 @@// Teardown must not fail; the rack is being destroyed anyway.Log::WriteToConsoleAndLog(fmt::sprintf("warning: NGS2 user-FX cleanup failed for module %zu\n", m));}@coderabbitai[bot] on GitHub · 2026-10-19 01:58 UTC · original · edited 2026-10-19 02:21 UTC
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 4693
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 12609
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 4743
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 3081
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 6288
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 2019
Use
Log::WriteToConsoleAndLogfor the cleanup warning.LOGFis not compiled out in release builds, but it callsLog::Writeand can suppress output whenLog::IsSilent()is true.Log::WriteToConsoleAndLogalso writes to stdout and matches the surrounding custom-module warnings.Do not add a
module.skippedguard without a defined cleanup contract. The current test covers failed setup with a cleanup callback, and the source does not establish that cleanup is unsafe after setup failure.Suggested fix
📝 Committable suggestion
✅ Addressed in commit
7f40fa8@coderabbitai[bot] on GitHub · 2026-10-19 01:58 UTC · original · reviewed
Actionable comments posted: 1
🧹 Nitpick comments: 1
ℹ️ Review info
⚙️ Run configuration
3a301f49-7cf4-42d5-ad41-7ac999470a38📥 Commits
Reviewing files that changed from the base of the PR and between
099de8dea6and9590800b20.📒 Files selected for processing: 2
src/libs/ngs2.cpptests/Ngs2SamplerTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.
@coderabbitai[bot] on GitHub · 2026-10-19 02:26 UTC · original · reviewed
ℹ️ Review info
⚙️ Run configuration
1e8efc67-dbb2-4f04-b8d7-5c73f13dd5f6📥 Commits
Reviewing files that changed from the base of the PR and between
9590800b20and7f40fa8b87.📒 Files selected for processing: 1
src/libs/ngs2.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 2 remain after this review.
@coderabbitai[bot] on GitHub · 2026-10-19 02:30 UTC · original · reviewed
ℹ️ Review info
⚙️ Run configuration
cd21e779-aa95-48ea-8b7b-1fae8cc42b36📥 Commits
Reviewing files that changed from the base of the PR and between
7f40fa8b87and8e0a6c1758.📒 Files selected for processing: 1
tests/Ngs2SamplerTests.cpp🚧 Files skipped from review as they are similar to previous changes: 1
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 1 remain after this review.
@Nmzik on GitHub · 2026-10-20 13:45 UTC · original
Fixed
Pull request closed