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

Audacity Bugzilla



Bug 2526 - Mac: multi-projects inhibit label text creation
Mac: multi-projects inhibit label text creation
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Labels
3.0.0
All All
: P2 RepeatableAll
Assigned To: Default Assignee for New Bugs
: Multiproject
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-08-23 07:15 UTC by Peter Sampson
Modified: 2020-09-25 04:38 UTC (History)
8 users (show)

See Also:
Steps To Reproduce:
1) launch Audacity 2) get some audio 3) create a label (select some audio, Cmd+B) 4) type some text into it 5) observe label with text is created properly 5) Cmd+N to open a new second project 6) return to first project 7) create a label (select some audio, Cmd+B) 8) Try to write text in it 9) Observe: you can't
Release Note:
Group: Labels *On Mac if you have more than one project open you may find that although labels can be created you may not be able to type text into them.
First Git SHA:
Group: ---
Workaround:
Close the other open projects - then the new label can be typed into
Closed: 2020-09-25 00:00:00
petersampsonaudacity: Regression+
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Win+
petersampsonaudacity: Test‑OK‑Mac+
petersampsonaudacity: Test‑OK‑Mac+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Sampson 2020-08-23 07:15:09 UTC
This is a regression on 2.3.2 on Mac - does not occur on Windows, so assume Mac-only for now (but as-yet un-tested on Linux)

What appears to happen at Step 9 is that Audacity is treating the text as keyboard shortcuts e.g typing a "c" will result in a play cut preview of a "space" will result in Playback occurring.

Not only is project-1 affected by this it also seems to affect project-2 as well
Comment 1 Paul L 2020-09-03 12:22:23 UTC
Specify how you "create a label."  I select some time and use command+B.

Does this seriously merit P1 when picking with the mouse is the easy remedy?

I also find switching to some other application with command+TAB and then back again to Audacity puts the focus in the right place.
Comment 2 Peter Sampson 2020-09-03 13:20:25 UTC
(In reply to Paul L from comment #1)
>Specify how you "create a label."  I select some time and use command+B.
In the normal way by selecting some audio and using Ctrl+B


>Does this seriously merit P1 
It's P1 because it's a regression


>when picking with the mouse is the easy remedy?
I cannot click with the mouse to facilitate typing in the second label.

If I click in the first label and then back in the new label I still cannot type in the second label.

If I shift focus to the empty second project and then back to the first project I still cannot type in the second label. 

If I close the second project and return to the first project then I can type in the new label


>I also find switching to some other application with command+TAB and then back again to Audacity puts the focus in the right place.
Yes if I do this then I can type in the new label (even with the second project left open)
Comment 3 Peter Sampson 2020-09-03 13:23:03 UTC
BTW these are the simplest steps to reproduce that I could find - further testing shows that project 1 can also affect/inhibit label typing in project 2.

Putting yourself in the user;s shoes it's quite bewildering as to why you can't type the label text - and the workarounds are not obvious.  You certainly shouldn't have to unnecessarily close your second project.
Comment 5 Peter Sampson 2020-09-04 12:12:30 UTC
Tested on macOS 10,15.6 Catalina with Audacity 3.0.0 a10a1b8

The label at step 8 can now be typed into - looks to be fixed
Comment 6 Paul L 2020-09-05 12:01:14 UTC
Please re-verify after commit 80cf77eb19e617d3058030f73bfa5a9eeef7fa5a
Comment 7 Peter Sampson 2020-09-05 12:26:53 UTC
(In reply to Paul L from comment #6)
Retested on Mac macOS 10.15.6 Catalina with Audacity 3.0.0 80cf77e

All still tests OK.

An I also sanity tested on W10 with Audacity 3.0.0 80cf77e
Comment 8 David Bailes 2020-09-08 08:29:53 UTC
(In reply to Paul L from comment #4)
> Fixed at
> https://github.com/audacity/audacity/commit/
> d66ffaa4cec7fa77ac1a6de1fe99170796414da9

This(and the subsequent correction) is not a good fix for this bug, as it creates new bugs. Please could you revert this fix.

Details:
A control should only capture the keyboard when it is the focus. Not following this has lead to introducing new bugs. A couple of examples on Windows:
Example one:
1. Create a project containing an audio track with some audio in it.
2. Set the focus to one of the time controls in the selection bar.
3. Press ctrl+N to open a new project.
4. Move back to the original project. The focus is still one of the time controls. This is correct.
5. Press the home or end keys. This should move to the first or last digit in the control, but actually moves the cursor.

Example two:
1. Create a project containing a label track.
2. In preferences:track behaviours, ensure that "type to create a label" is enabled.
3. Set the focus to one of the time controls in the selection bar.
4. Press Ctrl + N to open a new project.
5. Move back to the original project. The focus is still one of the time controls. Again, this is correct.
6. Press a number key. This should enter a digit in the time control, but actually creates a new label.

From comments on this bug, it sounds like there is a focus problem on Mac.
On Windows, void ProjectWindow::OnActivate(wxActivateEvent & event) successfully deals with the focus in this case. I presume that this isn't the case on Mac.
Comment 9 Peter Sampson 2020-09-20 10:07:47 UTC
As this is a Mac-only bug (and part of the Multi-Project-Wormcan) and in view of an easy workaround and a Release note- in spite of the regression on 2.3.2 I am going to regrade this as P2 (and I think it's really marginal P3).
Comment 10 Leland Lucius 2020-09-20 13:43:46 UTC
(In reply to Peter Sampson from comment #9)
> As this is a Mac-only bug (and part of the Multi-Project-Wormcan) and in
> view of an easy workaround and a Release note- in spite of the regression on
> 2.3.2 I am going to regrade this as P2 (and I think it's really marginal P3).

Actually, it's no longer a Mac only bug. Following David's steps in comment #8, it show that Windows (at least) is now affected also.
Comment 11 Peter Sampson 2020-09-24 09:27:26 UTC
Leland wrote to me off-list

>What am I doing wrong?!?!  I can’t get the original steps for 2526 to work.  
>At step 8, I’m always able to type a label. 

So I retested on macOS 10.15.6 Catalina and W10 with Audacity 3.0.0 05a389f

I cannot get this to fail
a) not with the steps
b) not with multiple labeling in multiple open(ed) projects

Accordingly I am going to close this.

If David still feels there is a residual based on the way this bug has been fixed then that needs to be raised as a new bug (but linked back to this one).
Comment 12 David Bailes 2020-09-24 10:02:13 UTC
(In reply to Peter Sampson from comment #11)
> Leland wrote to me off-list
> 
> >What am I doing wrong?!?!  I can’t get the original steps for 2526 to work.  
> >At step 8, I’m always able to type a label. 
> 
> So I retested on macOS 10.15.6 Catalina and W10 with Audacity 3.0.0 05a389f
> 
> I cannot get this to fail
> a) not with the steps
> b) not with multiple labeling in multiple open(ed) projects
> 
> Accordingly I am going to close this.
> 
> If David still feels there is a residual based on the way this bug has been
> fixed then that needs to be raised as a new bug (but linked back to this
> one).

Please do not close this bug. See my comment 8.
The current fix creates new bugs on Windows. A fix which creates new bugs is not a suitable fix. It is a waste of time have to work out all the bugs created by this fix and then log them.
Comment 13 David Bailes 2020-09-24 10:20:45 UTC
(In reply to David Bailes from comment #12)
> (In reply to Peter Sampson from comment #11)
> > Leland wrote to me off-list
> > 
> > >What am I doing wrong?!?!  I can’t get the original steps for 2526 to work.  
> > >At step 8, I’m always able to type a label. 
> > 
> > So I retested on macOS 10.15.6 Catalina and W10 with Audacity 3.0.0 05a389f
> > 
> > I cannot get this to fail
> > a) not with the steps
> > b) not with multiple labeling in multiple open(ed) projects
> > 
> > Accordingly I am going to close this.
> > 
> > If David still feels there is a residual based on the way this bug has been
> > fixed then that needs to be raised as a new bug (but linked back to this
> > one).
> 
> Please do not close this bug. See my comment 8.
> The current fix creates new bugs on Windows. A fix which creates new bugs is
> not a suitable fix. It is a waste of time have to work out all the bugs
> created by this fix and then log them.

Just to clarify: the examples of bugs on Windows introduced by the fix given in comment 8 are new bugs - they are not residuals. And there may well be others which I haven't thought of yet.
Comment 14 Leland Lucius 2020-09-24 12:07:07 UTC
I'm still digging into this, but, even after removing Paul's fix the symptoms have definitely changed.  I just need to bisect it to figure out what really did "fix" it.

So, reopening for now...
Comment 15 Leland Lucius 2020-09-24 14:45:47 UTC
I have no idea why, but Paul's fix for bug #2531 seems to have fixed this one as well.  I'll revert the below fix for this bug to give other's a chance to test again.

And here's some simplified steps:

1) Start Audacity
2) CMD+B (new label)
3) Type some label text
4) CMD+N (new project)
5) CMD+` (back to 1st project)
6) CMD+B (new label)
7) Type some label text

Prior to the fix for bug #2531, the behavior is as described above...unable to type anything at step 7.  After that fix, you can type label text as expected at step 7.
Comment 16 Peter Sampson 2020-09-25 04:32:43 UTC
(In reply to Leland Lucius from comment #15)
testing (yet again!) on W10 with Audacity 3.0.0 528d04c

Works fine
Comment 17 Peter Sampson 2020-09-25 04:37:33 UTC
(In reply to Peter Sampson from comment #16)
(In reply to Leland Lucius from comment #15)
testing (yet again!) on macOS 10.15.6 Catalina with Audacity 3.0.0 528d04c

Works fine

Accordingly I shall close this off again