Bug 387892 - Crash in QtAV::VideoFrameExtractor
Summary: Crash in QtAV::VideoFrameExtractor
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Thumbs-Video (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-14 09:51 UTC by Kristian Karl
Modified: 2020-08-10 10:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.8.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kristian Karl 2017-12-14 09:51:52 UTC
Crash occurred when:
1) in the main Album view
2) scrolling down to a mp4 video.

Expected behavior
=================
A thumbnail or an icon of a video

Actual behavior
===============
Digikam crashed

Additional info
================
Compiled from sources, using:
 - ffmpeg, compiled from sources released version tags/n3.4.1
 - OpenCV, compiled from sources released version tags/3.3.1
 - QtAV, compiled from sources, latest master
 - Digikam, , compiled from sources, latest master

Ubuntu 16.04, KDE neon Developer Edition, Unstable Branches

Stacktrace
==========
digikam.general: Request to get thumbnail for  "/home/krikar/Pictures/2017/2017-01-03/2017-01-03_110620.mp4"
digikam.general: Trying to load Embedded preview with libraw
digikam.rawengine: Failed to load embedded RAW preview
digikam.general: Trying to load half preview with libraw
digikam.general: Trying to load Embedded preview with Exiv2
digikam.dimg: "/home/krikar/Pictures/2017/2017-01-03/2017-01-03_110740.mp4"  : QIMAGE file identified
digikam.dimg.qimage: Can not load " "/home/krikar/Pictures/2017/2017-01-03/2017-01-03_110740.mp4" " using DImg::QImageLoader!
digikam.general: mimetype =  ""  ext =  "MP4"
digikam.general: Cannot create thumbnail for  "/home/krikar/Pictures/2017/2017-01-03/2017-01-03_110740.mp4"
digikam.general: Thumbnail is null for  "/home/krikar/Pictures/2017/2017-01-03/2017-01-03_110740.mp4"
digikam.general: Video duration for  "2017-01-03_110620.mp4" is  13739  seconds
digikam.general: Trying to get thumbnail from  "2017-01-03_110620.mp4"  at position  2747
digikam.general: Trying to load Embedded preview with libraw
digikam.rawengine: Failed to load embedded RAW preview
digikam.general: Trying to load half preview with libraw
digikam.general: Trying to load Embedded preview with Exiv2
[New Thread 0x7ffe49826700 (LWP 15545)]
[New Thread 0x7ffe49025700 (LWP 15546)]
[New Thread 0x7ffe48824700 (LWP 15547)]
[New Thread 0x7ffe48023700 (LWP 15548)]
[New Thread 0x7ffe47822700 (LWP 15549)]
digikam.dimg: "/home/krikar/Pictures/2017/2017-01-03/2017-01-03_110829.mp4"  : QIMAGE file identified
[New Thread 0x7ffe47021700 (LWP 15550)]
digikam.dimg.qimage: Can not load " "/home/krikar/Pictures/2017/2017-01-03/2017-01-03_110829.mp4" " using DImg::QImageLoader!
digikam.general: mimetype =  ""  ext =  "MP4"
digikam.general: Cannot create thumbnail for  "/home/krikar/Pictures/2017/2017-01-03/2017-01-03_110829.mp4"
digikam.general: Thumbnail is null for  "/home/krikar/Pictures/2017/2017-01-03/2017-01-03_110829.mp4"
[New Thread 0x7ffe46820700 (LWP 15551)]
[New Thread 0x7ffe4601f700 (LWP 15552)]
[New Thread 0x7ffe4581e700 (LWP 15553)]
*** stack smashing detected ***: /home/krikar/dev/kde/digikam/build/app/digikam terminated

Thread 13 "QThread" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffa1ffb700 (LWP 15464)]
0x00007ffff2c75428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff2c75428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007ffff2c7702a in __GI_abort () at abort.c:89
#2  0x00007ffff2cb77ea in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff2dcf45f "*** %s ***: %s terminated\n")
    at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff2d5911c in __GI___fortify_fail (msg=<optimized out>, msg@entry=0x7ffff2dcf441 "stack smashing detected") at fortify_fail.c:37
#4  0x00007ffff2d590c0 in __stack_chk_fail () at stack_chk_fail.c:28
#5  0x00007fffe83f9a28 in QtAV::AVDemuxer::readFrame() () from /usr/lib/x86_64-linux-gnu/libQtAV.so.1
#6  0x00007fffe8468466 in QtAV::VideoFrameExtractorPrivate::extractInPrecision(long long, int, QString&, bool&) ()
   from /usr/lib/x86_64-linux-gnu/libQtAV.so.1
#7  0x00007fffe8466c7d in QtAV::VideoFrameExtractor::extractInternal(long long) () from /usr/lib/x86_64-linux-gnu/libQtAV.so.1
#8  0x00007fffe8466ae5 in QtAV::VideoFrameExtractor::extract()::ExtractTask::run() () from /usr/lib/x86_64-linux-gnu/libQtAV.so.1
#9  0x00007fffe846737e in QtAV::ExtractThread::run() () from /usr/lib/x86_64-linux-gnu/libQtAV.so.1
#10 0x00007ffff3b68709 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007fffec94c6ba in start_thread (arg=0x7fffa1ffb700) at pthread_create.c:333
#12 0x00007ffff2d473dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
(gdb)
Comment 1 Kristian Karl 2017-12-14 10:08:54 UTC
As a workaroun, turning ENABLE_MEDIAPLAYER to off works:
cmake  -DENABLE_MEDIAPLAYER=off ..
Comment 2 caulier.gilles 2017-12-14 11:47:08 UTC
I don't know how your ubuntu ffmpeg codecs are compiled. I suspect a problem with these components which are used to extract video thumbnails.

To be sure, download current 5.8.0 pre-release Linux AppImage and try to display video ablmum contents with this version instead your system based digiKam.

https://files.kde.org/digikam/

Gilles Caulier
Comment 3 Kristian Karl 2017-12-14 15:44:46 UTC
Using ./digikam-5.8.0-20171212T132305-x86-64.appimage had no issues with the same video files.
As you stated, must be some problem with my ffmpeg codecs that I compiled.

Could I ask which version of ffmpeg current appimage is using?
Comment 4 caulier.gilles 2017-12-14 18:22:40 UTC
To build AppImage bundle, we use Centos6 for binary compatibility with libc.

We use the Centos6 RPM taken from an extra repository :

http://li.nux.ro/download/nux/dextop/el6/x86_64/

Gilles Caulier
Comment 5 Kristian Karl 2017-12-15 09:40:11 UTC
Big thanks!
Comment 6 Kristian Karl 2017-12-28 13:10:47 UTC
I solved my problem which indeed was a problem with my ffmpeg libs. I happen to have a mixture of install devlibs from the distro, as well as my own compiled ffmpeg libs. When I removed the distro ffmpeg libs, Digikam now plays video nicely.
Comment 7 caulier.gilles 2017-12-28 13:19:40 UTC
Nice to hear... Thanks for the feedback and happy new year.

Gilles Caulier