olive-editor / olive

Free open-source non-linear video editor
https://olivevideoeditor.org/
GNU General Public License v3.0
8.27k stars 559 forks source link

[CRASH] When ripple deleting in certain circumstances #2233

Open jazztickets opened 1 year ago

jazztickets commented 1 year ago

Commit Hash 70690c5

Platform Arch Linux

Summary I've found that when ripple deleting a few clips (possibly involving cross fades or text nodes), olive crashes.

Steps to Reproduce

  1. Create a few clips on the timeline, and add text nodes and/or crossfades between them
  2. Highlight some of the clips at the beginning, but not all clips
  3. Shift+delete to ripple delete.

Here's one scenario that crashes: 2023-05-31_20-21

Crash Report




Additional Information

I loaded up Olive in a debugger and it turns out the track variable is null on line 390: https://github.com/olive-editor/olive/blob/70690c5b54bbd7763823d1632b348ed1462b2cb0/app/timeline/timelineundoripple.cpp#L390

Adding something like this fixes the crashes:

    Track *track = region.first;
    if(!track) {
      qWarning() << "Track is null!";
      continue;
    }

If it's not supposed to be null, then we got other problems but it's a good idea to check for null here in any case.

Awesomeplayer98 commented 1 year ago

I get this same issue. It's definitely related to cross fades.

ThomasWilshaw commented 1 year ago

If you can confirm it's realated to transitions see #1842