Bug 363328

Summary: kdenlive-git crashes at the start of render when all tracks' audio is muted
Product: [Applications] kdenlive Reporter: Anton Gubarkov <anton.gubarkov>
Component: Rendering & ExportAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED FIXED    
Severity: normal CC: snd.noise, wegwerf-1-2-3
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Anton Gubarkov 2016-05-20 15:35:02 UTC
no additional details are printed in the terminal. kdenlive produces a core dump

Reproducible: Always

Steps to Reproduce:
1. create a new project
2. add a color clip to the project and to timeline
3. mute all tracks
4. try to render the project into MP4 profile

Actual Results:  
kdenlive crashes and produces a core dump

Expected Results:  
the project renders only video with no audio
Comment 1 farid 2016-07-31 03:09:57 UTC
I can confirm this happening with a color clip... i also did some further testing with a png and a mp4 and they both crash as well. see the backtraces of each below.

(I am using a build from 4 days ago.)

*Color clip*

Thread 1 "kdenlive" received signal SIGSEGV, Segmentation fault.
0x00007ffff6d803f0 in Mlt::Properties::get_int(char const*) ()
   from /usr/lib/libmlt++.so.3
(gdb) backtrace
#0  0x00007ffff6d803f0 in Mlt::Properties::get_int(char const*) ()
   from /usr/lib/libmlt++.so.3
#1  0x00000000005b02f5 in Timeline::checkProjectAudio (
    this=0x4f363c0)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/kdenlive/src/timeline/timeline.cpp:262
#2  0x000000000085adc8 in MainWindow::slotPrepareRendering (
    this=0x1022400, scriptExport=<optimized out>, zoneOnly=false, 
    chapterFile=...)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/kdenlive/src/mainwindow.cpp:3187
#3  0x0000000000892317 in MainWindow::qt_static_metacall (
    _o=0x1022400, _c=<optimized out>, _id=<optimized out>, 
    _a=<optimized out>)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/build/src/kdenlive_automoc.dir/moc_mainwindow.cpp:846
#4  0x00007ffff0a664e9 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#5  0x000000000087bff5 in RenderWidget::prepareRenderingData (
---Type <return> to continue, or q <return> to quit---
    this=this@entry=0x54a8fe0, _t1=<optimized out>, _t1@entry=false, 
    _t2=<optimized out>, _t3=...)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/build/src/kdenlive_automoc.dir/dialogs/moc_renderwidget.cpp:466
#6  0x00000000006a1882 in RenderWidget::slotPrepareExport (
    this=0x54a8fe0, scriptExport=scriptExport@entry=false)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/kdenlive/src/dialogs/renderwidget.cpp:950
#7  0x0000000000893a67 in RenderWidget::qt_static_metacall (
    _o=<optimized out>, _c=<optimized out>, _id=<optimized out>, 
    _a=<optimized out>)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/build/src/kdenlive_automoc.dir/dialogs/moc_renderwidget.cpp:337
#8  0x00007ffff0a664e9 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQt5Core.so.5
#9  0x00007ffff1b6b142 in QAbstractButton::clicked(bool) ()
   from /usr/lib/libQt5Widgets.so.5
#10 0x00007ffff1b6b394 in ?? () from /usr/lib/libQt5Widgets.so.5
#11 0x00007ffff1b6c787 in ?? () from /usr/lib/libQt5Widgets.so.5
---Type <return> to continue, or q <return> to quit---
#12 0x00007ffff1b6c964 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQt5Widgets.so.5
#13 0x00007ffff1acaf18 in QWidget::event(QEvent*) ()
   from /usr/lib/libQt5Widgets.so.5
#14 0x00007ffff1a83e3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#15 0x00007ffff1a8c46d in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/libQt5Widgets.so.5
#16 0x00007ffff0a3ac80 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#17 0x00007ffff1a8ab1d in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQt5Widgets.so.5
#18 0x00007ffff1ae4fc0 in ?? () from /usr/lib/libQt5Widgets.so.5
#19 0x00007ffff1ae7763 in ?? () from /usr/lib/libQt5Widgets.so.5
#20 0x00007ffff1a83e3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#21 0x00007ffff1a8b5b1 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/libQt5Widgets.so.5
---Type <return> to continue, or q <return> to quit---
#22 0x00007ffff0a3ac80 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#23 0x00007ffff0f890e3 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()
   from /usr/lib/libQt5Gui.so.5
#24 0x00007ffff0f8ac65 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
   from /usr/lib/libQt5Gui.so.5
#25 0x00007ffff0f68cbb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/libQt5Gui.so.5
#26 0x00007fffdd921310 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#27 0x00007fffe809add7 in g_main_context_dispatch ()
   from /usr/lib/libglib-2.0.so.0
#28 0x00007fffe809b040 in ?? () from /usr/lib/libglib-2.0.so.0
#29 0x00007fffe809b0ec in g_main_context_iteration ()
   from /usr/lib/libglib-2.0.so.0
#30 0x00007ffff0a8f57f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
---Type <return> to continue, or q <return> to quit---
#31 0x00007ffff0a390da in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#32 0x00007ffff0a415cc in QCoreApplication::exec() ()
   from /usr/lib/libQt5Core.so.5
#33 0x000000000048aa52 in main (argc=<optimized out>, 
    argv=<optimized out>)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/kdenlive/src/main.cpp:158


*PNG*

(gdb) backtrace
#0  0x00007ffff6d803f0 in Mlt::Properties::get_int(char const*) () from /usr/lib/libmlt++.so.3
#1  0x00000000005b02f5 in Timeline::checkProjectAudio (this=0x4f664b0)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/kdenlive/src/timeline/timeline.cpp:262
#2  0x000000000085adc8 in MainWindow::slotPrepareRendering (this=0x1026860, 
    scriptExport=<optimized out>, zoneOnly=false, chapterFile=...)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/kdenlive/src/mainwindow.cpp:3187
#3  0x0000000000892317 in MainWindow::qt_static_metacall (_o=0x1026860, _c=<optimized out>, 
    _id=<optimized out>, _a=<optimized out>)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/build/src/kdenlive_automoc.dir/moc_mainwindow.cpp:846
#4  0x00007ffff0a664e9 in QMetaObject::activate(QObject*, int, int, void**) ()
   from /usr/lib/libQt5Core.so.5
#5  0x000000000087bff5 in RenderWidget::prepareRenderingData (this=this@entry=0x29400f0, 
    _t1=<optimized out>, _t1@entry=false, _t2=<optimized out>, _t3=...)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/build/src/kdenlive_automoc.dir/dialogs/moc_renderwidget.cpp:466
#6  0x00000000006a1882 in RenderWidget::slotPrepareExport (this=0x29400f0, 
    scriptExport=scriptExport@entry=false)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/kdenlive/src/dialogs/renderwidget.cpp:950
#7  0x0000000000893a67 in RenderWidget::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, 
    _id=<optimized out>, _a=<optimized out>)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/build/src/kdenlive_automoc.dir/dialogs/moc_renderwidget.cpp:337
#8  0x00007ffff0a664e9 in QMetaObject::activate(QObject*, int, int, void**) ()
   from /usr/lib/libQt5Core.so.5
#9  0x00007ffff1b6b142 in QAbstractButton::clicked(bool) () from /usr/lib/libQt5Widgets.so.5
---Type <return> to continue, or q <return> to quit---
#10 0x00007ffff1b6b394 in ?? () from /usr/lib/libQt5Widgets.so.5
#11 0x00007ffff1b6c787 in ?? () from /usr/lib/libQt5Widgets.so.5
#12 0x00007ffff1b6c964 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()
   from /usr/lib/libQt5Widgets.so.5
#13 0x00007ffff1acaf18 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#14 0x00007ffff1a83e3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/libQt5Widgets.so.5
#15 0x00007ffff1a8c46d in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#16 0x00007ffff0a3ac80 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
   from /usr/lib/libQt5Core.so.5
#17 0x00007ffff1a8ab1d in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQt5Widgets.so.5
#18 0x00007ffff1ae4fc0 in ?? () from /usr/lib/libQt5Widgets.so.5
#19 0x00007ffff1ae7763 in ?? () from /usr/lib/libQt5Widgets.so.5
#20 0x00007ffff1a83e3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/libQt5Widgets.so.5
#21 0x00007ffff1a8b5b1 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#22 0x00007ffff0a3ac80 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
   from /usr/lib/libQt5Core.so.5
#23 0x00007ffff0f890e3 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/libQt5Gui.so.5
#24 0x00007ffff0f8ac65 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/libQt5Gui.so.5
#25 0x00007ffff0f68cbb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Gui.so.5
---Type <return> to continue, or q <return> to quit---
#26 0x00007fffdd921310 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#27 0x00007fffe809add7 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#28 0x00007fffe809b040 in ?? () from /usr/lib/libglib-2.0.so.0
#29 0x00007fffe809b0ec in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#30 0x00007ffff0a8f57f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/libQt5Core.so.5
#31 0x00007ffff0a390da in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/libQt5Core.so.5
#32 0x00007ffff0a415cc in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#33 0x000000000048aa52 in main (argc=<optimized out>, argv=<optimized out>)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/kdenlive/src/main.cpp:158


* MP4 *

#0  0x00007ffff6d803f0 in Mlt::Properties::get_int(char const*) () from /usr/lib/libmlt++.so.3
#1  0x00000000005b02f5 in Timeline::checkProjectAudio (this=0x4f5bad0)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/kdenlive/src/timeline/timeline.cpp:262
#2  0x000000000085adc8 in MainWindow::slotPrepareRendering (this=0x1028ec0, 
    scriptExport=<optimized out>, zoneOnly=false, chapterFile=...)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/kdenlive/src/mainwindow.cpp:3187
#3  0x0000000000892317 in MainWindow::qt_static_metacall (_o=0x1028ec0, _c=<optimized out>, 
    _id=<optimized out>, _a=<optimized out>)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/build/src/kdenlive_automoc.dir/moc_mainwindow.cpp:846
#4  0x00007ffff0a664e9 in QMetaObject::activate(QObject*, int, int, void**) ()
   from /usr/lib/libQt5Core.so.5
#5  0x000000000087bff5 in RenderWidget::prepareRenderingData (this=this@entry=0x4af0720, 
    _t1=<optimized out>, _t1@entry=false, _t2=<optimized out>, _t3=...)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/build/src/kdenlive_automoc.dir/dialogs/moc_renderwidget.cpp:466
#6  0x00000000006a1882 in RenderWidget::slotPrepareExport (this=0x4af0720, 
    scriptExport=scriptExport@entry=false)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/kdenlive/src/dialogs/renderwidget.cpp:950
#7  0x0000000000893a67 in RenderWidget::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, 
    _id=<optimized out>, _a=<optimized out>)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/build/src/kdenlive_automoc.dir/dialogs/moc_renderwidget.cpp:337
#8  0x00007ffff0a664e9 in QMetaObject::activate(QObject*, int, int, void**) ()
   from /usr/lib/libQt5Core.so.5
#9  0x00007ffff1b6b142 in QAbstractButton::clicked(bool) () from /usr/lib/libQt5Widgets.so.5
---Type <return> to continue, or q <return> to quit---
#10 0x00007ffff1b6b394 in ?? () from /usr/lib/libQt5Widgets.so.5
#11 0x00007ffff1b6c787 in ?? () from /usr/lib/libQt5Widgets.so.5
#12 0x00007ffff1b6c964 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()
   from /usr/lib/libQt5Widgets.so.5
#13 0x00007ffff1acaf18 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#14 0x00007ffff1a83e3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/libQt5Widgets.so.5
#15 0x00007ffff1a8c46d in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#16 0x00007ffff0a3ac80 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
   from /usr/lib/libQt5Core.so.5
#17 0x00007ffff1a8ab1d in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQt5Widgets.so.5
#18 0x00007ffff1ae4fc0 in ?? () from /usr/lib/libQt5Widgets.so.5
#19 0x00007ffff1ae7763 in ?? () from /usr/lib/libQt5Widgets.so.5
#20 0x00007ffff1a83e3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/libQt5Widgets.so.5
#21 0x00007ffff1a8b5b1 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#22 0x00007ffff0a3ac80 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
   from /usr/lib/libQt5Core.so.5
#23 0x00007ffff0f890e3 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/libQt5Gui.so.5
#24 0x00007ffff0f8ac65 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/libQt5Gui.so.5
#25 0x00007ffff0f68cbb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Gui.so.5
---Type <return> to continue, or q <return> to quit---
#26 0x00007fffdd921310 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#27 0x00007fffe809add7 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#28 0x00007fffe809b040 in ?? () from /usr/lib/libglib-2.0.so.0
#29 0x00007fffe809b0ec in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#30 0x00007ffff0a8f57f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/libQt5Core.so.5
#31 0x00007ffff0a390da in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/libQt5Core.so.5
#32 0x00007ffff0a415cc in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#33 0x000000000048aa52 in main (argc=<optimized out>, argv=<optimized out>)
    at /tmp/yaourt-tmp-farid/aur-kdenlive-git/src/kdenlive/src/main.cpp:158
Comment 2 Wegwerf 2016-08-05 17:37:55 UTC
Anton, Farid, is this bug still present on recent beta 16.07.90?
Comment 3 farid 2016-08-06 02:32:10 UTC
yes
Comment 4 Wegwerf 2016-08-06 11:18:35 UTC
So I've played around with timeline::checkProjectAudio() which seems to have an index issue, maybe that's a regression that crept in undetected during the timeline refactoring. When I correct the loop to iterate over only existing tracks, that is "m_track.count()-1" then Kdenlive does not crash.

But now MLT aborts rendering "Rendering crashed. Video without audio track". Sweet. Not. Checking "Render without audio" doesn't help either.
Comment 5 Jean-Baptiste Mardelle 2016-08-06 20:18:34 UTC
Git commit 4d73b022f054555df147c5a31edccc5d96d4c3db by Jean-Baptiste Mardelle.
Committed on 06/08/2016 at 20:17.
Pushed by mardelle into branch 'Applications/16.08'.

Fix crash when rendering with audio muted

M  +8    -6    src/timeline/timeline.cpp

http://commits.kde.org/kdenlive/4d73b022f054555df147c5a31edccc5d96d4c3db
Comment 6 Wegwerf 2016-08-08 16:01:45 UTC
Works like a charm now. Thank you very much for fixing this bug, Jean-Baptiste! Another bug killed from the backlog.