Bugzilla – Bug 772
Entering -99.999 percent in Change Speed causes crash
Last modified: 2018-08-20 11:45:40 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.
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?
Created attachment 515 [details] Limit time stretch from -99 t0 +3000%
(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.
Created attachment 516 [details] Limit time stretch from -99 t0 +3000%
(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.
(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.
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.
Thanks, Steve. Yes, fixed I can't enter or paste -99.999 percent and apply the effect on any platform.