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

Audacity Bugzilla



Bug 2314 - Zoom in fail when playing
Zoom in fail when playing
Status: RESOLVED QUICKFIXED
Product: Audacity
Classification: Unclassified
Component: User Interface
2.4.0
Per OS All
: P1 RepeatableAll
Assigned To: Paul L
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-02-09 05:38 UTC by James Crook
Modified: 2020-02-26 05:48 UTC (History)
6 users (show)

See Also:
Steps To Reproduce:
1. Create a 20 min mono chirp. 2. Start playing from the beginning. 3. Whilst still playing, press the zoom in button twice. Observe: A: The play cursor moves to reflect the increased zoom, but the waveform does not update to change its zoom. As a result the play cursor is on the wrong place in the chirp.
Release Note:
First Git SHA: 52ff705b0dff568512b6c6016936b78311c56a69
Group: ---
Workaround:
Closed:
james.k.crook: Must‑Test‑All‑OS+
james.k.crook: Quickfix‑Requested+
james.k.crook: 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 James Crook 2020-02-09 05:38:16 UTC
This bug is also in 2.3.3.
Comment 1 Peter Sampson 2020-02-09 06:54:07 UTC
(In reply to James Crook from comment #0)
It is a regression on 2.3.2 

where it works properly as expected with the waveform updating correctly with the zoom
Comment 2 James Crook 2020-02-09 06:55:19 UTC
Likely to be due to 'improvements' that do things in the OnIdle event.  Except during play we are not idle...
Comment 3 Paul L 2020-02-13 13:25:15 UTC
(In reply to James Crook from comment #2)

Not a correct inference.  During play, other threads do most of the work, and the main thread is indeed idle, waiting in its event loop most of the time, but redrawing sometimes in response to timer events.
Comment 4 Cliff Scott 2020-02-18 16:43:58 UTC
Test on macOS 10.14.6, commit: b42341

Cannot duplicate using keyboard zoom or the Zoom tool and repeated clicks on the track. Is there another Zoom button that you use Peter?
Comment 5 Paul L 2020-02-18 18:36:16 UTC
I reproduced this clicking on the toolbar button with a + magnifier icon.  Maybe it doesn't reproduce the other ways, but there is definitely a bug that I bisected to the indicated commit.
Comment 6 Cliff Scott 2020-02-18 18:45:49 UTC
Hmmm. Still works fine using the toolbar magnifing glass + icon with a build I just did now. Very strange!!!!
Comment 7 Peter Sampson 2020-02-19 06:40:50 UTC
(In reply to Cliff Scott from comment #6)
I've just been resting P1 bugs following Paul's recent P1 review.

And Now I find this working fine on Mac with Audacity 2.4.0 f13e53e (Iyt fails on 2.3.3 and is fine on 2.3.2).

On W10 it still fails on 2.4.0 Audacity 2.4.0 b423413 latest working build I have from earlier yesterday.  It fails on W10 on 2.3.3 to and works fine on W10 on 2.3.2

Do we know what the situation is on Linux - is this just a Windows bug now ?
Comment 8 Steve Daulton 2020-02-19 18:33:06 UTC
(In reply to Peter Sampson from comment #7)
On Linux with 2.4.0 (commit 3ba5f69089) the bug as described in "Steps to reproduce" occurs.

"1. Create a 20 min mono chirp.
2. Start playing from the beginning.
3. Whilst still playing, press the zoom in button twice.

Observe:
A: The play cursor moves to reflect the increased zoom, but the waveform does not update to change its zoom.  As a result the play cursor is on the wrong place in the chirp."


B: When the cursor finally reaches the right hand edge of the track window, the waveform scrolls and the view is correct.
Comment 9 David Bailes 2020-02-25 08:58:27 UTC
In the commit: 52ff705b0dff568512b6c601

In ProjectWindow::ZoomInByFactor(), the line trackPanel.Refresh(false); was removed after the call to ScrollIntoView().
However, ScrollIntoView() only calls trackPanel.Refresh(false) if it scrolls, so when it doesn't, the waveform doesn't get redrawn after the zoom in.
Comment 10 Paul L 2020-02-25 09:42:10 UTC
Thanks, David, for that diagnosis.

I fixed it at:

https://github.com/audacity/audacity/commit/72ece7d9bf5fe8cd8c8f84d3aa1c463640f84f8a

Being careful not to reintroduce a dependency cycle
Comment 11 Peter Sampson 2020-02-25 13:31:33 UTC
(In reply to Paul L from comment #10)
Testing on W10 and macOS 10.15.3 with Audacity 2.4.0 c1ce3c7

This now zooms correctly while playing on both platforms
Comment 12 Steve Daulton 2020-02-26 05:48:15 UTC
Works for me.