Page MenuHome

VSE: Additional copy of audio strip appears in memory after undoing when using proxy and splitting
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Linux-4.9.0-12-amd64-x86_64-with-debian-9.12 64 Bits
Graphics card: Gallium 0.4 on AMD KAVERI (DRM 2.49.0 / 4.9.0-12-amd64, LLVM 3.9.1) X.Org 4.3 (Core Profile) Mesa 13.0.6

Blender Version
Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-07-10 20:07, hash: rBd2b910fafec6
Worked: (newest version of Blender that worked as expected)

Short description of error
This annoying bug with audio strips seems to affect Linux systems only. At first I thought that it's random, but then I noticed that it appears right after using undo. After several hours of investigating I narrowed down its cause to 3 triggers that have to be used together: using proxy, splitting movie strips and then using undo.
I recorded a screencast with the steps to reproduce the bug:
http://neoncipher.net/blender-audio-bug.mp4
I hope my amateur investigation will help to find the root of the problem.

Exact steps for others to reproduce the error
This bug is hard to reproduce, so please follow these steps strictly without doing any additional clicks/commands, on Linux. With those steps I managed to get the bug every single time.
If you mess the steps, it's necessary to restart Blender and start from the beginning. Do not use undo, except when it's in the steps:

  1. Add a movie strip (http://neoncipher.net/example.mp4)
  2. Set the end frame so that the strips fit in the range entirely.
  3. Select the video strip
  4. Set and generate 25% size proxy
  5. Go to the preview window and activate 25% size proxy
  6. We want to split both video and audio strips in half. Click in the sequencer to place the timeline somewhere in the middle of the strips and select the audio strip as well.
  7. Select Strip --> Split or press K
  8. Now we need to do some action to undo it later. In my example I add gamma cross, but it can be some other things. Although not every action seems to lead to the bug appearance, so, again, stick to these steps.
  9. Select the second half of the video strip and move it to the channel above, overlapping with the first half of around 200 frames.
  10. Select the first half of the video strip, then the second half and choose Add --> Transition --> Gamma Cross
  11. Now undo several times in a row using Ctrl+Z without clicking or pressing anything else, until the second half gets to its original place.
  12. What we got now is an additional invisible copy of the second half of the audio strip sitting in the memory. If you play the second half of the audio, you can notice that it got twice as loud because it's actually two identical audio strips playing at the same time. To reveal the invisible strip clearer, you can grab the visible second half and move it some frames to the right, so when you play, it will generate some echo because the visible and invisible strips would be playing with some delay between them. Or you can delete the visible second half of the audio and hear the invisible one still playing when there is no audio strips visible at all. Maybe it's the first part of the strip but overlapping the second one? Because when you use split it affetively creates a copy of the strip that has new strip offset marks.
  13. If you play the first part of the audio strip you can hear that it's intact. So the problem occurs only with the second part.
  14. So I assumed that maybe the problem is in the first part of the audio strip that overlaps the second one. Let's delete it. If you delete the first half of the audio strip, the hidden strip still plays, but if you delete the first part of the video strip, the hidden audio strip disappears.

So the fact that this bug only appears when using proxy, tells us that maybe video strips are involved in its cause.
The bug seems to be affecting only memory. If you save this file, after restarting Blender, the additional audio strip from the memory goes away.

Event Timeline

Richard Antalik (ISS) changed the task status from Needs Triage to Confirmed.Jul 13 2020, 2:28 PM
Richard Antalik (ISS) triaged this task as High priority.
Richard Antalik (ISS) changed the subtype of this task from "Report" to "Bug".

I was able to reproduce this issue (on windows) and now I am not able to reproduce anymore. But during last editing session I have experienced this bug, so I should be able to make fix. But I need to collect some material to edit first.

@Richard Antalik (ISS) Using additional undo (before or after the steps) can prevent from reproducing the bug. Also, I figured out another set of steps to reproduce this issue. It doesn't even involve applying effects to strips. Just moving them. Do you need me to post the new steps? Also, please, let me know if you need any help with the material or testing. I hope this can be fixed soon. This bug prevents me from using undo during editing, which is very annoying.

@Neon Cipher (neoncipher) If you have simplified steps you can update them though this is really tricky to catch so steps perhaps don't apply if code has changed a bit? not sure really.

@Richard Antalik (ISS) I've been experimenting with the issue and found that moving strip parts that were split, then undoing several times, produces the bug every single time I try it if using proxy.
Also, note that this bug appears in 2.83 and 2.90 only. Everything works correctly in 2.82.

Maybe those steps will work better:

  1. Add a movie strip (http://neoncipher.net/example.mp4)
  2. Set the end frame so that the strips fit in the range entirely.
  3. Select the video strip
  4. Set and generate 25% size proxy
  5. Go to the preview window and activate 25% size proxy
  6. We want to split both video and audio strips in 3 parts. Select both video and audio strips and press K two times when putting the timeline at around 1/3 and 2/3 positions.
  7. Press G and move the last part of the video around 100 frames to the right.
  8. Press G and move the second (middle) part of the video around 100 frames to the right as well.
  9. Now undo several times in a row using Ctrl+Z without clicking or pressing anything else, until the video segments go to their original places.
  10. What we got now is an additional invisible copy of the last segment of the audio strip sitting in the memory. If you play the last part of the audio, you can notice that it got twice as loud because it's actually two identical audio strips playing at the same time. To reveal the invisible strip clearer, you can grab the visible last part and move it some frames to the right, so when you play, it will generate some echo because the visible and invisible strips would be playing with some delay between them. Or you can delete the last part of the audio and hear the invisible one still playing when there is no audio strips visible at all.

If you mess the steps, it's necessary to restart Blender and start from the beginning. Do not use undo, except when it's in the steps.

Sergey Sharybin (sergey) raised the priority of this task from High to Unbreak Now!.