Skip to content

Fix crash on record cancellation - #11711

Merged
kryksyh merged 1 commit into
audacity:audacity3from
kryksyh:crash_on_recording_cancellation
Aug 18, 2026
Merged

kryksyh merged 1 commit into
audacity:audacity3from
kryksyh:crash_on_recording_cancellation

Conversation

@kryksyh

@kryksyh kryksyh commented Aug 18, 2026

Copy link
Copy Markdown
Member

Resolves: #9145

ClearPendingTracks was only clearing tracks if they were read out.
CancelRecording calls it without an out arg, so pending tracks accumulated.

  • 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

@kryksyh
kryksyh requested a review from saintmatthieu August 18, 2026 07:23
@coderabbitai

coderabbitai Bot commented Aug 18, 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: 0096bffc-fb2e-428a-9316-3ccbddde3260

📥 Commits

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

📒 Files selected for processing (1)
  • libraries/lib-track/PendingTracks.cpp

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


📝 Walkthrough

Walkthrough

ClearPendingTracks now stores the pointer returned when it removes a pending-added track in a local variable named removed. It then moves removed into pAdded. The observable behavior remains unchanged.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to b6389

This localized change clears pending tracks during record cancellation; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the crash related to recording cancellation, which matches the primary purpose of the change.
Description check ✅ Passed The description includes the linked issue, motivation, change summary, checklist responses, and QA status.
Linked Issues check ✅ Passed The change clears pending tracks when no output argument is provided, addressing the crash and duplicate-track behavior described in issue #9145.
Out of Scope Changes check ✅ Passed The pull request changes only the pending-track cleanup logic required to address issue #9145.

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.

@saintmatthieu saintmatthieu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Surprising that this rather obvious mistake has been here for years. Thanks for the fix.

@dozzzzer dozzzzer linked an issue Aug 18, 2026 that may be closed by this pull request
audacity#9145 ClearPendingTracks was only clearing tracks if they were read out.
CancelRecording is calling it without an out arg, and pending tracks were accumulated.
@kryksyh
kryksyh force-pushed the crash_on_recording_cancellation branch from b6389b5 to 0299bab Compare August 18, 2026 14:21
@kryksyh
kryksyh merged commit e30d1f3 into audacity:audacity3 Aug 18, 2026
8 checks passed
@kryksyh
kryksyh deleted the crash_on_recording_cancellation branch August 18, 2026 14:22
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.

Deleting tracks causes Audacity to crash

2 participants