audacity / audacity/audacity

Macros running on files can't be cancelled

Open
#1,513 0 comments 0 reactions 0 assignees View on GitHub
AU3-bug macros / scripting P3
Dominant language
C++
Stars
18.4k
Forks
2.7k
Avg merge
3d 1h
Merged PRs (30d)
78

Description

**Describe the bug**
On Windows and Mac, Macros running on files can't be cancelled

Both the Macros Palette and the manage Macros "Applying..." progress dialogs have a Cancel button - but clicking that does not interrupt and cancel the macro.

The example in the steps is trivial but I encountered this while I was testing Bugzilla 2785 when I was working with hundreds and sometimes thousands of files to be prepossessed with macros.

The only way I could halt/abandon a long-running macro was to crash Audacity via the Windows Task Manager. Bug given P2 rating as the user should not have to resort to such behavior

**To Reproduce**
Steps to reproduce the behavior:
1) make a folder with 4 or 5 audio files
2) Tools > Apply Macro > Palette...
3) choose the "MP3 Conversion" macro
4) Click the "Files" button
5) Select the files from Step 1
6) press the "open" button to start the macro
7) try to stop the macro with the "Cancel" button in the "Applying..." progress dialog
8) Observe you can't

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional information (please complete the following information):**
- OS: [e.g. Mac High Sierra, Ubuntu 18.04, Windows 10]
- Version [e.g. Audacity 2.5.1]
- (if relevant) Sound Device [e.g. Windows WASAPI, USB Sound card]

**Additional context**
Steve Daulton wrote:
> On Linux I find that I can cancel the macro by clicking the Cancel button, though when there are a lot of small files
>in the batch it may be necessary to click the Cancel button repeatedly to make it cancel.

This was originally logged as Bugzilla 2787
https://bugzilla.audacityteam.org/show_bug.cgi?id=2787

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue through Tools > Apply Macro > Palette..., using the MP3 Conversion macro on several files and testing both Cancel buttons. Trace the file-processing path behind the Macros Palette and the manage Macros “Applying...” dialog; done means Cancel interrupts the macro on Windows and macOS without crashing Audacity.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.