Applying an effect to one clip also applies envelope from other clip to the first clip in the track

I’m currently running Audacity 3.0.2 installed from this PPA on Ubuntu 18.04.6 LTS. (I plan to update to a more recent version of audacity, but haven’t gotten around to it yet). Today I came across a strange scenario where applying an effect (change pitch) to the last clip in a particular track seems to also apply the envelope from one of the middle clips to the first clip in the track. In fact, I was able to reproduce it with the following steps:

  1. Open a new audacity project and add a mono track
  2. Use “Generate” > “Tone…” to generate 2 seconds of A 440.
  3. Copy the clip twice
  4. Alter the middle clip with the envelope tool to make it look clearly different
  5. To the last clip, apply “Effect” > “Change Pitch…” with “half-steps” set to -12 (not sure if this is required, it just happens to be the effect and settings I was messing with).
  6. Note that the first clip now has the same envelope shape (and also sounds the same) as the second clip.

In the original more complicated project, there were many clips and only one had been altered with the envelope tool. I only did a little bit of experimenting but it seemed like applying the effect to any of the clips after the one with the envelope tool applied to it caused the same envelope to be applied to the first clip.

This bug is odd enough that I wanted to post about it in case it’s still around in a more recent audacity version.

I’ll attach a copy of the reproducing project before and after applying the effect, in case that’s useful.
bug-after.aup3 (960 KB)
bug-setup.aup3 (640 KB)

I think you are observing an example of this bug: https://github.com/audacity/audacity/issues/1529
The bug is fixed in the current version of Audacity (3.1.3).

Audacity 3.1.3 is available as an AppImage for Linux, from the main Audacity website: https://www.audacityteam.org/download/

I cannot reproduce this on W10 with 3.1.3 - nor on the latest alpha test build U have for the upcoming 3.2.0

Peter.