audacity icon indicating copy to clipboard operation
audacity copied to clipboard

Audacity crashes on export from Macros to a top level drive

Open petersampsonaudacity opened this issue 3 years ago • 6 comments

Describe the bug The problem is that the exporting path for macros, which you can specify in menu Edit > Preferences > Directories must be a folder and can't be directly the root of a partition, example F:\ it crashes!

With path: F:\macro it works and it creates automatically a subfolder named “macro-output”

Originally logged on the Forum by user Tyco72(2) https://forum.audacityteam.org/viewtopic.php?f=46&t=122648&p=444407

To Reproduce Steps to reproduce the behavior:

  1. Edit > Preferences >Directories
  2. Set the Macro output directory to be a top level drive ( say an exFAT formatted USB stick)
  3. get some audio and select it
  4. Tools > Macros
  5. choose the MP3 Conversion Macro
  6. Click on Apply Macro to Project
  7. Observe: Audacity crashes on Export (I sent the ET -phone-home report in the error dialog)

Expected behavior It should work with any valid path, in this case creating a a folder “macro-output” at the top level on the drive

Screenshots None

Additional information (please complete the following information):

  • OS: Windows 10 - but assume all
  • Version Audacity 2.1.3 and 3.2.0 alpha

Additional context I set the priority to P1 as: a) Audacity should not crash, b) the user does not receive ant helpful error message to inform them of the nature of the problem (see Forum thread)

In directories prefs - Open, Close, Import and Export directories worked as the top-level location without a folder and no crash

Even the temporary directory could be set to the exFAT USB stick and it works -but I REALLY wouldn't recommend that IRL.

However it's not an entirely silly use case as my Windows PC has a 256GB SSD C: drive and on onboard spinning metal 1TB d:drive - so one might set the temporary directory to be on the D: drive - and note that is a directory "Session Data" on the D: drive and just a set of temporary files.

petersampsonaudacity avatar Jan 25 '22 12:01 petersampsonaudacity

Also crashes if you apply the MP3 Conversion Macro to Files (and nit just Project)

petersampsonaudacity avatar Jan 25 '22 12:01 petersampsonaudacity

The OP wrote on the Forum thread:

For the exports I have a partition dedicated on a separated HD, then I move the files quickly to their destinations, so for me it was normal to use the root path of the partition.

petersampsonaudacity avatar Jan 25 '22 13:01 petersampsonaudacity

Hi, I will try to take a look on it. @LWinterberg can you assign me please to this issue? Thank you in advance.

davidchocholaty avatar Apr 01 '22 12:04 davidchocholaty

feel free to fix this! @davidchocholaty

LWinterberg avatar Apr 02 '22 08:04 LWinterberg

Hi, I'm so sorry for the later response. I tried to fix the issue for the GSoC project. However, I couldn't fix it and it wouldn't be possible to find time for it. I will unassign myself from this issue to let it for other devs that can fix it. Once so sorry for the later response.

davidchocholaty avatar Jun 24 '22 08:06 davidchocholaty

Still occurs on latest (today's) 3.2.0 release build: https://github.com/audacity/audacity/actions/runs/3081056287

a) crashes when run on "Files" sent the ET phone-home report again

b) does NOT crash when run on project - but that's because the MP3 export (in the STR) ignores the setting for the Macros output in Directories prefs - and instead uses the setting for Export in directories prefs and pops up the export dialog.

petersampsonaudacity avatar Sep 19 '22 11:09 petersampsonaudacity

The issue is still the case in 3.3.2

Sentry log: https://sentry.audacityteam.org/share/issue/d6d26cf1db6741c5b055343cdcf62438/

dozzzzer avatar Jun 02 '23 10:06 dozzzzer

@dozzzzer Still the case in the new exporting branch, but seem to be an easy one, though fixing it in master will cost me some time to resolve even more conflicts later)

vsverchinsky avatar Jun 02 '23 15:06 vsverchinsky

For some reason or another I can't get my MAC and or my Windows laptop to give me full permissions to write to the top level drive, so I cannot successfully test this ticket. @dozzzzer Can you please handle.

Ryan-Miller-Audacity avatar Jun 08 '23 12:06 Ryan-Miller-Audacity

@Ryan-Miller-Audacity

Testing on W10 with 3.3.3 I still get the crash following my previous STRs

At Step 2 Audacity allows me to set the default macro output directory to be my top-level G: exFAT formatted USB stic. And at Steps 6-7 it still crashes. I sent the ET phone-home report.

If after step 2 I add 2.1 create a directory on G: - G:\Macros say

Then at steps 6-7 Audacity creates a subdirectory G:\ Macros\macro-output (this is expected behavior

And the outputted MP3 file from the MP3 Conversion macro is place in that folder: G:\Macros\macro-output\my-file.mp3 (also expected behavior)

So it is only the top level G: directory of the USB stick that is blocked - BUT it is a valid file location that I can write to as I can from Audacity: a) Save a project to that top level G:\ directory b) export audio files to that G:\ directory

I am not prepared to risk trying with my top-level C:\ drive as I have no desire to risk screwing that up - but this PC does also have an on-board 1TB spinning metal D: drive so I can also test with that.

UPDATE I get the same result with the onboard D:\ disk - and ET phone-home message sent too

petersampsonaudacity avatar Jun 10 '23 14:06 petersampsonaudacity

Ahhhhh - but then I realized I should have been testing with @vsverchinsky 's branch build: audacity-win-3.4.0-alpha-20230605+3df662a-x64

And using that it all works fine with both my on-board D:\drive and my external G:\ exFAT USB stick.

So Vitaly's branch looks to fix this issue (on Windows at least) I can try to test later on Mac - it's a shame this didn't get tested in time to be pulled for the recent 3.3.3 release

petersampsonaudacity avatar Jun 10 '23 14:06 petersampsonaudacity

@Ryan-Miller-Audacity

Testing on macOS 12.6.3 Monterey with @vsverchinsky 's branch Universal Mac build

  1. still fails with 3.3.3 0 BUT does bot crash on Mac - instead gives an error message: image which is nonsense as I can indeed write to it - the above image was transferred to my PC via that same USB stick
  1. On Mac too with Vitaly's branch Universal build all works fine I get a macro-output folder created on Black 32 DT (the USB stick top level directory) - and the result of the MP3 Conversion macro is sent to that macro-output folder.

So Vitaly's fix for this works fine on Mac as well as Windows

petersampsonaudacity avatar Jun 10 '23 15:06 petersampsonaudacity

Tested. Now I'm not experiencing any crashes when exporting to either a USB flash drive or to a root of a volume (e.g. D:)

Before the fix:

https://github.com/audacity/audacity/assets/70063970/996c79a3-f626-45cc-91e8-e180a01b481d

After the fix:

https://github.com/audacity/audacity/assets/70063970/bf1de865-073b-4934-b3b1-f5f423d6fe56

dozzzzer avatar Jun 12 '23 12:06 dozzzzer

Tested on W10 with latest 3.4.0 alpha: audacity-win-3.4.0-alpha-20230615+b99aedb-x64-msvc2022

Works fine with setting to root directory on a) my internal 1TB D: drive b) my external G: drive USB stick

petersampsonaudacity avatar Jun 15 '23 15:06 petersampsonaudacity

Works fine with setting to root directory on a) my internal 1TB D: drive b) my external G: drive USB stick

Awesome!

dozzzzer avatar Jun 16 '23 09:06 dozzzzer

Me three with version 3.3.3 macro export to a USB root fail. I WISH I could just specify where the files go, not have it automatically bundle it in a folder for me. The reason is they're to go into the storage of a simple mp3 player. It plays the files in the order they were written onto the storage media because it's a simple player. --I'm not the only one who's doing this. Others have asked how to copy files in a specific temporal order so they will play in proper order from the player. Often they're given an answer to a question they didn't ask because nobody needs to copy files in a specific order. Despite many people having to copy files in a specific temporal order so that they will play in that same order.

CommanderChipset avatar Aug 27 '23 02:08 CommanderChipset