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

Audacity Bugzilla



Bug 772 - Entering -99.999 percent in Change Speed causes crash
Entering -99.999 percent in Change Speed causes crash
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Built-in FX
unspecified
Per OS All
: P4 Repeatable
Assigned To: Default Assignee for New Bugs
: patch_closed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-20 01:02 UTC by Steve Daulton
Modified: 2018-08-20 11:45 UTC (History)
5 users (show)

See Also:
Steps To Reproduce:
Select 10 seconds or more of audio and apply Change Speed effect with percentage change typed as -99.999. On OK, Audacity crashes.
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00


Attachments
trap percentage input to defined range (845 bytes, patch)
2014-10-20 01:02 UTC, Steve Daulton
Details | Diff
Limit time stretch from -99 t0 +3000% (2.61 KB, patch)
2014-10-22 19:59 UTC, Steve Daulton
Details | Diff
Limit time stretch from -99 t0 +3000% (1.82 KB, patch)
2014-10-22 20:47 UTC, Steve Daulton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Daulton 2014-10-20 01:02:35 UTC
Created attachment 514 [details]
trap percentage input to defined range

Reported on feedback@ for Windows 7.
Repeatable on Linux

Although the slider is limited to a sensible range of -99.0 to +400 %, larger
and smaller values may be entered by typing, which can cause silly results,
such as output of hundreds of hours duration.

The attached patch traps values outside of the defined range (-99 to +400 %).

Patch tested only on Linux.
Comment 1 Gale Andrews 2014-10-20 14:09:04 UTC
Thanks, Steve. The crash occurs on Mac too. The patch builds on Windows. 

Personally I much prefer the solution adopted for Change Pitch where values outside those permitted grey the OK button, rather than let the user enter a value to find (if they reopen the effect) that their entered value was silently limited. 

In particular, is there any reason to limit the maximum Change Speed to +400%?  Greater speedups may be wanted and don't seem unsafe. Change Pitch has a PERCENTCHANGE_MAX_TEXT of 3000.0 (as well as enforced minimum of -99%). 

While we're here, should Change Tempo have the same enforced minimum as Change Pitch and Change Speed?
Comment 2 Steve Daulton 2014-10-22 19:59:56 UTC
Created attachment 515 [details]
Limit time stretch from -99 t0 +3000%
Comment 3 Steve Daulton 2014-10-22 20:00:32 UTC
(In reply to comment #1)
Gale wrote:
> Personally I much prefer the solution adopted for Change Pitch where values
> outside those permitted grey the OK button.
OK

> In particular, is there any reason to limit the maximum Change Speed to +400%? 
3000 seems OK as a maximum.

> While we're here, should Change Tempo have the same enforced minimum as Change
Pitch and Change Speed?
OK.

All three effects should now be consistent in having a minimum of -99% and a maximum of 3000%, with OK and Preview greyed out beyond that range.
Comment 4 Steve Daulton 2014-10-22 20:47:54 UTC
Created attachment 516 [details]
Limit time stretch from -99 t0 +3000%
Comment 5 Steve Daulton 2014-10-23 12:13:20 UTC
(In reply to comment #4)
This patch (id 516) affects only "Change Tempo".
If this works as required then I'll apply the same fix to "Change Speed".

I'm making other changes to "Change Speed" and the proposed fix involves the same code, so the fix for Change Speed would be best applied after some of the other changes have been committed.

The previous version (id 515) fixes both Change Tempo and Change Speed, but the fix for Change Speed will need to be changed as a result of the other changes that I'm making.
Comment 6 Steve Daulton 2014-12-10 11:47:21 UTC
(In reply to comment #5)
New version of Change Speed does not crash.

There is still a problem (freeze) for Change Tempo on Linux because bug 773 allows out of range values to be applied even when OK button is greyed out.
Comment 7 Steve Daulton 2015-03-12 09:37:54 UTC
I think this is resolved (as a result of bug 773 being fixed).
I've marked it as "fix made" because of the 773 fix.
Comment 8 Gale Andrews 2015-03-12 14:35:31 UTC
Thanks, Steve. Yes, fixed I can't enter or paste -99.999 percent and apply the effect on any platform.