Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audacity crashes on export from Macros to a top level drive #2471

Closed
petersampsonaudacity opened this issue Jan 25, 2022 · 16 comments · Fixed by #4767
Closed

Audacity crashes on export from Macros to a top level drive #2471

petersampsonaudacity opened this issue Jan 25, 2022 · 16 comments · Fixed by #4767
Assignees
Labels
bug An error, undesired behaviour, or missed functionality crash / freeze catastrophic errors macros / scripting Bugs related to macros and scripts P2 High priority
Milestone

Comments

@petersampsonaudacity
Copy link

petersampsonaudacity commented Jan 25, 2022

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 > Macro Manager
  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 petersampsonaudacity added bug An error, undesired behaviour, or missed functionality P1 Highest level priority (ship blocker / must fix) labels Jan 25, 2022
@petersampsonaudacity petersampsonaudacity changed the title Audacity crashes on export from Macros to a yop level drive Audacity crashes on export from Macros to a top level drive Jan 25, 2022
@petersampsonaudacity petersampsonaudacity added the macros / scripting Bugs related to macros and scripts label Jan 25, 2022
@petersampsonaudacity
Copy link
Author

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

@petersampsonaudacity
Copy link
Author

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.

@AnitaBats AnitaBats added this to To Do (Dev) in Scripting and Macros via automation Jan 27, 2022
@AnitaBats AnitaBats added the good first issue Issues suitable for first-time contributors. See https://github.com/audacity/audacity/contribute label Jan 27, 2022
@AnitaBats AnitaBats added this to To do / Unclaimed in Community Contribution via automation Jan 27, 2022
@LWinterberg LWinterberg moved this from Help wanted to Help wanted / macros in Community Contribution Mar 3, 2022
@davidchocholaty
Copy link

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

@LWinterberg
Copy link
Member

feel free to fix this! @davidchocholaty

@LWinterberg LWinterberg moved this from Help wanted / macros to In progress in Community Contribution Apr 2, 2022
@davidchocholaty
Copy link

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 davidchocholaty removed their assignment Jun 24, 2022
@LWinterberg LWinterberg moved this from In progress to Help wanted / macros in Community Contribution Jun 24, 2022
@LWinterberg LWinterberg added P2 High priority crash / freeze catastrophic errors and removed P1 Highest level priority (ship blocker / must fix) labels Jun 24, 2022
@LWinterberg LWinterberg removed Help wanted good first issue Issues suitable for first-time contributors. See https://github.com/audacity/audacity/contribute labels Jul 4, 2022
@petersampsonaudacity
Copy link
Author

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.

@dozzzzer
Copy link
Contributor

dozzzzer commented Jun 2, 2023

The issue is still the case in 3.3.2

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

@vsverchinsky
Copy link
Collaborator

@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)

@Ryan-Miller-Audacity
Copy link

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 Ryan-Miller-Audacity removed their assignment Jun 8, 2023
@petersampsonaudacity
Copy link
Author

petersampsonaudacity commented Jun 10, 2023

@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
Copy link
Author

petersampsonaudacity commented Jun 10, 2023

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
Copy link
Author

petersampsonaudacity commented Jun 10, 2023

@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

@dozzzzer
Copy link
Contributor

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:

2023-06-12_13-52-49.mp4

After the fix:

2023-06-12_13-57-22.mp4

@dozzzzer dozzzzer removed this from To Do (Dev) in Scripting and Macros Jun 12, 2023
@petersampsonaudacity
Copy link
Author

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

@dozzzzer
Copy link
Contributor

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

Awesome!

@CommanderChipset
Copy link

CommanderChipset commented Aug 27, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error, undesired behaviour, or missed functionality crash / freeze catastrophic errors macros / scripting Bugs related to macros and scripts P2 High priority
Projects
Status: Done
Community Contribution
Help wanted / macros
Development

Successfully merging a pull request may close this issue.

8 participants