Bug 442101

Summary: Crash when dragging a clip onto the timeline
Product: [Applications] kdenlive Reporter: fizyk20
Component: Timeline & EditingAssignee: Jean-Baptiste Mardelle <jb>
Status: CONFIRMED ---    
Severity: crash CC: asturm, fritzibaby, mail, r+kde, s
Priority: NOR Keywords: triaged
Version First Reported In: 21.08.1   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Example clip
GDB log
Console output
GDB Log (run with Nvidia GPU)
Console output (run with Nvidia GPU)
screenshot showing weird circled-number glyphs

Description fizyk20 2021-09-07 00:41:08 UTC
Created attachment 141346 [details]
Example clip

Whenever I try to drag a clip to the timeline in Kdenlive 21.x, it crashes.

I definitely experienced the problem on 21.08.1, 21.08.0 and 21.04.3, but I remember that it started happening the first time I upgraded to 21.x, and for that reason I stayed on 20.12.3 for a long time (20.12.3 didn't crash and if I downgrade, it still doesn't).

STEPS TO REPRODUCE
1. Launch Kdenlive
2. Add the attached clip (though any clip I tried worked for me so far
3. Drag the clip to the timeline

OBSERVED RESULT

Kdenlive crashes.

EXPECTED RESULT

Clip is added to the timeline.
SOFTWARE/OS VERSIONS
Linux: Gentoo 5.13.12
KDE: 5.85 (not a full installation, only the required packages, as I'm using i3)
Qt Version: 5.15.2

ADDITIONAL INFORMATION

I'm providing an example clip that triggers the issue for me, a backtrace from gdb and the output from the console.
Comment 1 fizyk20 2021-09-07 00:41:43 UTC
Created attachment 141347 [details]
GDB log
Comment 2 fizyk20 2021-09-07 00:42:03 UTC
Created attachment 141348 [details]
Console output
Comment 3 emohr 2021-09-08 15:31:43 UTC
I can put your test clip into the timeline without crash. According the crash log MLT seems not proper installed. You need MLT7 with Kdenlive 21.08. Please check with the AppImage from the download site to see if this is a packaging issue. https://kdenlive.org/en/download/
Comment 4 fizyk20 2021-09-08 15:51:16 UTC
I've tried the AppImage before, same symptoms.

Why do you say MLT is not properly installed? I have it at 7.0.1:

$ melt --version
melt 7.0.1
Copyright (C) 2002-2021 Meltytech, LLC
<https://www.mltframework.org/>
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Comment 5 emohr 2021-09-08 17:37:01 UTC
The console output is showing: " MESA-LOADER: failed to open iris: ". Do you have updated all graphic card driver? 

Do you have enabled movit? If so please disable it to see if it's working.
Comment 6 fizyk20 2021-09-08 18:04:27 UTC
Ah. That seems related to the fact that I have a hybrid Intel/Nvidia laptop. When I run Kdenlive with PRIME, on the Nvidia GPU, that warning is gone, but the crash happens all the same.

Movit is disabled.
Comment 7 emohr 2021-09-08 18:22:25 UTC
Maybe this helps: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3477
Comment 8 fizyk20 2021-09-08 21:35:32 UTC
I'm not sure if it's even a problem. Nothing else seems to be affected. I've tried running glxgears like this thread suggested, it prints that error as well, but runs without issues afterwards.
Comment 9 emohr 2021-09-09 15:01:57 UTC
I guess your PC doesn't find the iris driver for the Intel GPU. I'm not an expert but it looks like Kdenlive crashed as soon as it should show thumbnails. Can you "switch off" the Intel GPU before you start Kdenlive?
Comment 10 fizyk20 2021-09-09 15:19:04 UTC
I can run it on the Nvidia GPU with PRIME. No messages about iris appear then, so I take it that it loads successfully, but the crash still happens. I'll add the output and gdb log from running with PRIME, too.
Comment 11 fizyk20 2021-09-09 15:19:37 UTC
Created attachment 141424 [details]
GDB Log (run with Nvidia GPU)
Comment 12 fizyk20 2021-09-09 15:20:01 UTC
Created attachment 141425 [details]
Console output (run with Nvidia GPU)
Comment 13 fizyk20 2021-09-09 15:52:53 UTC
Just to make sure, I digged deeper and eventually rebuilt Mesa with the Iris driver. The messages disappeared even when running on the Intel GPU, but the crash still happens.
Comment 14 fizyk20 2021-12-15 11:17:07 UTC
Just tried 21.12 - still happening, unfortunately :(
Comment 15 Shawn Rutledge 2022-03-31 05:47:03 UTC
I haven't been able to use kdenlive since some time early last year (?) because of this.

#0  0x00007ffff4e0b34c in __pthread_kill_implementation () at /usr/lib/libc.so.6
#1  0x00007ffff4dbe4b8 in raise () at /usr/lib/libc.so.6
#2  0x00007ffff4da8534 in abort () at /usr/lib/libc.so.6
#3  0x00007ffff4dff397 in __libc_message () at /usr/lib/libc.so.6
#4  0x00007ffff4e1533c in  () at /usr/lib/libc.so.6
#5  0x00007ffff4e185ec in _int_malloc () at /usr/lib/libc.so.6
#6  0x00007ffff4e19629 in malloc () at /usr/lib/libc.so.6
#7  0x00007ffff5f0ad88 in QImageData::create(QSize const&, QImage::Format) () at /usr/lib/libQt5Gui.so.5
#8  0x00007ffff5f0aeb1 in QImage::QImage(QSize const&, QImage::Format) () at /usr/lib/libQt5Gui.so.5
#9  0x00007ffff5f0aef8 in QImage::QImage(int, int, QImage::Format) () at /usr/lib/libQt5Gui.so.5
#10 0x00007ffff5f12bb7 in QImage::copy(QRect const&) const () at /usr/lib/libQt5Gui.so.5
#11 0x00007ffff5f0b9b7 in QImage::detach() () at /usr/lib/libQt5Gui.so.5
#12 0x00007ffff5f11ccd in QImage::setColor(int, unsigned int) () at /usr/lib/libQt5Gui.so.5
#13 0x00007ffff02046b3 in  () at /usr/lib/libQt5XcbQpa.so.5
#14 0x00007ffff618c200 in QTextureGlyphCache::textureMapForGlyph(unsigned int, QFixed) const () at /usr/lib/libQt5Gui.so.5
#15 0x00007ffff620d512 in QOpenGLTextureGlyphCache::fillTexture(QTextureGlyphCache::Coord const&, unsigned int, QFixed) () at /usr/lib/libQt5Gui.so.5
#16 0x00007ffff6185164 in QTextureGlyphCache::fillInPendingGlyphs() () at /usr/lib/libQt5Gui.so.5
#17 0x00007ffff7017992 in  () at /usr/lib/libQt5Quick.so.5
#18 0x00007ffff70a627b in QQuickTextNode::addGlyphs(QPointF const&, QGlyphRun const&, QColor const&, QQuickText::TextStyle, QColor const&, QSGNode*) () at /usr/lib/libQt5Quick.so.5
#19 0x00007ffff70b5aa9 in  () at /usr/lib/libQt5Quick.so.5
#20 0x00007ffff70a3275 in QQuickTextNode::addTextLayout(QPointF const&, QTextLayout*, QColor const&, QQuickText::TextStyle, QColor const&, QColor const&, QColor const&, QColor const&, int, int, int, int) () at /usr/lib/libQt5Quick.so.5
#21 0x00007ffff70acc01 in QQuickText::updatePaintNode(QSGNode*, QQuickItem::UpdatePaintNodeData*) () at /usr/lib/libQt5Quick.so.5
#22 0x00007ffff7096768 in QQuickWindowPrivate::updateDirtyNode(QQuickItem*) () at /usr/lib/libQt5Quick.so.5
#23 0x00007ffff7096f35 in QQuickWindowPrivate::updateDirtyNodes() () at /usr/lib/libQt5Quick.so.5
#24 0x00007ffff7084145 in QQuickWindowPrivate::syncSceneGraph() () at /usr/lib/libQt5Quick.so.5
#25 0x00007ffff711385e in QQuickRenderControl::sync() () at /usr/lib/libQt5Quick.so.5
#26 0x00007ffff7380f55 in  () at /usr/lib/libQt5QuickWidgets.so.5
#27 0x00007ffff73826d4 in QQuickWidget::timerEvent(QTimerEvent*) () at /usr/lib/libQt5QuickWidgets.so.5
#28 0x00007ffff5546766 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#29 0x00007ffff65661c6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#30 0x00007ffff55225aa in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#31 0x00007ffff556ddd5 in QTimerInfoList::activateTimers() () at /usr/lib/libQt5Core.so.5
#32 0x00007ffff556e402 in  () at /usr/lib/libQt5Core.so.5
#33 0x00007ffff359b163 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#34 0x00007ffff35f19e9 in  () at /usr/lib/libglib-2.0.so.0
#35 0x00007ffff35986c5 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#36 0x00007ffff556e57a in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#37 0x00007ffff551a88b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#38 0x00007ffff5ef907a in QBasicDrag::drag(QDrag*) () at /usr/lib/libQt5Gui.so.5
#39 0x00007ffff5efb479 in QDragManager::drag(QDrag*) () at /usr/lib/libQt5Gui.so.5
#40 0x00007ffff5efb972 in QDrag::exec(QFlags<Qt::DropAction>, Qt::DropAction) () at /usr/lib/libQt5Gui.so.5
#41 0x000055555570f13d in  ()
#42 0x00007ffff659c826 in QWidget::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#43 0x00007ffff664d4c3 in QFrame::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#44 0x00007ffff552132a in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#45 0x00007ffff65661b5 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#46 0x00007ffff656aff7 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
Comment 16 Shawn Rutledge 2022-03-31 05:48:32 UTC
... that's across quite a few versions, but the current one is extra/kdenlive 21.12.3-1 on Arch; melt --version says 7.6.0
Comment 17 Shawn Rutledge 2022-03-31 06:00:59 UTC
Created attachment 147855 [details]
screenshot showing weird circled-number glyphs

Since gdb shows that it has something to do with populating glyphs into the cache while rendering text, I wonder if this is related: parts of the UI are choosing a strange font or unicode range (?) to show time values.  Maybe at some point it chooses a glyph that doesn't exist, that generates a zero-size image or so?
Comment 18 Shawn Rutledge 2022-03-31 06:12:54 UTC
It doesn't matter whether I "Use GPU processing", in fact I didn't have movit installed until now, so that was not possible before.  But FWIW I have a Radeon RX480, amdgpu driver, Linux 5.14.6 and I doubt that it could be a driver or Mesa bug since I have been testing Qt Quick and Qt Quick 3D regularly.
Comment 19 Robert Günzler 2022-05-11 14:01:29 UTC
I experience the same problem using the latest AppImage bundle: kdenlive-master-212-linux-64-gcc.AppImage
This is made even worse when kdenlive uses wayland, since it crashes the compositor
Comment 20 Robert Günzler 2022-06-22 13:15:07 UTC
I found that running kdenlive with firejail and supplying the following kendlive.local config removes the issue:

blacklist /usr/share/fonts/noto-emoji

Without this setting I see a similar font glitch to what Shawn describes, where the 'clip properties' panel is rendering text with emoji characters in places where there shouldn't be any...

Maybe this is somehow related to https://bugreports.qt.io/browse/QTBUG-82311 ?
Comment 21 emohr 2024-01-01 11:37:30 UTC
 I’m not 100% curtain but I think we have fixed this emoji issue. Please try with the current Kdenlive AppImage version 23.08.4: https://kdenlive.org/en/download/
Comment 22 Andreas Sturmlechner 2024-01-02 18:05:35 UTC
(In reply to emohr from comment #21)
>  I’m not 100% curtain but I think we have fixed this emoji issue. Please try
> with the current Kdenlive AppImage version 23.08.4:
> https://kdenlive.org/en/download/
Any reason why the appimage would be better than distro provided 23.08.4 in that regard?
Comment 23 emohr 2024-01-03 08:33:31 UTC
AppImage, Flatpak and Ubuntu PPA are made by the Kdenlive team, they are tested and contains all actual dependencies needed. Kdenlive has no influence on distro packages so they could contain have missing or wrong dependencies.