Bug 378469 - 17.04 - Crash on Exit
Summary: 17.04 - Crash on Exit
Status: RESOLVED UPSTREAM
Alias: None
Product: kdenlive
Classification: Applications
Component: Video Display & Export (show other bugs)
Version: git-master
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords: drkonqi
: 378763 379717 379836 381208 381648 384672 387492 388252 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-04-05 15:32 UTC by Paul Konecny
Modified: 2018-10-12 21:53 UTC (History)
14 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Konecny 2017-04-05 15:32:37 UTC
Application: kdenlive (17.03.80)
 (Compiled from sources)
Qt Version: 5.8.0
Frameworks Version: 5.32.0
Operating System: Linux 4.10.6-1-ARCH x86_64
Distribution (Platform): Archlinux Packages

-- Information about the crash:
- What I was doing when the application crashed:
Kdenlive always crashes on close. 
Branch 17.04 up until commit 80e0b44f18fe9def3620b189eeb43e96a26698b7

The crash can be reproduced every time.

-- Backtrace:
Application: Kdenlive (kdenlive), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7ff88a100800 (LWP 20719))]

Thread 13 (Thread 0x7ff822ffd700 (LWP 20789)):
#0  0x00007ff882c914e5 in  () at /usr/lib/libQt5Core.so.5
#1  0x00007ff879e66c8d in g_main_context_prepare () at /usr/lib/libglib-2.0.so.0
#2  0x00007ff879e676cb in  () at /usr/lib/libglib-2.0.so.0
#3  0x00007ff879e678bc in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#4  0x00007ff882c9206b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007ff882c3b89a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#6  0x00007ff882a5da73 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#7  0x00007ff882a626d8 in  () at /usr/lib/libQt5Core.so.5
#8  0x00007ff88008f2e7 in start_thread () at /usr/lib/libpthread.so.0
#9  0x00007ff88206254f in clone () at /usr/lib/libc.so.6

Thread 12 (Thread 0x7ff823fff700 (LWP 20787)):
#0  0x00007ff879eace49 in g_mutex_lock () at /usr/lib/libglib-2.0.so.0
#1  0x00007ff879e67326 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#2  0x00007ff879e67810 in  () at /usr/lib/libglib-2.0.so.0
#3  0x00007ff879e678bc in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#4  0x00007ff882c9206b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007ff882c3b89a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#6  0x00007ff882a5da73 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#7  0x00007ff882a626d8 in  () at /usr/lib/libQt5Core.so.5
#8  0x00007ff88008f2e7 in start_thread () at /usr/lib/libpthread.so.0
#9  0x00007ff88206254f in clone () at /usr/lib/libc.so.6

Thread 11 (Thread 0x7ff83270c700 (LWP 20734)):
#0  0x00007ff88205867d in poll () at /usr/lib/libc.so.6
#1  0x00007ff879e677a6 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007ff879e678bc in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007ff882c9206b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007ff882c3b89a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007ff882a5da73 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#6  0x00007ff88468e025 in  () at /usr/lib/libQt5Qml.so.5
#7  0x00007ff882a626d8 in  () at /usr/lib/libQt5Core.so.5
#8  0x00007ff88008f2e7 in start_thread () at /usr/lib/libpthread.so.0
#9  0x00007ff88206254f in clone () at /usr/lib/libc.so.6

Thread 10 (Thread 0x7ff8333ef700 (LWP 20731)):
#0  0x00007ff880095b63 in pthread_cond_timedwait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007ff882a634c6 in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/libQt5Core.so.5
#2  0x00007ff882a5ebc4 in  () at /usr/lib/libQt5Core.so.5
#3  0x00007ff882a626d8 in  () at /usr/lib/libQt5Core.so.5
#4  0x00007ff88008f2e7 in start_thread () at /usr/lib/libpthread.so.0
#5  0x00007ff88206254f in clone () at /usr/lib/libc.so.6

Thread 9 (Thread 0x7ff8343f0700 (LWP 20730)):
#0  0x00007ff88205867d in poll () at /usr/lib/libc.so.6
#1  0x00007ff879e677a6 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007ff879e678bc in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007ff882c9206b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007ff882c3b89a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007ff882a5da73 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#6  0x00007ff88468e025 in  () at /usr/lib/libQt5Qml.so.5
#7  0x00007ff882a626d8 in  () at /usr/lib/libQt5Core.so.5
#8  0x00007ff88008f2e7 in start_thread () at /usr/lib/libpthread.so.0
#9  0x00007ff88206254f in clone () at /usr/lib/libc.so.6

Thread 8 (Thread 0x7ff840589700 (LWP 20729)):
#0  0x00007ff88205867d in poll () at /usr/lib/libc.so.6
#1  0x00007ff8471abd51 in  () at /usr/lib/libusb-1.0.so.0
#2  0x00007ff88008f2e7 in start_thread () at /usr/lib/libpthread.so.0
#3  0x00007ff88206254f in clone () at /usr/lib/libc.so.6

Thread 7 (Thread 0x7ff86031d700 (LWP 20727)):
#0  0x00007ff88205867d in poll () at /usr/lib/libc.so.6
#1  0x00007ff879e677a6 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007ff879e678bc in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007ff882c9206b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007ff882c3b89a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007ff882a5da73 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#6  0x00007ff88511e125 in  () at /usr/lib/libQt5DBus.so.5
#7  0x00007ff882a626d8 in  () at /usr/lib/libQt5Core.so.5
#8  0x00007ff88008f2e7 in start_thread () at /usr/lib/libpthread.so.0
#9  0x00007ff88206254f in clone () at /usr/lib/libc.so.6

Thread 6 (Thread 0x7ff861030700 (LWP 20725)):
#0  0x00007ff880095756 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007ff86722668b in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#2  0x00007ff8672263b7 in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#3  0x00007ff88008f2e7 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007ff88206254f in clone () at /usr/lib/libc.so.6

Thread 5 (Thread 0x7ff861831700 (LWP 20724)):
#0  0x00007ff880095756 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007ff86722668b in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#2  0x00007ff8672263b7 in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#3  0x00007ff88008f2e7 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007ff88206254f in clone () at /usr/lib/libc.so.6

Thread 4 (Thread 0x7ff862032700 (LWP 20723)):
#0  0x00007ff880095756 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007ff86722668b in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#2  0x00007ff8672263b7 in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#3  0x00007ff88008f2e7 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007ff88206254f in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7ff862833700 (LWP 20722)):
#0  0x00007ff880095756 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007ff86722668b in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#2  0x00007ff8672263b7 in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#3  0x00007ff88008f2e7 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007ff88206254f in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7ff863239700 (LWP 20721)):
#0  0x00007ff880095756 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007ff86722668b in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#2  0x00007ff8672263b7 in  () at /usr/lib/xorg/modules/dri/radeonsi_dri.so
#3  0x00007ff88008f2e7 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007ff88206254f in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7ff88a100800 (LWP 20719)):
[KCrash Handler]
#6  0x00007ff85cce6210 in  ()
#7  0x00007ff88924a9ea in mlt_consumer_purge () at /usr/lib/libmlt.so.6
#8  0x0000563628d30e1a in Render::stop() (this=0x56362b3669d0) at /home/paul/rebuild/3/src/kdenlive/src/renderer.cpp:680
#9  0x0000563628c06348 in Monitor::~Monitor() (this=0x56362af817a0, __in_chrg=<optimized out>) at /home/paul/rebuild/3/src/kdenlive/src/monitor/monitor.cpp:364
#10 0x0000563628c063ec in Monitor::~Monitor() (this=0x56362af817a0, __in_chrg=<optimized out>) at /home/paul/rebuild/3/src/kdenlive/src/monitor/monitor.cpp:372
#11 0x0000563628d15aa5 in MainWindow::~MainWindow() (this=this@entry=0x56362a87add0, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /home/paul/rebuild/3/src/kdenlive/src/mainwindow.cpp:781
#12 0x0000563628d15bfc in MainWindow::~MainWindow() (this=0x56362a87add0, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /home/paul/rebuild/3/src/kdenlive/src/mainwindow.cpp:786
#13 0x00007ff882c69be0 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#14 0x00007ff883cf1ecb in QWidget::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#15 0x00007ff883df0d0b in QMainWindow::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#16 0x00007ff8872c645a in KMainWindow::event(QEvent*) () at /usr/lib/libKF5XmlGui.so.5
#17 0x00007ff887317e85 in KXmlGuiWindow::event(QEvent*) () at /usr/lib/libKF5XmlGui.so.5
#18 0x00007ff883caa34c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#19 0x00007ff883cb1b61 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#20 0x00007ff882c3d440 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#21 0x00007ff882c3fbcd in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#22 0x00007ff882c43dfd in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#23 0x000056362893039d in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/paul/rebuild/3/src/kdenlive/src/main.cpp:158

Reported using DrKonqi
Comment 1 Jean-Baptiste Mardelle 2017-04-09 17:16:43 UTC
Thanks for your report. This was fixed in a recent MLT commit:
https://github.com/mltframework/mlt/commit/a3188e301b5a9a1f25dbb98a510e366363348e64

Using MLT from git or the next MLT version to be released will solve the crash
Comment 2 Paul Konecny 2017-04-10 22:16:33 UTC
Gotcha! Thanks J-B.
Comment 3 RJVB 2017-04-29 18:23:47 UTC
What I don't understand is why a call is made to Render::stop() in this location, esp. when no rendering was ever done (I get the crash when I simply start and then quit Kdenlive).

Am I far off the truth assuming that MLT gets "deconfigured" before the Monitor dtor is called? How about doing this sort of prepare-for-exit steps in reaction to QCoreApplication::aboutToQuit()?
Comment 4 RJVB 2017-04-30 08:39:17 UTC
To answer my own question: something else appears to be going on. Even when I take down most of the MLT resources in reaction to `aboutToQuit` and in fact leave most of that to the global destruction phase (i.e. the MLT library itself) I see a crash in MLT.

Yet when I revert to kdenlive 16.12.0 the issue disappears, so it should be possible to avoid the crash in kdenlive.
Comment 5 Christoph Feck 2017-05-16 00:40:14 UTC
*** Bug 379836 has been marked as a duplicate of this bug. ***
Comment 6 Christoph Feck 2017-05-16 00:40:26 UTC
*** Bug 379717 has been marked as a duplicate of this bug. ***
Comment 7 Christoph Feck 2017-05-16 00:40:42 UTC
*** Bug 378763 has been marked as a duplicate of this bug. ***
Comment 8 Christoph Feck 2017-06-15 01:07:18 UTC
*** Bug 381208 has been marked as a duplicate of this bug. ***
Comment 9 Christoph Feck 2017-06-26 11:35:30 UTC
*** Bug 381648 has been marked as a duplicate of this bug. ***
Comment 10 Christoph Feck 2017-09-25 21:21:47 UTC
*** Bug 384672 has been marked as a duplicate of this bug. ***
Comment 11 Christoph Feck 2017-12-31 10:19:28 UTC
*** Bug 387492 has been marked as a duplicate of this bug. ***
Comment 12 Christoph Feck 2018-01-10 14:47:35 UTC
*** Bug 388252 has been marked as a duplicate of this bug. ***
Comment 13 Jaak Ristioja 2018-01-10 18:18:59 UTC
(In reply to Jean-Baptiste Mardelle from comment #1)
> Thanks for your report. This was fixed in a recent MLT commit:
> https://github.com/mltframework/mlt/commit/
> a3188e301b5a9a1f25dbb98a510e366363348e64
> 
> Using MLT from git or the next MLT version to be released will solve the
> crash

What is the use if upstream won't release a new version? According to https://github.com/mltframework/mlt/releases their last release was 6.4.1 on Nov 16, 2016.

Dear Kdenlive! Whatever reasons upstream has, it hurts Your users! Isn't there something You could do to work around this?