Bugzilla – Bug 2490
With an empty rules list in "Extended Import" prefs - Left or Right arrow crashes Audacity
Last modified: 2020-08-18 15:55:31 UTC
With an empty rules list in "Extended Import" prefs - Left or Right arrow crashes Audacity Affects both Windows and Mac so assume all. On Mac I had to press the arrow keys a couple/a few times - on Windows just one press This is a regression on 2.4.1 where with same steps the L/R arrow keys are just ignored. On Windows with 2.3.3 a debug message is generated which can be dismissed and no crash ensues - on Mac with 2.3.3 the L/R arrows are just ignored. In spite of the crash I am rating this as P2 (but it is a marginal P1) as navigating in an empty table seems a little unusual and a bit pointless. This is a close cousin of P1 Bug #2478 which we fixed for 2.4.2
And it's worse on Mac as I get the spinning beachball-of-death.
(In reply to Peter Sampson from comment #0) The original catcher of this bug wrote on the Devel email list >I agree that those specific keystrokes seem pointless. That’s the problem! > >If my computer tells me there is a table then I’ll do whatever I can to read >the information in the table. Normally my screen readers (NVDA and JAWS) will >tell me if the table is empty and the program won’t crash when normal keyboard >only table navigation is used – even if the table IS empty.
> This is a close cousin of P1 Bug #2478 which we fixed for 2.4.2 And the fix would be exactly the same.
(In reply to Leland Lucius from comment #3) > > This is a close cousin of P1 Bug #2478 which we fixed for 2.4.2 > > And the fix would be exactly the same. diff --git a/src/widgets/Grid.cpp b/src/widgets/Grid.cpp index 05eb6de19..a3ac65bd5 100644 --- a/src/widgets/Grid.cpp +++ b/src/widgets/Grid.cpp @@ -542,6 +542,11 @@ void Grid::OnKeyDown(wxKeyEvent &event) int crow = GetGridCursorRow(); int ccol = GetGridCursorCol(); + // Empty grid? + if (crow == -1 && ccol == -1) { + return; + } + if (event.GetKeyCode() == WXK_LEFT) { if (crow == 0 && ccol == 0) { // do nothing
DEVEL - FIX MADE https://github.com/audacity/audacity/commit/639a82a4a0d901f37d0adb917d3e18b8e24b1bef
(In reply to James Crook from comment #5) Testing on W10 with Audacity 3.0.0 639a82a This now works fine with no crash when using the left/right arrows in the empty field (checked the up/down arrows too).
(In reply to James Crook from comment #5) Testing on macOS 10.15.5 Catalina with Audacity 3.0.0 639a82a Works fine on Mac too with no crash
Works for me on Linux.