Bug 358402

Summary: Segmentation fault when adding a new track
Product: [Applications] kdenlive Reporter: bass_dr
Component: User Interface & MiscellaneousAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED FIXED    
Severity: normal CC: wegwerf-1-2-3
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description bass_dr 2016-01-23 08:30:25 UTC
kdenlive-15.12.0, mlt-0.9.8

To reproduce:
Click on Project, Track, Insert Track
Click on OK
Always SIGFAULT

Here is the backtrace:

(gdb) run
Starting program: /usr/local/bin/kdenlive 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffee372700 (LWP 27133)]
[New Thread 0x7fffed946700 (LWP 27138)]
Icon theme "breeze" not found.
[New Thread 0x7fffdf97f700 (LWP 14516)]
[New Thread 0x7fffde97e700 (LWP 14565)]
Removing cache at "/home/david/.cache/kdenlive-thumbs.kcache"
[producer_xml] failed to load transition "frei0r.cairoblend"
[producer_xml] failed to load transition "frei0r.cairoblend"
[New Thread 0x7fffd7fff700 (LWP 14947)]
[New Thread 0x7fffd77fe700 (LWP 14955)]
[New Thread 0x7fffd6ffd700 (LWP 14956)]
[New Thread 0x7fffd67fc700 (LWP 14970)]
0x1597e70 void QWindowPrivate::setTopLevelScreen(QScreen*, bool) ( QScreen(0xb3fed0) ): Attempt to set a screen on a child window.
[New Thread 0x7fffd5ffb700 (LWP 20580)]
[Thread 0x7fffd5ffb700 (LWP 20580) exited]
[New Thread 0x7fffd5ffb700 (LWP 20600)]
[New Thread 0x7fffd57fa700 (LWP 20601)]
[New Thread 0x7fffd4ff9700 (LWP 20617)]
0x14cbf70 void QWindowPrivate::setTopLevelScreen(QScreen*, bool) ( QScreen(0xb3fed0) ): Attempt to set a screen on a child window.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6f7a6db in mlt_service_connect_producer () from /usr/lib64/libmlt.so.6
(gdb) bt
#0  0x00007ffff6f7a6db in mlt_service_connect_producer () from /usr/lib64/libmlt.so.6
#1  0x00007ffff6f839c9 in mlt_transition_connect () from /usr/lib64/libmlt.so.6
#2  0x00007ffff6f84227 in mlt_field_plant_transition () from /usr/lib64/libmlt.so.6
#3  0x00000000007b48de in Render::mltInsertTrack (this=0x19bc780, ix=ix@entry=3, name=..., videoTrack=videoTrack@entry=true)
    at /home/david/build/kdenlive-15.12.0/src/renderer.cpp:3163
#4  0x000000000054eefd in CustomTrackView::addTrack (this=<optimized out>, type=..., ix=3)
    at /home/david/build/kdenlive-15.12.0/src/timeline/customtrackview.cpp:3170
#5  0x00007ffff3231778 in QUndoStack::push(QUndoCommand*) () from /usr/lib64/libQt5Widgets.so.5
#6  0x000000000051536c in CustomTrackView::slotInsertTrack (this=0x17f3040, ix=3, ix@entry=1)
    at /home/david/build/kdenlive-15.12.0/src/timeline/customtrackview.cpp:6545
#7  0x000000000077e7bd in MainWindow::slotInsertTrack (this=0xb912e0) at /home/david/build/kdenlive-15.12.0/src/mainwindow.cpp:2021
#8  0x00000035e685fd52 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#9  0x00007ffff2eab7c2 in QAction::triggered(bool) () from /usr/lib64/libQt5Widgets.so.5
#10 0x00007ffff2eade18 in QAction::activate(QAction::ActionEvent) () from /usr/lib64/libQt5Widgets.so.5
#11 0x00007ffff301090a in QMenuPrivate::activateCausedStack(QList<QPointer<QWidget> > const&, QAction*, QAction::ActionEvent, bool) ()
   from /usr/lib64/libQt5Widgets.so.5
#12 0x00007ffff3016374 in QMenuPrivate::activateAction(QAction*, QAction::ActionEvent, bool) () from /usr/lib64/libQt5Widgets.so.5
#13 0x00007ffff301af8a in QMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libQt5Widgets.so.5
#14 0x00007ffff2ef8a38 in QWidget::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#15 0x00007ffff301b793 in QMenu::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#16 0x00007ffff2eb5a1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#17 0x00007ffff2ebb6f1 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#18 0x00000035e683841d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#19 0x00007ffff2eba1fa in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) ()
   from /usr/lib64/libQt5Widgets.so.5
#20 0x00007ffff2f109a3 in QWidgetWindow::handleMouseEvent(QMouseEvent*) () from /usr/lib64/libQt5Widgets.so.5
#21 0x00007ffff2f12d13 in QWidgetWindow::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#22 0x00007ffff2eb5a1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#23 0x00007ffff2ebae00 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#24 0x00000035e683841d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#25 0x00007ffff2370c33 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib64/libQt5Gui.so.5
#26 0x00007ffff2372875 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
   from /usr/lib64/libQt5Gui.so.5
#27 0x00007ffff2358e84 in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Gui.so.5
#28 0x00007ffff164b010 in userEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/qt5/plugins/platforms/libqxcb.so
#29 0x00000031ef8498ed in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#30 0x00000031ef849bd0 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#31 0x00000031ef849c7c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#32 0x00000035e68835ac in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#33 0x00000035e683713b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#34 0x00000035e683db06 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
---Type <return> to continue, or q <return> to quit---
#35 0x00000000004630aa in main (argc=1, argv=<optimized out>) at /home/david/build/kdenlive-15.12.0/src/main.cpp:118
Comment 1 Wegwerf 2016-01-23 13:53:28 UTC
Works with Kdenlive 15.13 git master and MLT 0.9.9 fine, cannot reproduce crash here.

Did you install the (separate) frei0r package with effects and transitions? I see this here: "[producer_xml] failed to load transition "frei0r.cairoblend"", so some frei0r stuff seems to be not installed.
Comment 2 bass_dr 2016-01-23 17:09:48 UTC
Hi, thanks for the reply!

I could fix the crash, the problem was a dependency on open-cv I think (or frei0r version?)

I had media-plugins/frei0r-plugins-1.3 installed from gentoo's repos, and both ffmeg-2.6 and mlt-0.9.8-r2 built against it (with frei0r USE flag).

I had to updated to frei0r-plugins-1.4 and it pointed out a dependency issues with opencv (the build failed), so I:
- Updated to media-libs/opencv-3.0.0 (was 2.3.0)
    - opencv-3 now supports USE=qt5

I'll report the dependency issue at Gentoo, but maybe you could also add some dependency versions check in CMake?
Thanks for the support and this great app!