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

Audacity Bugzilla



Bug 2490 - With an empty rules list in "Extended Import" prefs - Left or Right arrow crashes Audacity
With an empty rules list in "Extended Import" prefs - Left or Right arrow cra...
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Application Core
2.4.2
Per OS All
: P2 RepeatableAll
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-06-22 08:29 UTC by Peter Sampson
Modified: 2020-08-18 15:55 UTC (History)
8 users (show)

See Also:
Steps To Reproduce:
1) clear the audacity settings folder 2) Preferences > Extended Import 3) Tab twice to get into the "File Extensions" table which is empty (or click in it) 4) Press Left or Right arrow 5) Observe Audacity crashes
Release Note:
Group: Preferences *With an empty rules list in "Extended Import" prefs using Left or Right arrow to attempt to navigate crashes Audacity
First Git SHA:
Group: ---
Workaround:
Closed: 2020-08-18 00:00:00
petersampsonaudacity: Accessibility+
petersampsonaudacity: Regression+
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac+
stevethefiddle: Test‑OK‑Lin+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Sampson 2020-06-22 08:29:36 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
Comment 1 Peter Sampson 2020-06-22 08:35:43 UTC
And it's worse on Mac as I get the spinning beachball-of-death.
Comment 2 Peter Sampson 2020-06-22 08:54:19 UTC
(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.
Comment 3 Leland Lucius 2020-06-22 09:03:36 UTC
> This is a close cousin of P1 Bug #2478 which we fixed for 2.4.2

And the fix would be exactly the same.
Comment 4 Leland Lucius 2020-06-22 09:11:44 UTC
(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
Comment 6 Peter Sampson 2020-06-29 12:42:46 UTC
(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).
Comment 7 Peter Sampson 2020-06-29 12:46:20 UTC
(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
Comment 8 Steve Daulton 2020-08-18 15:55:31 UTC
Works for me on Linux.