Skip to content

Trackpanel: Fix random scrolling on selection - #10011

Merged
kryksyh merged 2 commits into
audacity:audacity3from
iv-m:trackpanel-fix-random-scrolling-on-selection
Dec 8, 2025
Merged

kryksyh merged 2 commits into
audacity:audacity3from
iv-m:trackpanel-fix-random-scrolling-on-selection

Conversation

@iv-m

@iv-m iv-m commented Dec 6, 2025

Copy link
Copy Markdown
Contributor
  • I signed CLA
  • The title of the pull request describes an issue it addresses
  • If changes are extensive, then there is a sequence of easily reviewable commits
  • Each commit's message describes its purpose and effects
  • There are no behavior changes unnecessary for the stated purpose of the PR

Recommended:

  • Each commit compiles and runs on my machine without known undesirable changes of behavior

QA:

  • Autobot test cases have been run

Commit 32e5e34 introduced
new members to TrackPanel class, mIsPanning and mLastPanX,
but they were not initialized when TrackPanel instances were
constucted. Because of this, mIsPanning could be initialized
to something true-ish, which manifested itself as scrolling
to random place when trying to select part of the track in my
Audacity builds.

Fixes: 32e5e34
Signed-off-by: Ivan A. Melnikov <[email protected]>
vt-alt pushed a commit to altlinux/specs that referenced this pull request Dec 7, 2025
- Fix random scrolling on selection bug
  (upstream PR: audacity/audacity#10011)
@DavidBailes

Copy link
Copy Markdown
Collaborator

I can reproduce the problem on the debug version on Windows. I either get the selection bug, or the program crashes.
I can't reproduce the problem on the release version.

@iv-m

iv-m commented Dec 8, 2025

Copy link
Copy Markdown
Contributor Author

Well, as it is often the case with uninitialized variables in C++, reproducing the issue depends on compiler options, OS settings and sheer luck.

With my own build of Audacity 3.7.6 on x86_64 Linux I can reproduce the scrolling bug ~70% of times, and I've seen no crashes. And I could not reproduce the bug with this change applied as a patch.

@AJenbo, @kryksyh, could you please take a look?

@AJenbo

AJenbo commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

Sorry for missing this, thanks for patching it.

@kryksyh
kryksyh changed the base branch from release-3.7.6 to audacity3 December 8, 2025 17:17
@kryksyh

kryksyh commented Dec 8, 2025

Copy link
Copy Markdown
Member

@iv-m thanks for the fix, v3.7.6 is already out, please rebase on audacity3 branch.

@kryksyh
kryksyh merged commit 7b6641c into audacity:audacity3 Dec 8, 2025
@iv-m

iv-m commented Dec 8, 2025

Copy link
Copy Markdown
Contributor Author

@iv-m thanks for the fix, v3.7.6 is already out, please rebase on audacity3 branch.

Sorry, I somehow missed audacity3 branch.

Thank you for the merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants