Page MenuHome

Crash when adding multiple Adjustment layers and then deleting one of them
Closed, ResolvedPublic

Description

System Information
Operating system: Windows 8.1
Graphics card: NVIDIA GeForce GT 750M (5+years old)

Blender Version
Broken: 3.2.0 Alpha 2882cbe685e7
Worked: 3.1.0

Adding multiple Adjustment layers, and then deleting one of them will cause a crash. Reported to be an access violation.

Exact steps for others to reproduce the error

  1. Default startup
  2. Change Editor Type to 'Video Sequencer'
  3. Change View Type to 'Sequencer & Preview'
  4. Add adjustment layer
  5. Add second adjustment layer
  6. Add third adjustment layer
  7. Add curves modifier to third adjustment layer
  8. Delete first adjustment layer (using keyboard X key in VSE)
  9. Crash

Supporting Video

https://youtu.be/YR_a8uQv1es

Event Timeline

Thanks for the report. I cannot reproduce anymore on current master.
Crash is already fixed by rB3cef9ebaf810: Fix T97356: Crash when adding adjustment layer strip
Please download and test latest 3.2 build from buildbot: https://builder.blender.org/download/daily
Feel free to comment if you can still replicate crash.

The crash is still there in blender-3.2.0-alpha+master.179100c02126-windows.amd64-release

I added a video demonstrating the crash on 179100c02126

https://youtu.be/YR_a8uQv1es

Yes, can confirm. Crash does not occur if preview window is not active
cc @Richard Antalik (ISS)

Pratik Borhade (PratikPB2123) renamed this task from EXCEPTION_ACCESS_VIOLATION when adding multiple Adjustment layers, and then deleting one of them to Crash when adding multiple Adjustment layers and then deleting one of them.Apr 22 2022, 11:23 AM
Pratik Borhade (PratikPB2123) triaged this task as High priority.
a (blenderbug12345) added a comment.EditedApr 30 2022, 2:04 PM

Bump!

The current definition of SEQ_get_channels_by_seq is broken, it doesn't return channels. I think the idea was to do this instead:

ListBase *SEQ_get_channels_by_seq(ListBase *seqbase, ListBase *channels, const Sequence *seq)
{
  ListBase *lb = NULL;

  LISTBASE_FOREACH (Sequence *, iseq, seqbase) {
    if (seq == iseq) {
      return channels;
    }
    if ((lb = SEQ_get_channels_by_seq(&iseq->seqbase, &iseq->channels, seq))) {
      return lb;
    }
  }

  return NULL;
}

This code works for me when tested against the steps which crash the VSE.

Called as:

...
ListBase *channels = SEQ_get_channels_by_seq(&ed->seqbase, &ed->channels, seq);
...

@a (blenderbug12345) Thanks for snippet, your code is correct. I was confused for a bit before I noticed pointer to seqbase is being returned.