Skip to content

fix: initialize chorus mode before applying preset#2

Open
TrueNix wants to merge 1 commit into
dtimms:masterfrom
TrueNix:fix/chorus-startup-segv
Open

fix: initialize chorus mode before applying preset#2
TrueNix wants to merge 1 commit into
dtimms:masterfrom
TrueNix:fix/chorus-startup-segv

Conversation

@TrueNix

@TrueNix TrueNix commented May 13, 2026

Copy link
Copy Markdown

Summary

Fix a startup crash in Chorus::Chorus() by initializing awesome_mode before calling setpreset().

setpreset() calls changepar(), which can reach setvolume(). setvolume() branches on awesome_mode; when the member is still uninitialized it may take the awesome_mode path and dereference ldelay/rdelay before they are allocated, causing a SIGSEGV during startup.

Evidence

Observed on Fedora/Nobara with rakarrack 0.6.2:

Signal: 11 (SEGV)
#0 Chorus::changepar(int, int)
#1 Chorus::setpreset(int, int)
#2 Chorus::Chorus(float*, float*)
#3 RKR::RKR()
#4 main

Test plan

  • Built successfully after applying the patch.
  • Verified the patched binary starts without creating a new coredump.
  • Confirmed the previously crashing Fedora/Nobara startup path no longer crashes.

@TrueNix

TrueNix commented Jun 24, 2026

Copy link
Copy Markdown
Author

Hey @dtimms 👋

Just a friendly nudge — this PR fixes the segfault that occurs when a preset is applied before the chorus mode has been initialized (calling init_chorus() before preset application). The fix is minimal and the branch is clean with no CI failures.

Happy to address any feedback if you have concerns. Thanks for maintaining rakarrack!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant