Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 2738 - Audacity crashes with Macros on files when the macro-output folder is in an unwriteable location
Audacity crashes with Macros on files when the macro-output folder is in an u...
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Scripts
3.0.2
All All
: P2 RepeatableAll
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-04-11 10:34 UTC by Peter Sampson
Modified: 2021-07-16 14:23 UTC (History)
10 users (show)

See Also:
Steps To Reproduce:
1) Directories Preferences 2) set The Macro output to be C:\ (or similar om mac/Linux) 3) Run a Macro on files 4) Observe: Audacity crashes on the first attempted Export
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2021-07-16 00:00:00


Attachments
Error message (46.06 KB, image/png)
2021-07-16 14:23 UTC, Peter Sampson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Sampson 2021-04-11 10:34:13 UTC
If the user in Directories Preferences sets the Macro Output directory to be in an unwritable location (C:\ on Win for example) - then when running a Macro on a set of audio files Audacity will crash on the first attempted Export to macro-output in the Macro.

It would make a lot of sense from preventing the user from setting non-writable locations for this Directories preference.

In spite of the crash I am assigning this P2 - as this is really a user-error.  However we should protect as much as possible from such errors.

I have only tested on W10 with Audacity 3.0.2 b73aa1c - but I assume this apply on all platforms.


I don't know yet what happens if the user sets the location to a legal writable one, but then subsequently that location gets locked either by the user or some other app (a virus checker say).
Comment 1 Peter Sampson 2021-04-11 10:46:29 UTC
Steve wrote in Bug #2734

>Testing an earlier version of 3.0.1 (d72a10), which I'm guessing is 
>the same in this respect as 3.0.0:
>If the output directory for a macro is not writeable, it shows an error message:
>"Unable to open target file for writing"
>
>so yes, it is probably a regression against 3.0.0.

This is technically not a regression as in 3.0.0 and earlier we had no entry in Directories preferences for Macro Output.
Comment 2 James Crook 2021-04-14 18:26:01 UTC
On Win 10 I got intelligible error messages:

"Cannot export audio to <filepath-and-name>"
Comment 3 Peter Sampson 2021-04-15 08:51:04 UTC
(In reply to James Crook from comment #2)
James, did you just lock the folder that macro-output was in - or did you use an illegal location like C:\ for the macro-output in Directories prefs?
Comment 4 Peter Sampson 2021-06-27 11:45:44 UTC
Also logged on GitHub today
https://github.com/audacity/audacity/issues/1174
Audacity crashes when the output directory for Macros is set to C:\ #1174
Comment 5 Peter Sampson 2021-07-16 14:23:16 UTC
Created attachment 1172 [details]
Error message


Testing on W10 with latest 3.0.3 alpha  Audacity_Windows_64bit_1037187455_50f8e10

This can no longer occur as Audacity blocks the user from setting the macro-output directory to C:\ 

An error message is shown (see attachment)