Olive: [CRASH] FFmpeg 4.3 causes Olive to crash

Created on 13 Sep 2020  Â·  18Comments  Â·  Source: olive-editor/olive

Commit Hash
Any

Platform
Any

Summary
If Olive is linked with FFmpeg 4.3.x, it crashes when trying to place a video into the timeline.

This bug is tracked on FFmpeg's tracker: https://trac.ffmpeg.org/ticket/8747

Workarounds

  1. Our nightly builds are linked with stable versions of each library, so we recommend using those: https://olivevideoeditor.org/nightly.php
  2. Link with FFmpeg 4.2.x OR link with FFmpeg's latest git master. They've fixed this crash now but it hasn't made it into a formal release yet (you'll have to remove the version check from Olive's CMakeLists.txt since the git hash will trip it up).
  3. This only appears to happen with certain video dimensions. Often if you set your sequence divider to "Full", this crash will not occur (at the expense of higher performance requirements).
Crash Not Our Faultâ„¢

Most helpful comment

If you've encountered an export bug, you should report it. We're not omniscient, you could easily be running into an export problem that we haven't encountered yet. The whole point is testing so people can inform us of such bugs and we can fix them.

Also the website is pretty clear about not using it for serious work:
image

All 18 comments

I'm experiencing crashes every time I try to place any video file on the timeline, could that be related?

Build:

Olive-76112f70-x86_64.appimage

Backtrace:

Thread 71 "Thread (pooled)" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff41c1c640 (LWP 564722)]
0x00007ffff5555ff2 in ?? () from /tmp/.mount_Olive-qzDDaG/local/bin/../lib/libswscale.so.5
(gdb) bt
#0  0x00007ffff5555ff2 in  () at /tmp/.mount_Olive-qzDDaG/local/bin/../lib/libswscale.so.5
#1  0x00007ffff5554db3 in  () at /tmp/.mount_Olive-qzDDaG/local/bin/../lib/libswscale.so.5
#2  0x00007ffff5528e99 in sws_scale () at /tmp/.mount_Olive-qzDDaG/local/bin/../lib/libswscale.so.5
#3  0x000000000056bd4b in olive::FFmpegDecoder::BuffersToNativeFrame(int, int, int, olive::rational const&, unsigned char**, int*)
    (this=this@entry=0x7fff280036e0, divider=3, width=1920, height=1080, ts=..., input_data=0x7fff41c1b0e0, input_linesize=0x7fff41c1b0d0) at /home/travis/build/olive-editor/olive/app/codec/ffmpeg/ffmpegdecoder.cpp:832
#4  0x000000000057099d in olive::FFmpegDecoder::RetrieveVideo(olive::rational const&, int const&) (this=0x7fff280036e0, timecode=..., divider=@0x1b248dc: 3)
    at /home/travis/build/olive-editor/olive/app/codec/ffmpeg/ffmpegdecoder.cpp:337
#5  0x00000000006440d2 in olive::RenderWorker::ProcessVideoFootage(std::shared_ptr<olive::Stream>, olive::rational const&) (this=0x1b24870, stream=std::shared_ptr<olive::Stream> (use count 14, weak count 0) = {...}, input_time=...)
    at /home/travis/build/olive-editor/olive/app/render/backend/renderworker.cpp:399
#6  0x000000000060c883 in olive::NodeTraverser::PostProcessTable(olive::Node const*, olive::TimeRange const&, olive::NodeValueTable&) (this=this@entry=0x1b24880, node=node@entry=0x1b14060, range=..., output_params=...)
    at /home/travis/build/olive-editor/olive/app/node/traverser.cpp:216
#7  0x000000000060d7aa in olive::NodeTraverser::GenerateTable(olive::Node const*, olive::TimeRange const&) (this=this@entry=0x1b24880, n=0x1b14060, range=...) at /home/travis/build/olive-editor/olive/app/node/traverser.cpp:81
#8  0x000000000060d8f9 in olive::NodeTraverser::ProcessInput(olive::NodeInput*, olive::TimeRange const&) (this=this@entry=0x1b24880, input=0x19161f0, range=...) at /home/travis/build/olive-editor/olive/app/node/traverser.cpp:53
#9  0x0000000000641d99 in olive::RenderWorker::RenderFrame(std::shared_ptr<olive::RenderTicket>, olive::ViewerOutput*, olive::rational const&)
    (this=0x1b24870, ticket=std::shared_ptr<olive::RenderTicket> (use count 6, weak count 0) = {...}, viewer=<optimized out>, time=...) at /home/travis/build/olive-editor/olive/app/render/backend/renderworker.cpp:115
#10 0x000000000063a87c in QtConcurrent::VoidStoredMemberFunctionPointerCall3<void, olive::RenderWorker, std::shared_ptr<olive::RenderTicket>, std::shared_ptr<olive::RenderTicket>, olive::ViewerOutput*, olive::ViewerOutput*, olive::rational const&, olive::rational>::runFunctor() (this=0x2616770) at /opt/qt511/include/QtConcurrent/qtconcurrentstoredfunctioncall.h:1291
#11 0x0000000000639c2b in QtConcurrent::RunFunctionTask<void>::run() (this=0x2616770) at /opt/qt511/include/QtConcurrent/qtconcurrentrunbase.h:136
#12 0x00007ffff2aabb77 in  () at /tmp/.mount_Olive-qzDDaG/local/bin/../lib/libQt5Core.so.5
#13 0x00007ffff2ab56d7 in  () at /tmp/.mount_Olive-qzDDaG/local/bin/../lib/libQt5Core.so.5
#14 0x00007ffff15163e9 in start_thread () at /usr/lib/libpthread.so.0
#15 0x00007ffff25b2293 in clone () at /usr/lib/libc.so.6

ffprobe on the input video file:

$ ffprobe VID_20200915_110137.mp4 
ffprobe version n4.3.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 10.1.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'VID_20200915_110137.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2020-09-15T09:02:08.000000Z
    com.android.version: 9
  Duration: 00:00:30.40, start: 0.000000, bitrate: 50129 kb/s
    Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, smpte170m), 1920x1080, 49820 kb/s, SAR 1:1 DAR 16:9, 27 fps, 30 tbr, 90k tbn, 90k tbc (default)
    Metadata:
      creation_time   : 2020-09-15T09:02:08.000000Z
      handler_name    : VideoHandle
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 95 kb/s (default)
    Metadata:
      creation_time   : 2020-09-15T09:02:08.000000Z
      handler_name    : SoundHandle

If Olive is linked with FFmpeg 4.3.x, it crashes when trying to place a video into the timeline.

I'm experiencing crashes every time I try to place any video file on the timeline, could that be related?

ffprobe version n4.3.1

I think you might be onto something! If you build FFmpeg from source and rebuild Olive and you'll be fine.

@unfa Yep that's the one. Unfortunately the AppImage is on a rolling release of FFmpeg so we can't downgrade it. We're very much in the process of switching to a Docker based CI that will give us full control over the versions

@unfa sorry I misread and thought you were building yourself.

@itsmattkc should we go with 4.2.4 or rather 4.4.dev? Are there any benefits like performance or features in the latest nightlies?

I'd lean towards stability and stick with 4.2 personally. I think there are performance improvements in 4.3+ (pretty sure that's what causes this crash), but I'd rather wait for them to become stable.

Linux CI is merged, but the nightly page doesn't list them yet. @itsmattkc I guess you need to adjust the PHP script a little?

Actually the uploads aren't coming through because Cloudflare limits upload size to 100MB on free accounts... I might need to find an alternative means of uploading.

Linux builds are officially up. Anyone suffering from this issue on a user-compiled build should use these instead until FFmpeg is updated.

Would tracking this issue be the best way to hear when FFmpeg 4.3.2 is released/works?

Yeah I'll update here whenever FFmpeg's current version has implemented the fix.

I can not export my project with current 0.2 (on windows) in ANY way (mp4, quicktime - h264/h265/prores). NONE of the offered formats work. Other well known formats like webm or mpeg2 are missing.

It is very nice to have beta software and continuous releases, but please state in the download section, that exports are currently NOT working. Don't let people run into a dead end.

If you've encountered an export bug, you should report it. We're not omniscient, you could easily be running into an export problem that we haven't encountered yet. The whole point is testing so people can inform us of such bugs and we can fix them.

Also the website is pretty clear about not using it for serious work:
image

There is a difference between unstable and not working.
On unstable, software crashes or some functionality not working, frequent restarts, etc are acceptable. I am happy to report any bugs, to help for this great video editor (which works very fine and fast!).

But not having ANY way (not even mpeg2) to export the result is just a downer.

I get downvoted here. But I think the user reception and reputation of the project (see reddit) is very important as well.

As long as exports are not working, I think the warning should include that explicitly and the link to the old version 0.1 should be offered more prominently.

Once again, you're assuming we all know that export isn't working. I haven't run into any issues exporting so far.

It isn't working for you on your setup, yes that's definitely a problem, but if we've never encountered the bug and no one's reported it before, how are we supposed to know about it?

@zevero When wording your feedback please keep in mind that @itsmattkc and the other contributors to the project have volunteered their time and energy out of no obligation to you. Also, as the title "FFmpeg 4.3 causes Olive to crash" suggests, this issue is about crashes with Olive built with FFmpeg 4.3, not about exporting.

Both 0.1 and 0.2 are technically alpha software - as the download page clearly states. Please take the term "alpha software" seriously. You cannot even take for granted that Olive starts (this is an actual issue for some users). Please report problems, one GitHub issue each.

I actually haven't seen this crash in a while despite being on 4.3. We did change some of the frame storage code, so I think that might have worked around it. I think I'll mark this as no longer an issue, however I still recommend people avoid this version and use either 4.2 or the git master of FFmpeg.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

elsandosgrande picture elsandosgrande  Â·  21Comments

pgilfernandez picture pgilfernandez  Â·  15Comments

pgilfernandez picture pgilfernandez  Â·  18Comments

LeandroStanger picture LeandroStanger  Â·  25Comments

prokoudine picture prokoudine  Â·  38Comments