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

Audacity Bugzilla



Bug 2515 - Exporting to a disk with insufficient space gives messages that are not user-friendly or helpful
Exporting to a disk with insufficient space gives messages that are not user-...
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Application Core
3.0.0
All All
: P2 RepeatableAll
Assigned To: Paul L
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-08-02 12:03 UTC by Peter Sampson
Modified: 2020-09-21 12:33 UTC (History)
7 users (show)

See Also:
Steps To Reproduce:
Testing using a small USB stick with an estimated 2 minutes recording time space remaining (As shown in Status bar) 1) Import audio bigger than the 2 mins space on USB disk 2) File>Export WAV to the USB disk 3) Observe: error message " Error while writing WAV (Microsoft) file (disk full). Libsndfile says "System error" " 4) Observe: disk remains full
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2020-09-21 00:00:00
james.k.crook: Must‑Test‑All‑OS-
petersampsonaudacity: Quickfix‑Requested+
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac+


Attachments
File error disk full dialog (5.66 KB, image/png)
2020-09-21 09:24 UTC, Peter Sampson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Sampson 2020-08-02 12:03:07 UTC
Exporting audio to a disk with insufficient space leaves the disk full.

You do get a somewhat helpful error message:
>Error while writing WAV (Microsoft) file (disk full).  
>Libsndfile says "System full" 

But note that this is an OS message and not an Audacity error trap.

And the disk can be left completely full


This is also logged as as part of UP-25
https://wiki.audacityteam.org/wiki/Unitary_Project_-_issue_tracking#up25

I have assigned to Paul as he volunteered to fix the UP-25 issues


This is not a regression on 2.4.2 Unlike it's close cousins Bug #2512 #2513 and #2514 - but I'm still rating this as P2
Comment 1 Paul L 2020-08-26 17:00:14 UTC
I think you will find this is not a regression on 2.4.2.

The message comes from code unrelated to Unitary.

Still you'd like to improve it.
Comment 2 Paul L 2020-08-26 17:13:17 UTC
Indeed you already noted it's not a regression.

You also say the disk remains full.

The relevant function is ExportPCM::Export and it has no provision to delete the file in case of failed export.

But I think it's debatable whether that would be correct behavior.  Keeping a partially exported file, with some portion of the sound intact, MAY be the more desirable.

In which case we may want to amend the message to that effect.

Who should decide this?
Comment 3 James Crook 2020-08-26 17:21:35 UTC
"Who should decide this?" - It can be doer decides, or it can be the two of you jointly agree, or if neither works, ask in the group.

If the new message is clear enough (RM hat not on) I'd say don't delete.  The user will know exactly what has gone on.  They can manually delete the broken export.  Flexible enough, I'd say.  I can put the hat on if needed.
Comment 4 Peter Sampson 2020-08-27 06:28:38 UTC
Testing on W10 with Audacity 3.0.0 70175ac - latest Master alpha

This appears to be back to 2.4.2 behavior (not entirely perfect - but graceful, informative and can be dealt with)

Following the Steps to reproduce

At Step 3 I get the error message
>Error while writing WAV (Microsoft) file (disk full).  
>Libsndfile says "System error" 

At Step 4 the partial Export is backed out and the space on the disk is properly released

This is the same OS system error message as originally reported - and the "disk is still left full with a mere 102kb of free space FWIW.

The message needs to be like the disk full message that we get in Bug #2513
>Audacity failed to write to a file
>Perhaps G: is not writable or the disk is full

i.e. an Audacity error trap and not an OS system trap is required.
Comment 5 Peter Sampson 2020-08-27 06:34:09 UTC
(In reply to James Crook from comment #3)
>If the new message is clear enough (RM hat not on) I'd say don't delete.  
>The user will know exactly what has gone on.  They can manually delete 
>the broken export.  Flexible enough, I'd say.  I can put the hat on if needed.

With QA hat on I think that the current behavior of deleting the partial export is the better (and for me preferred) behavior.


If we fail to delete it the user is left with a very full disk that they have to deal with.  If we don't delete it all that have to do is Export to a more spacious disk.

It's not like recording where a partial capture could be useful - Expot is normally the end step of production so a partial production file (or a partial file to transfer to a friend) is pretty useless.
Comment 6 Peter Sampson 2020-08-27 08:01:06 UTC
Testing on macOS 10.15.6 Catalina with Audacity 3.0.0 70175ac latest Master alpha

At Step 2 I get the error message
>Error writing WAV (Microsoft) file *disk full?).
Libsndfile says "System error"

As with Windows this appears to be an OS system message and not an Audacity trap message.

As with Windows on Mac the partial export is backed out and the disk cleaned.


The message needs to be like the disk full message that we get in Bug #2513
>Audacity failed to write to a file
>Perhaps /Volumes/NO NAME/ is not writable or the 
>disk is full

i.e. an Audacity error trap and not an OS system trap is required.
Comment 7 Paul L 2020-08-27 22:01:34 UTC
It's not really an operating system error -- the message is from our own ExportPCM.cpp and it mentions Microsoft because they (with IBM) defined the WAV file format.

But no matter, you don't like the message and would rather have the same as for other cases of disk space exhaustion, without mentioning those technicalities.

I can fix it.  But this is a problem specific to WAV export.  You should test export as other formats too, which each call different code with different error message coe.  

(It is unfortunate that they don't share error message code, but the removal of the partially exported file is common, in Exporter::ExportTracks.  My comment #2 was mistaken that file cleanup doesn't happen.)
Comment 9 Peter Sampson 2020-08-28 08:01:58 UTC
Testing on W10 with Audacity 3.0.0 22c00fa

1) This is now fixed OK for WAV - you get the message
>Audacity failed to write a file
>Perhaps G: is not writable or the disk is full

But it is not fixed for other formats


2) MP3, Ogg , Flac and Mp2 all generate a fairly unhelpful error message
>Unable to export
so it tells the user it's failed - but doesn't tell them why it failed.


3) The FFmpeg formats e.g. M4A and Opus give a techy FFmpeg error and then the unhelpful failure message
>FFmpeg: Error - failed to write audio frame to file
clicking OK the user then gets
>Unable to export
So again this tells the user it failed but not why - is the first message is overly techy for most users.

Accordingly I have marked this as REOPENED for use cases 2 and 3 here


The good news is that in all use cases Step 4 no longer applies -  Audacity cleans up after itself and removes the partially exported file and releases the "disk" space
Comment 10 Peter Sampson 2020-08-28 08:15:33 UTC
(In reply to Paul L from comment #7)
>But no matter, you don't like the message and would rather have the 
>same as for other cases of disk space exhaustion, without mentioning 
>those technicalities.

It's not a question of me personally not liking the error messages - I'm wearing a QA hat here and Audacity benefits greatly from having:

a) simple clear informative error messages that help the user understand what's gone wrong (and give them a clue as to how to fix it).

b) Consistency (an Audacity watchword and aspiration) among this class of error messages - they're all disk full messages.

Getting a) right can save a lot of time for the Forum elves  saving them from having to answer "What does this message mean?"
Comment 11 Peter Sampson 2020-08-30 06:48:50 UTC
(In reply to Peter Sampson from comment #10)
Testing on Mac with Audacity 3.0.0 c17b804

The AIFF message on disk full on Export is fine
>File Error
>Audacity failed to write to a file
>Perhaps /Volumes/NO NAME/is not writable or the
>disk is full

And Audacity properly cleans up after itself removing the partial file.
Comment 12 Peter Sampson 2020-09-10 11:46:32 UTC
Testing on W10 with Audacity 3.0.0 f06b9a9
with James' improved Yellow-Zone message.

None of the Exports hit Paul's Yellow-Zone trap/James' new YZ Message
but thankfully all of them clean up after themselves and remove the partially exported file leaving the "disk" clean.

1) WAV
This gets a Red-Done Disk-full message - but of course with no "?" help button.
See Bug #2539


2) MP3 and Ogg
yields this error message
>Unable to export
This is far from satisfactory as it doesn't give the user any indication of what the problem is - i.e the disk is full.

This needs a Red-Zone message with a "?" help button.


3) FFmpeg Exports - M4A etc
These get a techy cryptic message
>FFmpeg: Error - Failed to write audio frame to file
Just what is our average user to make of that ?

This too needs a Red-Zone message with a "?" help button.


Accordingly this bug remains REOPENED
Comment 13 Peter Sampson 2020-09-15 05:40:18 UTC
This has become more important now as following the fix for Bug #2539
>No "?" help button on disk full error message(s)

We do get a help button when failing to Export as WAV (or AIFF on Mac) as there we get the Red-Zone disk-full error message


But the "unfriendly" "unhelpful" messages that we get with the other exports (e.g. MP3 and the FFmpeg exports) as detailed in Comment #9 - do not have any help buttons.  

And really we should be showing the Red-Zone disk-full message for those just as we do for WAV and AIFF - *NOT* just adding help button to these poor message dialogs.
Comment 14 James Crook 2020-09-21 08:08:13 UTC
Progress here (for FFmpeg)
https://github.com/audacity/audacity/commit/0b633c564adf5866caf7a692fd8345a9e7571f48

All 'unable to export' messages now have a help button.
We will need a landing page for that.
They also now all have a unique identifier error code.

The one(s) that trigger on disk full will need upgrading to longer messages.
Let me know which ones those are.
Comment 15 Peter Sampson 2020-09-21 08:19:52 UTC
(In reply to James Crook from comment #14)
>All 'unable to export' messages now have a help button.
>We will need a landing page for that.
>They also now all have a unique identifier error code.
You will need to give me more background than that


>The one(s) that trigger on disk full will need upgrading to longer messages.
>Let me know which ones those are.
It's all the FFmpeg exports and MP3, Ogg , Flac and Mp2 
As I explain in Comment #9 and Comment #12
Comment 16 Peter Sampson 2020-09-21 09:17:56 UTC
Testing on W10 with Audacity 3.0.0 0b633c5

testing exports WAV and AIFF (and I tested a couple of "other uncompressed...") work fine.  They display what looks like the Red-Zone disk full error message - and the help button there links to the disk-full error page.


FFmppeg: on disk full all FFmpeg exports also display what looks like the Red-Zone disk full error message - and the help button there links to the disk-full error page.  But onece you dismiss that a second error message appears
>Unable to export
>Error FFmpag:1041
This also has a help button which links to a page that does not exist in the Manual "Unable to export"


All the others MP3, Ogg,FLAC, MP2 all display
>Unable to export
followed by an error code relevant to the export
>Error MP3:1966
>Error OGG:341
>Error FLAC:410
>Error MP2:346
All of these also have a help button which links to a page that does not exist in the Manual "Unable to export".
There is no message about disk full - which is what the problem is in this test.
Comment 17 Peter Sampson 2020-09-21 09:24:48 UTC
Created attachment 1008 [details]
File error disk full dialog

The Red-Zone disk-full error message has now been restructured as requested.

This is much better, thanks for that.
Comment 18 James Crook 2020-09-21 10:16:27 UTC
DEVEL - FIX MADE
https://github.com/audacity/audacity/commit/6149b57dc0c4c61f06762554f3dfca5bf67cd9f0

The remaining error messages should now say disk full too, meaning it should now be possible to close this bug.

We do need a landing page in the manual for "Error:_Unable to export" for the other export errors which don't seem to trigger on disk full.  They are probably rare, and the page should ask user to contact feedback, with the error code, and say how they got the error - and that new page could still suggest checking that disk is not full.
Comment 19 Peter Sampson 2020-09-21 12:12:25 UTC
(In reply to James Crook from comment #18)
Testing on W10 with Audacity 3.0.0 e3bd5cf

These mow all show the Red-Zone message which has
a) Improved, more helpful, text
b) a help button kinking to the Error: Disk Full page in the Manual
Comment 20 Peter Sampson 2020-09-21 12:13:58 UTC
The FFmpeg error now just has the single Red-Zone message - the secodary message no longer occurs.
Comment 21 Peter Sampson 2020-09-21 12:33:28 UTC
(In reply to James Crook from comment #18)
Testing on W10 with Audacity 3.0.0 e3bd5cf

These mow all show the Red-Zone message which has
a) Improved, more helpful, text
b) a help button kinking to the Error: Disk Full page in the Manual

The FFmpeg error now just has the single Red-Zone message - the secondary message no longer occurs.