Skip to content

Fix crashes when rt effect view is open - #11709

Merged
kryksyh merged 5 commits into
audacity:audacity3from
kryksyh:fix_crashes_when_rt_effect_view_is_open
Aug 18, 2026
Merged

kryksyh merged 5 commits into
audacity:audacity3from
kryksyh:fix_crashes_when_rt_effect_view_is_open

Conversation

@kryksyh

@kryksyh kryksyh commented Aug 17, 2026 •

Copy link
Copy Markdown
Member

Resolves: #10141
Resolves: #8686
Resolves: #11708
Resolves: #11712

Fixes:

  • Crash when a realtime effect dialog saves settings on close. In some situations (applying destructive effect, undo/redo, etc) the dialog closes when the effect state is destroyed. Regression from Use deep copy for realtime effect states when cloning a ReatimeEffectList #7873.
  • Master effect settings were not restored with undo/redo, because master effect state is a project-wide singleton, and the state saved in the undo system is the same state being edited by the dialog.
  • Memory corruption on closing AudioUnit dialog
  • I signed CLA
  • The title of the pull request describes an issue it addresses
  • If changes are extensive, then there is a sequence of easily reviewable commits
  • Each commit's message describes its purpose and effects
  • There are no behavior changes unnecessary for the stated purpose of the PR

Recommended:

  • Each commit compiles and runs on my machine without known undesirable changes of behavior

QA:

  • Testflow test cases have been run

@coderabbitai

coderabbitai Bot commented Aug 17, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 11063aff-065b-44f1-ac34-2357ec0be76b

📥 Commits

Reviewing files that changed from the base of the PR and between d17d4fd9ac8148062536ba311289579bd8f6dccb and 783078ba97a8f9badf0d4ef3a55fedb8cc2923cb.

📒 Files selected for processing (1)
  • src/effects/VST3/VST3Editor.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/effects/VST3/VST3Editor.cpp

Included review availability: Your plan includes up to 10 reviews per rolling hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

RealtimeEffectList now supports shallow and deep duplication, channel-group replacement, and shared effect states. Output-track duplication and append-recording replacement preserve shared realtime effect states. Undo snapshots restore shared states, active values, and settings. VST and VST3 editors guard missing settings values. The explicit AudioUnitEditor destructor was removed.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 78307

The PR addresses crashes and effect-state restoration issues without any supplied current-head merge-blocking concerns; it is merge-ready after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant TrackCopyPath
  participant WaveTrack
  participant RealtimeEffectList
  participant ChannelGroup
  TrackCopyPath->>WaveTrack: create duplicate
  TrackCopyPath->>RealtimeEffectList: ShareStates(destinationGroup, sourceGroup)
  RealtimeEffectList->>ChannelGroup: set shallow duplicated list
  ChannelGroup-->>WaveTrack: expose shared effect states
Loading
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the primary change: fixing crashes caused by open real-time effect views.
Description check ✅ Passed The description identifies resolved issues, explains the motivation, links issue numbers, and completes the required checklist.

Warning

Review ran into problems

🔥 Problems

Linked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped musescore/musescore.


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 help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: a50c99df-0063-412c-be94-385b353f9daa

📥 Commits

Reviewing files that changed from the base of the PR and between c90c052 and d17d4fd9ac8148062536ba311289579bd8f6dccb.

📒 Files selected for processing (8)
  • libraries/lib-effects/EffectOutputTracks.cpp
  • libraries/lib-realtime-effects/RealtimeEffectList.cpp
  • libraries/lib-realtime-effects/RealtimeEffectList.h
  • src/ProjectAudioManager.cpp
  • src/effects/VST/VSTEditor.cpp
  • src/effects/VST3/VST3Editor.cpp
  • src/effects/audiounits/AudioUnitEditor.cpp
  • src/effects/audiounits/AudioUnitEditor.h
💤 Files with no reviewable changes (2)
  • src/effects/audiounits/AudioUnitEditor.h
  • src/effects/audiounits/AudioUnitEditor.cpp

Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review.

Comment thread src/effects/VST3/VST3Editor.cpp Resolved
@kryksyh
kryksyh force-pushed the fix_crashes_when_rt_effect_view_is_open branch from d17d4fd to 783078b Compare August 17, 2026 19:46
@ianalarina ianalarina linked an issue Aug 18, 2026 that may be closed by this pull request
VST2 and VST3 write settings when the dialog closes.
When the track is destroyed with the effect state, no need to save it
Applying an effect or finishing recording replace the track
with a duplicate with a copy of the effect state.
So the currently opened effect dialogs reference a destroyed state
Fixes ambiguity between Clone and Duplicate
AUControl is destroyed by wxWidgets when EffectsUI closes
@kryksyh
kryksyh force-pushed the fix_crashes_when_rt_effect_view_is_open branch from 783078b to 82fb787 Compare August 18, 2026 16:31
@kryksyh
kryksyh merged commit de41dcf into audacity:audacity3 Aug 18, 2026
7 of 8 checks passed
@kryksyh
kryksyh deleted the fix_crashes_when_rt_effect_view_is_open branch August 18, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants