Bugzilla – Bug 2738
Audacity crashes with Macros on files when the macro-output folder is in an unwriteable location
Last modified: 2021-07-16 14:23:40 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).
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.
On Win 10 I got intelligible error messages: "Cannot export audio to <filepath-and-name>"
(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?
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
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)