Repository navigation
Fix crash in DTMF generator - #10815
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 9fb41ed2e71d5b121d100a5cb25156c5812b60c0 and 69acdd8. 📒 Files selected for processing (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughReplaces a boolean self-notify flag with an integer depth counter Sequence Diagram(s)sequenceDiagram
participant Caller
participant Model as BuiltinEffectModel
participant Reg as InstancesRegister
Caller->>Model: modifySettings()
Note right of Model: m_selfNotificationDepth++
Model->>Reg: notifyAboutSettingsChanged(instanceId)
Reg->>Model: settingsChanged()
alt m_selfNotificationDepth > 0
Note right of Model: doReload() suppressed
else
Model->>Model: doReload()
end
Note right of Model: m_selfNotificationDepth-- (deferred)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
ad5239c to
e5c25e2
Compare
e5c25e2 to
fd6502b
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: 5343eccc-781e-4497-a106-a48b01b67383
📥 Commits
Reviewing files that changed from the base of the PR and between 5e211c6 and fd6502b569a61edc0c293d2c305ff43324f1925c.
📒 Files selected for processing (2)
src/effects/builtin/view/builtineffectmodel.cppsrc/effects/builtin/view/builtineffectmodel.h
fd6502b to
861338a
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
src/effects/builtin/view/builtineffectmodel.h (1)
82-82:⚠️ Potential issue | 🟠 MajorReplace boolean self-notification guard with nest-safe depth tracking.
Using a plain bool here is not re-entrancy safe: a nested
modifySettings()can reset it before the outer notify chain completes, reopening the recursion path (affecting callback behavior atsrc/effects/builtin/view/builtineffectmodel.cppLine 19 and notify sequence at Lines 79-81).Proposed fix (depth guard + scoped decrement)
diff --git a/src/effects/builtin/view/builtineffectmodel.h b/src/effects/builtin/view/builtineffectmodel.h @@ - bool m_emittingSelfNotification = false; + int m_selfNotificationDepth = 0; diff --git a/src/effects/builtin/view/builtineffectmodel.cpp b/src/effects/builtin/view/builtineffectmodel.cpp @@ - if (m_emittingSelfNotification) { + if (m_selfNotificationDepth > 0) { return; } @@ - m_emittingSelfNotification = true; + ++m_selfNotificationDepth; + struct DepthGuard { + int& depth; + ~DepthGuard() { --depth; } + } guard { m_selfNotificationDepth }; instancesRegister()->notifyAboutSettingsChanged(m_instanceId); - m_emittingSelfNotification = false;
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: 5cdb65d5-82c3-499b-8448-3fa7782825f3
📥 Commits
Reviewing files that changed from the base of the PR and between fd6502b569a61edc0c293d2c305ff43324f1925c and 861338a90e7813f0efe382decdf7faf7320e970e.
📒 Files selected for processing (2)
src/effects/builtin/view/builtineffectmodel.cppsrc/effects/builtin/view/builtineffectmodel.h
861338a to
9fb41ed
Compare
fixes stack overflow, when a model update emits modifySettings
9fb41ed to
69acdd8
Compare
* Move decimal-precision derivation into ParameterInfo with an override hook (saintmatthieu's audacity#2) and expose via NumDecimalsRole; cap at 6 fractional digits to keep numbers readable. * Split units (short symbol, rendered inside the spinbox via measureUnitsSymbol) from description (longer hint, rendered as a trailing label in the row). Nyquist's ctrl.label now flows to ParameterInfo.description; VST3 keeps both fields populated as before. * Extract GeneratedIncrementalPropertyControl with the isEditing gesture lifecycle and a re-entry guard against the model echo loop pending audacity#10815. * Use focus-based gestures in the text control so a typed word is one undo step. * Layout polish: slider/dropdown/numeric/text/file controls each have bounded widths so the row stays readable across plugin families; description label hoisted to the outer row with a maximumWidth + word-wrap; trailing fillWidth filler keeps the description packed against its control rather than at the far right.
Resolves: #10563
Fixes stack overflow, when a model update emits modifySettings
Recommended:
QA: