Difference between revisions of "Proposal: Earlier Disk Over-run Warnings"

From Audacity Wiki
Jump to: navigation, search
(Transport Menu: updated the Timer Record entry)
(Effect Menu below the line: VR removed for 2.3.3 onwards)
 
(43 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Proposal_Header|This page is a proposal to increase Audacity's resiliance to situations where disk over-run causes problems  |}}
+
{{Proposal_Header|This page is a proposal to increase Audacity's resilience to situations where disk over-run causes problems  |}}
  
 
__NOTOC__
 
__NOTOC__
  
 
==The Problem==
 
==The Problem==
[http://bugzilla.audacityteam.org/show_bug.cgi?id=437 Bug #437] relates to this issue and is where it was originally reported.
+
[https://bugzilla.audacityteam.org/show_bug.cgi?id=437 Bug #437] relates to this issue and is where it was originally reported.  The fix for Bug #437 provides traps just as Audacity is about to run out of space for Recording, project Saves, and Exports - an error message is popped up and Audacity will clean up after such unsuccessful Saves or Exports.  Recording will cleanly stop with a partial project.
  
#Particularly egregious are the Recording functions as when the user runs out of disk space Audacity currently carries on recording but blithely overwrites earlier parts of the recorded project, effectively trashing the user's recording.  Worse still the user has no idea that this has taken place until they come to access the recording after "completion".
+
We could be more helpful to the user by checking in advance that there is sufficient space for what the user is trying to do, popping an error/warning before starting the required action.  This would avoid time wasted by a partial and aborted action.  There is one place in Audacity where we currently do this and that is in Timer Record where checks are made that there is sufficient space for the required elapsed time of recording and an error is popped if not so. 
#Export, particulary of uncompressed file formats but not restricted to them, can generate large amounts of audio data with the potential for disk overrun.
+
 
 +
We do still need the bug #437 traps as the ultimate safeguard.
 +
 
 +
#Although a recording that runs out of space now provides the user with a partial project, we could be more helpful by providing earlier warnings.  There is the recording time left that shows in the Status bar - but we know that many people overlook the Status Bar
 +
#The Save Project commands when running out of space only reports when the failure occurs (which could be many minutes later) - Audacity could check before starting the Save that there is sufficient space.
 +
#Export too, when running out of space only reports when the failure occurs (which could be many minutes later) - Audacity could check before starting the Export that there is sufficient space.
 
#Import can easily be asked to import a data set that is too large for the available disk space.
 
#Import can easily be asked to import a data set that is too large for the available disk space.
 
#The Generate and Effect plug-ins are capable of generating large amounts of audio data with the potential for disk overrun, this is not handled cleanly.
 
#The Generate and Effect plug-ins are capable of generating large amounts of audio data with the potential for disk overrun, this is not handled cleanly.
Line 13: Line 18:
 
#Even seemingly innocuous commands have the potential to produce sufficient data to overfill the disk.
 
#Even seemingly innocuous commands have the potential to produce sufficient data to overfill the disk.
  
1 above has given us unwanted bad press on the Wikipedia Audacity page "Limitations" section: https://en.wikipedia.org/wiki/Audacity_%28audio_editor%29#Limitations
+
== Proposed Feature ==
 +
A suitable headroom buffer to be defined - to especially avoid overfilling the user's main drive (C: in the case of Windows). This should be user-settable but deep in Preferences and with a sensible default of 50-100MB say.
  
== Proposed Feature ==
 
A suitable headroom buffer to be defined.  This should be user-settable but deep in Preferences and with a sensible default of 50-100MB say.
 
 
*For Recording activities:
 
*For Recording activities:
 
*#Check before recording starts that there is more space available than the headroom buffer
 
*#Check before recording starts that there is more space available than the headroom buffer
*#While recording takes place check the availble disk space
+
*#While recording takes place check the available disk space
 
*#If and when it reaches the headroom buffer size: Audacity stops with an error message
 
*#If and when it reaches the headroom buffer size: Audacity stops with an error message
 +
*#*A three-level "traffic-light" green->amber->red warning could be provided ahead of reaching the headroom buffer
 +
 +
 +
*Save commands
 +
*#check that the volume of data to be created, based on current settings will not overfill the disk capacity minus the headroom buffer
 +
*#if so disallow the Save with a suitable error message and advise the user to free up some disk space and try again
 +
*#Particularly a problem if the user has not pre-saved the project and is occupying space in the Audacity Temp directory (which is only cleaned up after the Save is made)
 +
*#Particularly a problem too if the user has enough space for a Save but not a Save As - we may want to advise them to make a Save and then free up some disk space.
  
  
 
*Export
 
*Export
*#check that the volume of data to be created, based on current settings and exported filetype, will not overfill the disk capacity minus the headroom buffer
+
*#check that the volume of data to be created, based on current settings and exported file-type, will not overfill the disk capacity minus the headroom buffer
*# if so disallow the emport with a suitable error message
+
*# if so disallow the export with a suitable error message
  
  
 
*Import
 
*Import
*#check that the volume of data, based on current settings and imported filetype, will not overfill the disk capacity minus the headroom buffer
+
*#check that the volume of data, based on current settings and imported file-type, will not overfill the disk capacity minus the headroom buffer
 
*# if so disallow the import with an error message
 
*# if so disallow the import with an error message
  
Line 40: Line 52:
  
 
*Copy & Paste
 
*Copy & Paste
::Neither of these commands aappears to generate any noticeable extra disk occupancy, the assunption is that they are using pointers.  However once you manipulate the copied data with an effect then the disk  size occupancy does increase - but that should be trapped under '''Generators and effects''' above.
+
::Neither of these commands appears to generate any noticeable extra disk occupancy, the assumption is that they are using pointers.  However once you manipulate the copied data with an effect then the disk  size occupancy does increase - but that should be trapped under '''Generators and effects''' above.
  
  
 
*All other commands - in fact '''all''' commands
 
*All other commands - in fact '''all''' commands
*#Before the command is implemented in any way check that we have more available space than the hedroom buffer.
+
*#Before the command is implemented in any way check that we have more available space than the headroom buffer.
 
*#If not then inhibit the command and display an error message
 
*#If not then inhibit the command and display an error message
  
  
 
*Regular checking
 
*Regular checking
*#It may be beneficial that, while Audacity is idling, it makes periodic checks to see if disk-space is being eroded (by other applications) and if so display a suitable "out of sppace" error message that the user will see on their return to Audacity,
+
*#It may be beneficial that, while Audacity is idling, it makes periodic checks to see if disk-space is being eroded (by other applications) and if so display a suitable "out of space" error message that the user will see on their return to Audacity,
  
 
==Developer/QA Backing==
 
==Developer/QA Backing==
*Peter
+
*'''Peter:'''  particularly for '''Record''', '''Save''', '''Export''' and '''Import''' commands as it would mean  we could stop the command from even starting to implement if there would be insufficient space.
  
 
==Use Cases==
 
==Use Cases==
*User sets off a recording with insufficient disk space.  Audacity appears to the user to continue to work recording properly.  But when they reaccess their project they find that the recording is corrupted.
+
*While recording, many users overlook the Status Bar time remaining messages, so would be surprised by an abrupt stop and the bug #437 error message.
*User genrerates a tone say with insufficient disk space.  It appears to the user that this has been completed successfully.  An error only occurs when the user tries to save the project - and that is a pretty opaque un-informative over-technical error message,
+
*The user could be many minutes into the Save of a large project, or an Export from it, only to have it aborted - thus wasting those minutes.
  
 
==Tables for analysis and subsequent tracking==
 
==Tables for analysis and subsequent tracking==
Line 80: Line 92:
 
| no
 
| no
 
|-
 
|-
| Open
+
| '''Open'''
 
| depends on data size and settings
 
| depends on data size and settings
 
| almost certainly
 
| almost certainly
Line 96: Line 108:
 
| no
 
| no
 
|-
 
|-
| Save Project
+
| '''Save Project'''
 
| may be a lot if Temp files in use
 
| may be a lot if Temp files in use
| Yes
+
| Yes - '''critical'''
 
|  
 
|  
 
| no
 
| no
 
| no
 
| no
| no
+
| #437 now has an error trap
 
|-
 
|-
| Save Project As
+
| '''Save Project As'''
 
| as much as the existing project
 
| as much as the existing project
| Yes
+
| Yes - '''critical'''
 
|  
 
|  
 
| no
 
| no
 
| no
 
| no
| no
+
| #437 now has an error trap
 
|-
 
|-
| Save Compressed Copy of Project Project
+
| '''Save Compressed Copy of Project Project'''
 
| TBP
 
| TBP
| yes
+
| yes - '''probably critical'''
 
|  
 
|  
 
| no
 
| no
 
| no
 
| no
| no
+
| #437 now has an error trap
 
|-
 
|-
 
| Check Dependencies
 
| Check Dependencies
Line 136: Line 148:
 
| no
 
| no
 
|-
 
|-
| Import
+
| '''Import'''
 
| depends on file size & type
 
| depends on file size & type
 
| almost certainly
 
| almost certainly
Line 142: Line 154:
 
| no
 
| no
 
| no
 
| no
| no
+
| #437 now has an error trap
 
|-
 
|-
| Export (various)
+
| '''Export''' (various)
 
| file size calculable
 
| file size calculable
 
| almost certainly
 
| almost certainly
Line 150: Line 162:
 
| no
 
| no
 
| no
 
| no
| no
+
| #437 now has an error trap
 
|-
 
|-
 
| Apply Chain
 
| Apply Chain
 
| TRICKY
 
| TRICKY
| almost certainly
+
| probably
 
|  
 
|  
 
| no
 
| no
Line 259: Line 271:
 
| Record
 
| Record
 
| open-ended
 
| open-ended
 +
| yes - '''critical'''
 +
| bug #437
 +
| ongoing
 
| yes
 
| yes
| Mark Young
+
| #437 now has an error trap
| ongoing
 
| unpulled patch yes
 
| no
 
 
|-
 
|-
 
| Timer Record
 
| Timer Record
| open-ended
+
| calculable
| yes
+
| yes - '''critical'''
 
| Mark Young
 
| Mark Young
| ongoing
+
| '''Yes'''
 
| '''setup trap ok'''
 
| '''setup trap ok'''
| warning on setup ok and in 2.1.3
+
| '''warning on setup ok and in 2.1.3'''
 
|-
 
|-
| Append Record
+
| Timer Record (Export)
 +
| calculable
 +
| yes - '''critical'''
 +
| not assigned
 +
| no
 +
| no
 +
| no
 +
|-
 +
| Record New Track
 
| open-ended
 
| open-ended
 +
| yes - '''critical'''
 +
| Bug #437
 +
| ongoing
 
| yes
 
| yes
| Mark Young
+
| #437 now has an error trap
| ongoing
 
| unpulled patch yes
 
| no
 
 
|}
 
|}
  
 
== Tracks Menu ==
 
== Tracks Menu ==
 +
This set of commands could be seen as far less critical to trap then the Record and Save commands so sould probably be ignored.
  
 
{| style="text-align: left" class="wikitable sortable"
 
{| style="text-align: left" class="wikitable sortable"
Line 295: Line 316:
 
| Stereo Track to Mono
 
| Stereo Track to Mono
 
| probably calculable
 
| probably calculable
| almost certainly
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 303: Line 324:
 
| Mix and Render
 
| Mix and Render
 
| probably calculable
 
| probably calculable
| almost certainly
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 311: Line 332:
 
| Mix and Render to new Track
 
| Mix and Render to new Track
 
| probably calculable
 
| probably calculable
| almost certainly
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 319: Line 340:
 
| Resample
 
| Resample
 
| probably calculable
 
| probably calculable
| probably
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 326: Line 347:
 
|}
 
|}
  
=== Generate Menu ===
+
== Generate Menu ==
 +
This set of commands could be seen as far less critical to trap then the Record and Save commands so could probably be ignored.
  
 
{| style="text-align: left" class="wikitable sortable"
 
{| style="text-align: left" class="wikitable sortable"
Line 339: Line 361:
 
| Chirp
 
| Chirp
 
| calculable
 
| calculable
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 347: Line 369:
 
| DTMF Tone
 
| DTMF Tone
 
| calculable
 
| calculable
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 355: Line 377:
 
| Noise
 
| Noise
 
| calculable
 
| calculable
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 363: Line 385:
 
| Silence
 
| Silence
 
| calculable
 
| calculable
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 371: Line 393:
 
| Tone
 
| Tone
 
| calculable
 
| calculable
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 379: Line 401:
 
| Click Track
 
| Click Track
 
| calculable
 
| calculable
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 387: Line 409:
 
| Pluck
 
| Pluck
 
| calculable
 
| calculable
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 395: Line 417:
 
| Risset Drum
 
| Risset Drum
 
| calculable
 
| calculable
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 403: Line 425:
  
 
=== Effect Menu ===
 
=== Effect Menu ===
 +
This set of commands could be seen as far less critical to trap then the Record and Save commands so could probably be ignored.
  
 
{| style="text-align: left" class="wikitable sortable"
 
{| style="text-align: left" class="wikitable sortable"
Line 415: Line 438:
 
| Amplify
 
| Amplify
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 423: Line 446:
 
| Auto Duck
 
| Auto Duck
 
| TBP
 
| TBP
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 431: Line 454:
 
| Bass & Treble
 
| Bass & Treble
 
| 107% - used more while working
 
| 107% - used more while working
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 439: Line 462:
 
| Change Pitch
 
| Change Pitch
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 447: Line 470:
 
| Change Speed
 
| Change Speed
 
| varies with % change
 
| varies with % change
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 455: Line 478:
 
| Change Tempo
 
| Change Tempo
 
| varies with % change
 
| varies with % change
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 463: Line 486:
 
| Click Removal
 
| Click Removal
 
| varies
 
| varies
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 471: Line 494:
 
| Compressor
 
| Compressor
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 479: Line 502:
 
| Echo
 
| Echo
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 487: Line 510:
 
| Equalization
 
| Equalization
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 495: Line 518:
 
| Fade In
 
| Fade In
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 503: Line 526:
 
| Fade Out
 
| Fade Out
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 511: Line 534:
 
| Invert
 
| Invert
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 519: Line 542:
 
| Leveller
 
| Leveller
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 527: Line 550:
 
| Noise Reduction
 
| Noise Reduction
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 535: Line 558:
 
| Normalize
 
| Normalize
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 551: Line 574:
 
| Paulstretch
 
| Paulstretch
 
| massive
 
| massive
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 559: Line 582:
 
| Phaser
 
| Phaser
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 567: Line 590:
 
| Repair
 
| Repair
 
| TBP
 
| TBP
| unlikely
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 575: Line 598:
 
| Repeat
 
| Repeat
 
| 0%
 
| 0%
| almost certainly
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 583: Line 606:
 
| Reverb
 
| Reverb
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 591: Line 614:
 
| Reverse
 
| Reverse
 
| 100%
 
| 100%
| probably
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 599: Line 622:
 
| Sliding Time Scale/Pitch Shift
 
| Sliding Time Scale/Pitch Shift
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 607: Line 630:
 
| Truncate Silence
 
| Truncate Silence
 
| varies by amount of silence
 
| varies by amount of silence
| possibly
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 615: Line 638:
 
| Wahwah
 
| Wahwah
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 623: Line 646:
  
 
=== Effect Menu below the line===
 
=== Effect Menu below the line===
 +
This set of commands could be seen as far less critical to trap then the Record and Save commands so could probably be ignored.
  
 
{| style="text-align: left" class="wikitable sortable"
 
{| style="text-align: left" class="wikitable sortable"
Line 635: Line 659:
 
| Adjustable Fade
 
| Adjustable Fade
 
| 100%
 
| 100%
| probably
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 643: Line 667:
 
| Clip Fix
 
| Clip Fix
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 651: Line 675:
 
| Crossfade Clips
 
| Crossfade Clips
 
| adds length of fade
 
| adds length of fade
| probably
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 659: Line 683:
 
| Crossfade Tracks
 
| Crossfade Tracks
 
| adds length of fade
 
| adds length of fade
| probably
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 667: Line 691:
 
| Delay
 
| Delay
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 675: Line 699:
 
| High Pass Filter
 
| High Pass Filter
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 683: Line 707:
 
| Limiter
 
| Limiter
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 691: Line 715:
 
| Low Pass Filter
 
| Low Pass Filter
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 699: Line 723:
 
| Notch Filter
 
| Notch Filter
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 707: Line 731:
 
| SC4
 
| SC4
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 715: Line 739:
 
| Spectral edit multi tool
 
| Spectral edit multi tool
 
| 100%
 
| 100%
| probably
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 723: Line 747:
 
| Spectral edit parametric EQ
 
| Spectral edit parametric EQ
 
| 95%
 
| 95%
| probably
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 731: Line 755:
 
| Spectral edit shelves
 
| Spectral edit shelves
 
| 100%
 
| 100%
| probably
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 739: Line 763:
 
| Studio Fade Out
 
| Studio Fade Out
 
| 100%
 
| 100%
| probably
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 747: Line 771:
 
| Tremolo
 
| Tremolo
 
| 100%
 
| 100%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 755: Line 779:
 
| Vocal Reduction and Isolation
 
| Vocal Reduction and Isolation
 
| 100%
 
| 100%
| yes
+
| maybe
|
 
| no
 
| no
 
| no
 
|-
 
| Vocal Remover
 
| 50%
 
| yes
 
 
|  
 
|  
 
| no
 
| no
Line 771: Line 787:
 
| Vocoder
 
| Vocoder
 
| 50%
 
| 50%
| yes
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 779: Line 795:
  
 
=== Analyze Menu ===
 
=== Analyze Menu ===
 +
This set of commands could be seen as far less critical to trap then the Record and Save commands so could probably be ignored.
  
 
{| style="text-align: left" class="wikitable sortable"
 
{| style="text-align: left" class="wikitable sortable"
Line 791: Line 808:
 
| Contrast
 
| Contrast
 
| TBP
 
| TBP
| probably
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 799: Line 816:
 
| Plot Spectrum
 
| Plot Spectrum
 
| TBP
 
| TBP
| probably
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 807: Line 824:
 
| Find Clipping
 
| Find Clipping
 
| TBP
 
| TBP
| probably
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 815: Line 832:
 
| Beat Finder
 
| Beat Finder
 
| TBP
 
| TBP
| probably
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 823: Line 840:
 
| Regular Interval Labels
 
| Regular Interval Labels
 
| TBP
 
| TBP
| almost certainly
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 831: Line 848:
 
| Sample Data Export
 
| Sample Data Export
 
| TBP
 
| TBP
| probably
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 839: Line 856:
 
| Silence Finder
 
| Silence Finder
 
| TBP
 
| TBP
| probably
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 847: Line 864:
 
| Sound Finder
 
| Sound Finder
 
| TBP
 
| TBP
| probably
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 855: Line 872:
  
 
=== Generate/Effect/Analyze Menus ===
 
=== Generate/Effect/Analyze Menus ===
 +
This set of commands could be seen as far less critical to trap then the Record and Save commands so could probably be ignored.
 +
 +
The generators are protected from storage space overrun by the fix(es) for Bug #437 (error message and clean-up)
  
 
{| style="text-align: left" class="wikitable sortable"
 
{| style="text-align: left" class="wikitable sortable"
Line 867: Line 887:
 
| Add / Remove Plug-ins
 
| Add / Remove Plug-ins
 
| varies
 
| varies
| almost certainly
+
| maybe
 
|  
 
|  
 
| no
 
| no
Line 873: Line 893:
 
| no
 
| no
 
|}
 
|}
 
 
  
 
==Details==
 
==Details==
TBP
+
A souped up progress dialog might be one way to implement this feature.  We can't always predict for sure how much space a change will take up.  A progress dialog can show a memory dial, and indicate if we look at risk of exhausting memory.  That way the complaint of a long operation failing can be addressed.  A user can see it may be borderline whether it will complete and fit or not, as the operation progresses.
  
  

Latest revision as of 09:11, 20 July 2019

Proposal pages help us get from feature requests into actual plans. This page is a proposal to increase Audacity's resilience to situations where disk over-run causes problems
Proposal pages are used on an ongoing basis by the Audacity development team and are open to edits from visitors to the wiki. They are a good way to get community feedback on a proposal.


  • Note: Proposals for Google Summer of Code projects are significantly different in structure, are submitted via Google's web app and may or may not have a corresponding proposal page.


The Problem

Bug #437 relates to this issue and is where it was originally reported. The fix for Bug #437 provides traps just as Audacity is about to run out of space for Recording, project Saves, and Exports - an error message is popped up and Audacity will clean up after such unsuccessful Saves or Exports. Recording will cleanly stop with a partial project.

We could be more helpful to the user by checking in advance that there is sufficient space for what the user is trying to do, popping an error/warning before starting the required action. This would avoid time wasted by a partial and aborted action. There is one place in Audacity where we currently do this and that is in Timer Record where checks are made that there is sufficient space for the required elapsed time of recording and an error is popped if not so.

We do still need the bug #437 traps as the ultimate safeguard.

  1. Although a recording that runs out of space now provides the user with a partial project, we could be more helpful by providing earlier warnings. There is the recording time left that shows in the Status bar - but we know that many people overlook the Status Bar
  2. The Save Project commands when running out of space only reports when the failure occurs (which could be many minutes later) - Audacity could check before starting the Save that there is sufficient space.
  3. Export too, when running out of space only reports when the failure occurs (which could be many minutes later) - Audacity could check before starting the Export that there is sufficient space.
  4. Import can easily be asked to import a data set that is too large for the available disk space.
  5. The Generate and Effect plug-ins are capable of generating large amounts of audio data with the potential for disk overrun, this is not handled cleanly.
  6. Copy & Paste and Repeat are also capable of generating large amounts of data.
  7. Even seemingly innocuous commands have the potential to produce sufficient data to overfill the disk.

Proposed Feature

A suitable headroom buffer to be defined - to especially avoid overfilling the user's main drive (C: in the case of Windows). This should be user-settable but deep in Preferences and with a sensible default of 50-100MB say.

  • For Recording activities:
    1. Check before recording starts that there is more space available than the headroom buffer
    2. While recording takes place check the available disk space
    3. If and when it reaches the headroom buffer size: Audacity stops with an error message
      • A three-level "traffic-light" green->amber->red warning could be provided ahead of reaching the headroom buffer


  • Save commands
    1. check that the volume of data to be created, based on current settings will not overfill the disk capacity minus the headroom buffer
    2. if so disallow the Save with a suitable error message and advise the user to free up some disk space and try again
    3. Particularly a problem if the user has not pre-saved the project and is occupying space in the Audacity Temp directory (which is only cleaned up after the Save is made)
    4. Particularly a problem too if the user has enough space for a Save but not a Save As - we may want to advise them to make a Save and then free up some disk space.


  • Export
    1. check that the volume of data to be created, based on current settings and exported file-type, will not overfill the disk capacity minus the headroom buffer
    2. if so disallow the export with a suitable error message


  • Import
    1. check that the volume of data, based on current settings and imported file-type, will not overfill the disk capacity minus the headroom buffer
    2. if so disallow the import with an error message


  • Generators and effects
    1. Check before the plug-in starts that there is more space available than the headroom buffer
    2. check that the volume of data, based on current settings, will not overfill the disk capacity minus the headroom buffer
    3. If we want to be really secure we would need to check as the plug-in progresses that we are not exceeding the headroom (in case the estimate was inaccurate) and if so stop the plug-in gracefully with an error message.


  • Copy & Paste
Neither of these commands appears to generate any noticeable extra disk occupancy, the assumption is that they are using pointers. However once you manipulate the copied data with an effect then the disk size occupancy does increase - but that should be trapped under Generators and effects above.


  • All other commands - in fact all commands
    1. Before the command is implemented in any way check that we have more available space than the headroom buffer.
    2. If not then inhibit the command and display an error message


  • Regular checking
    1. It may be beneficial that, while Audacity is idling, it makes periodic checks to see if disk-space is being eroded (by other applications) and if so display a suitable "out of space" error message that the user will see on their return to Audacity,

Developer/QA Backing

  • Peter: particularly for Record, Save, Export and Import commands as it would mean we could stop the command from even starting to implement if there would be insufficient space.

Use Cases

  • While recording, many users overlook the Status Bar time remaining messages, so would be surprised by an abrupt stop and the bug #437 error message.
  • The user could be many minutes into the Save of a large project, or an Export from it, only to have it aborted - thus wasting those minutes.

Tables for analysis and subsequent tracking

I would suggest that we use these tables to track the progess as part of Bug #437 rather than raising separate Bugzilla entries for each table entry (there are seventy of them).

File Menu

Command  % extra Needs trapping Assigned to Fixed Tested Resolved
New TBP  ??? no no no
Open depends on data size and settings almost certainly no no no
Close TBP  ??? no no no
Save Project may be a lot if Temp files in use Yes - critical no no #437 now has an error trap
Save Project As as much as the existing project Yes - critical no no #437 now has an error trap
Save Compressed Copy of Project Project TBP yes - probably critical no no #437 now has an error trap
Check Dependencies TBP  ??? no no no
Edit Metadata Tags TBP  ??? no no no
Import depends on file size & type almost certainly no no #437 now has an error trap
Export (various) file size calculable almost certainly no no #437 now has an error trap
Apply Chain TRICKY probably no no no
Edit Chains TBP probably no no no
Page Setup TBP  ??? no no no
Print TBP  ??? no no no

Edit Menu

Command  % extra Needs trapping Assigned to Fixed Tested Resolved
Cut TBP  ??? no no no
Delete TBP  ??? no no no
Copy none probably not no no no
Paste none probably not no no no
Duplicate calculable almost certainly no no no
Labelled Audio>Copy none probably not no no no

Transport Menu

Command  % extra Needs trapping Assigned to Fixed Tested Resolved
Record open-ended yes - critical bug #437 ongoing yes #437 now has an error trap
Timer Record calculable yes - critical Mark Young Yes setup trap ok warning on setup ok and in 2.1.3
Timer Record (Export) calculable yes - critical not assigned no no no
Record New Track open-ended yes - critical Bug #437 ongoing yes #437 now has an error trap

Tracks Menu

This set of commands could be seen as far less critical to trap then the Record and Save commands so sould probably be ignored.

Command  % extra Needs trapping Assigned to Fixed Tested Resolved
Stereo Track to Mono probably calculable maybe no no no
Mix and Render probably calculable maybe no no no
Mix and Render to new Track probably calculable maybe no no no
Resample probably calculable maybe no no no

Generate Menu

This set of commands could be seen as far less critical to trap then the Record and Save commands so could probably be ignored.

Command  % extra Needs trapping Assigned to Fixed Tested Resolved
Chirp calculable maybe no no no
DTMF Tone calculable maybe no no no
Noise calculable maybe no no no
Silence calculable maybe no no no
Tone calculable maybe no no no
Click Track calculable maybe no no no
Pluck calculable maybe no no no
Risset Drum calculable maybe no no no

Effect Menu

This set of commands could be seen as far less critical to trap then the Record and Save commands so could probably be ignored.

Command  % extra Needs trapping Assigned to Fixed Tested Resolved
Amplify 100% maybe no no no
Auto Duck TBP maybe no no no
Bass & Treble 107% - used more while working maybe no no no
Change Pitch 100% maybe no no no
Change Speed varies with % change maybe no no no
Change Tempo varies with % change maybe no no no
Click Removal varies maybe no no no
Compressor 100% maybe no no no
Echo 100% maybe no no no
Equalization 100% maybe no no no
Fade In 100% maybe no no no
Fade Out 100% maybe no no no
Invert 100% maybe no no no
Leveller 100% maybe no no no
Noise Reduction 100% maybe no no no
Normalize 100% maybe no no no
Nyquist Prompt  ???  ??? no no no
Paulstretch massive maybe no no no
Phaser 100% maybe no no no
Repair TBP maybe no no no
Repeat 0% maybe no no no
Reverb 100% maybe no no no
Reverse 100% maybe no no no
Sliding Time Scale/Pitch Shift 100% maybe no no no
Truncate Silence varies by amount of silence maybe no no no
Wahwah 100% maybe no no no

Effect Menu below the line

This set of commands could be seen as far less critical to trap then the Record and Save commands so could probably be ignored.

Command  % extra Needs trapping Assigned to Fixed Tested Resolved
Adjustable Fade 100% maybe no no no
Clip Fix 100% maybe no no no
Crossfade Clips adds length of fade maybe no no no
Crossfade Tracks adds length of fade maybe no no no
Delay 100% maybe no no no
High Pass Filter 100% maybe no no no
Limiter 100% maybe no no no
Low Pass Filter 100% maybe no no no
Notch Filter 100% maybe no no no
SC4 100% maybe no no no
Spectral edit multi tool 100% maybe no no no
Spectral edit parametric EQ 95% maybe no no no
Spectral edit shelves 100% maybe no no no
Studio Fade Out 100% maybe no no no
Tremolo 100% maybe no no no
Vocal Reduction and Isolation 100% maybe no no no
Vocoder 50% maybe no no no

Analyze Menu

This set of commands could be seen as far less critical to trap then the Record and Save commands so could probably be ignored.

Command  % extra Needs trapping Assigned to Fixed Tested Resolved
Contrast TBP maybe no no no
Plot Spectrum TBP maybe no no no
Find Clipping TBP maybe no no no
Beat Finder TBP maybe no no no
Regular Interval Labels TBP maybe no no no
Sample Data Export TBP maybe no no no
Silence Finder TBP maybe no no no
Sound Finder TBP maybe no no no

Generate/Effect/Analyze Menus

This set of commands could be seen as far less critical to trap then the Record and Save commands so could probably be ignored.

The generators are protected from storage space overrun by the fix(es) for Bug #437 (error message and clean-up)

Command  % extra Needs trapping Assigned to Fixed Tested Resolved
Add / Remove Plug-ins varies maybe no no no

Details

A souped up progress dialog might be one way to implement this feature. We can't always predict for sure how much space a change will take up. A progress dialog can show a memory dial, and indicate if we look at risk of exhausting memory. That way the complaint of a long operation failing can be addressed. A user can see it may be borderline whether it will complete and fit or not, as the operation progresses.


GUI Examples

TBP


Previous Feature Requests relating to this proposal

  • Disk use limit for recording (11 votes)
    • Option to Disable (1 votes)
  • Disk space check before exporting: (16 votes) - including indication of expected size of export, and choice to export partial file or cancel if insufficient space available. Would stop user exporting WAV files over the 2/4 GB limit, MP3s in excess of ringtone limits etc.
      Could only indicate that space was available at time of checking, could never guarantee the file would be completed if other disk events occurred. However Audacity 2.x does now have a warning if WAV/AIFF exports are not completed.