Bugzilla – Bug 2458
Possible crash when clearing text field in Gain dialog
Last modified: 2020-05-29 10:04:25 UTC
This was reported here: https://github.com/audacity/audacity/issues/541 As you can see from that report James and I have had a heck of a time recreating the crash. I did it once, but could not again. However, I do know why and Marco provided the clue: When the requester named "Gain" come up don't click in the edit gadget but leave the "0" high lighted and press the backspace key. Another effect I see sometimes is the "-nan" string in the Gain numeric edit request. With this information, I have been able to recreate the crash, or at least, a similar one. I'll put an explanation in the source, but it boils down to an uninitialized variable.
Fix committed in: https://github.com/audacity/audacity/commit/8ae8e0f This one will be nearly impossible for QA to test. We'll have to depend on code review and/or James/Paul/Steve to try simulating it. Gents, to do that, checkout 8ae8e0f~1 and change line 325 to: double value = NAN; This will cause a crash when you delete the value in the text field because the slider tries to adjust to NAN, which it can't. This has been a problem since: commit 8f09785da985677c241c8b38e947b02a88eb4bbd Author: llucius <llucius@47890b92-0858-11df-a26f-8b716316a5bc> Date: Fri Jul 14 03:25:08 2006 +0000 Corrects handling of values in SliderDialog
(In reply to Leland Lucius from comment #1) I'm not able to reproduce the crash prior to the fix even if I set double value = NAN; Though I do observe the slider jumping to the left in this case. I also tried with double value = std::numeric_limits<double>::infinity(); which makes the slider jump to the right, but no crash. These tests were with a Release build. After the fix, if I set double value = NAN; then I observe that the slider behaves better (the slider does not jump). All looks good. This looks fixed to me, but it would be good for confidence if someone that can produce the crash could also do a quick test.
RESOLVED FIXED. Confirmed fixed by the original reporter. https://github.com/audacity/audacity/issues/541