Bug 470146 - Crash in QtAV while playing videos with Slideshow tool.
Summary: Crash in QtAV while playing videos with Slideshow tool.
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-SlideShow (show other bugs)
Version: 8.0.0
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-22 21:36 UTC by Kusi
Modified: 2023-10-11 05:03 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.2.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kusi 2023-05-22 21:36:02 UTC
SUMMARY
Play an album (shortcut "F9") containing images and videos. On some videos, DK crashes. It is not always reproducible but if you load a video in "play" mode (F9) multiple time, DK will crash after ~5 successful video display. Looks like a race condition to me. Regression since DK 7.10. Crash is reproducible with any kind of video formats. Relevant part of the call stack
 
#6  set_number (...) at libavutil/opt.c:612
#7  QtAV::AVDecoder::open (...) at /usr/src/debug/digikam-8.0.0/core/libs/video/qtav/codec/AVDecoder.cpp:196

FULL CALLSTACK
Application: digiKam (digikam), signal: Segmentation fault

[KCrash Handler]
#4  0x00007fcd57275f72 in av_opt_next (obj=obj@entry=0x55c0311c6dc0, last=last@entry=0x0) at libavutil/opt.c:52
#5  0x00007fcd572760bb in av_opt_find2 (obj=obj@entry=0x55c0311c6dc0, name=0x7fcd5cd706d4 "refcounted_frames", unit=unit@entry=0x0, opt_flags=opt_flags@entry=0, search_flags=0, target_obj=target_obj@entry=0x7ffc15bc6390) at libavutil/opt.c:1806
#6  0x00007fcd5727b4e4 in set_number (obj=0x55c0311c6dc0, name=<optimized out>, num=1, den=1, intnum=1, search_flags=<optimized out>) at libavutil/opt.c:612
#7  0x00007fcd5cb5a326 in QtAV::AVDecoder::open (this=0x55c031573990) at /usr/src/debug/digikam-8.0.0/core/libs/video/qtav/codec/AVDecoder.cpp:196
#8  0x00007fcd5cb0fa2b in QtAV::AVPlayerCore::Private::setupAudioThread (this=0x55c030cd8710, player=0x55c0313c3a80) at /usr/src/debug/digikam-8.0.0/core/libs/video/qtav/ffmpeg/AVPlayerCore_p.cpp:629
#9  0x00007fcd5cafc727 in QtAV::AVPlayerCore::playInternal (this=0x55c0313c3a80) at /usr/include/qt5/QtCore/qscopedpointer.h:116
#10 0x00007fcd5af251d3 in ?? () from /lib64/libQt5Core.so.5
#11 0x00007fcd5af251d3 in ?? () from /lib64/libQt5Core.so.5
#12 0x00007fcd5bc96a22 in QAbstractButton::toggled(bool) () from /lib64/libQt5Widgets.so.5
#13 0x00007fcd5bc96ed1 in ?? () from /lib64/libQt5Widgets.so.5
#14 0x00007fcd5bc98185 in QAbstractButton::setChecked(bool) () from /lib64/libQt5Widgets.so.5
#15 0x00007fcd388239a2 in DigikamGenericSlideShowPlugin::SlideToolBar::pause (val=false, this=0x55c0312fac00) at /usr/src/debug/digikam-8.0.0/core/dplugins/generic/view/slideshow/widgets/slidetoolbar.cpp:213
#16 DigikamGenericSlideShowPlugin::SlideToolBar::pause (val=false, this=0x55c0312fac00) at /usr/src/debug/digikam-8.0.0/core/dplugins/generic/view/slideshow/widgets/slidetoolbar.cpp:206
#17 DigikamGenericSlideShowPlugin::SlideOSD::pause (this=0x55c028cd1b10, b=false) at /usr/src/debug/digikam-8.0.0/core/dplugins/generic/view/slideshow/widgets/slideosd.cpp:373
#18 0x00007fcd3881a1a0 in DigikamGenericSlideShowPlugin::SlideShowLoader::setCurrentView (view=DigikamGenericSlideShowPlugin::SlideShowLoader::VideoView, this=0x55c02a13efa0) at /usr/src/debug/digikam-8.0.0/core/dplugins/generic/view/slideshow/common/slideshowloader.cpp:276
#19 DigikamGenericSlideShowPlugin::SlideShowLoader::slotVideoLoaded (loaded=<optimized out>, this=0x55c02a13efa0) at /usr/src/debug/digikam-8.0.0/core/dplugins/generic/view/slideshow/common/slideshowloader.cpp:475
#20 DigikamGenericSlideShowPlugin::SlideShowLoader::qt_static_metacall (_o=0x55c02a13efa0, _id=<optimized out>, _a=<optimized out>, _c=<optimized out>) at /usr/src/debug/digikam-8.0.0/build/core/dplugins/generic/view/slideshow/Generic_SlideShow_Plugin_autogen/P66WHCG54J/moc_slideshowloader.cpp:146
#21 0x00007fcd5af251d3 in ?? () from /lib64/libQt5Core.so.5
#22 0x00007fcd5cacb5af in Digikam::SlideVideo::signalVideoLoaded (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/digikam-8.0.0/build/core/libs/video/core_videotools_obj_autogen/NNZHHPJXVP/moc_slidevideo.cpp:238
#23 0x00007fcd5af18c50 in QObject::event(QEvent*) () from /lib64/libQt5Core.so.5
#24 0x00007fcd5bba51ae in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib64/libQt5Widgets.so.5
#25 0x00007fcd5aeec978 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib64/libQt5Core.so.5
#26 0x00007fcd5aeeff71 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib64/libQt5Core.so.5
#27 0x00007fcd5af46713 in ?? () from /lib64/libQt5Core.so.5
#28 0x00007fcd4db168d8 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#29 0x00007fcd4db16ce8 in ?? () from /lib64/libglib-2.0.so.0
#30 0x00007fcd4db16d7c in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#31 0x00007fcd5af45f26 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#32 0x00007fcd5aeeb40b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib64/libQt5Core.so.5
#33 0x00007fcd5aef38a0 in QCoreApplication::exec() () from /lib64/libQt5Core.so.5
#34 0x000055c025313a34 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/digikam-8.0.0/core/app/main/main.cpp:463
[Inferior 1 (process 15676) detached]
Comment 1 Kusi 2023-05-22 21:41:27 UTC
STEPS TO REPRODUCE

1. Album with 1 image and 1 video
2. F9 (play mode)
3. Go back/forth with cursor keys, switch between image and video
4. After ~5 times going back/forth, DK crashes
Comment 2 caulier.gilles 2023-05-23 02:38:49 UTC
Hi Kusi,

Which version of ffmpeg did you use ? go to Help/Components Info dialog for details.

Using 8.1.0 AppImage bundle, the crash also happens ?

Best

Gilles Caulier
Comment 3 caulier.gilles 2023-05-23 02:42:37 UTC
AppImage bundle 8.1.0 pre-release is available here :

https://files.kde.org/digikam/
Comment 4 Maik Qualmann 2023-05-23 05:58:47 UTC
Here a no longer valid codec_ctx is used from the static QHash. This is fixed with Bug 468480.

Maik
Comment 5 caulier.gilles 2023-10-11 05:03:57 UTC
fixed with 468480