olive-editor / olive

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

[CRASH] Dragging clip onto timeline that has an In point set but no Out point breaks project #2247

Open unfa opened 1 year ago

unfa commented 1 year ago

Commit Hash

7fa69ea5

Platform

Arch Linux KDE

Summary

It seems that Olive doesn't automatically provide a video clip's out point to be the end of the video file. When I set an In point of a clip in the Project Bin, I expect that when I drag that clip on my timeline, I'll se the part between In and the end of the video file. Instead - an invalid strip is created that has no length, and putting the playhead after it crashes Olive.

Steps to Reproduce

  1. Set an in point for a video clip in the Project Bin, but leave out point as is (it deaults to the end of the clip)
  2. Drag the clip onto your timeline - a strange, 0-frames long strip will be created
  3. Try playing your timeline or deleting it...
  4. Crash!
Crash Report

It's too long to embed text so I uploaded it as a file:

[crash report.txt](https://github.com/olive-editor/olive/files/11874069/crash.report.txt)

Additional Information

Ruudjhuu commented 10 months ago

I can confirm the "not as expected" behavior, however I do not get a crash, but the clip created does not show anything.

I did look at the code (footageviewer.cpp:88). It looks like when only the in_point is set, the out_point is set to TimelineWorkArea::kResetOut = RATIONAL_MAX = INT_MAX. This is fine, but with these values the workarea length of ViewerOutput is not updated. If i change workarea_range_.length_.den during execution, the program function as expected.

With "out point": image

Without "out point" image

I am very new to the code and try to get familiar, so for now this is probably as far as I can go. I have no idea where this issue can be fixed, If the bug has only impact on the footage viewer or more. It might affect more views using the in-out points. Maybe @itsmattkc can give me some pointers as you implemented this 3 years ago. I might be able to provide a fix.

ThomasWilshaw commented 10 months ago

I can confirm on Windows 10