Bugzilla – Bug 2515
Exporting to a disk with insufficient space gives messages that are not user-friendly or helpful
Last modified: 2020-09-21 12:33:28 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
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.
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?
"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.
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.
(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.
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.
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.)
Now fixed at https://github.com/audacity/audacity/commit/7d359a6640b64bdb7601f712e4da421e71efcf48
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
(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?"
(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.
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
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.
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.
(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
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.
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.
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.
(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 secodary message no longer occurs.
(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.