flatpak app crashes with Nvidia driver, works with Mesa driver

You can install the app Kdenlive (https://kdenlive.org) from flathub (https://flathub.org). When starting the app while using Nvidia’s official driver, the app crashes with the following backtrace:

#0  0x00000035e323304f in raise () at /lib/libc.so.6
#1  0x00000035e323447a in abort () at /lib/libc.so.6
#2  0x00007fce37b1703c in  () at /lib/libQt5Core.so.5
#3  0x00007fce37b179f9 in  () at /lib/libQt5Core.so.5
#4  0x00007fce37b125cd in qt_int_sqrt(unsigned int) () at /lib/libQt5Core.so.5
#5  0x00007fce37cfca95 in QCoreApplicationPrivate::checkReceiverThread(QObject*) () at /lib/libQt5Core.so.5
#6  0x00007fce3969a3ec in QApplication::notify(QObject*, QEvent*) () at /lib/libQt5Widgets.so.5
#7  0x00007fce37cfd04c in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/libQt5Core.so.5
#8  0x00007fce380942ce in QOffscreenSurface::create() () at /lib/libQt5Gui.so.5
#9  0x00000000008198ad in GLWidget::initializeGL() (this=0x3a4a440) at /run/build/kdenlive/src/monitor/glwidget.cpp:152
#10 0x0000000000826ce6 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (GLWidget::*)()>::call(void (GLWidget::*)(), GLWidget*, void**) (f=(void (GLWidget::*)(GLWidget * const)) 0x8197bc <GLWidget::initializeGL()>, o=0x3a4a440, arg=0x7fce04c6ab40) at /usr/include/QtCore/qobjectdefs_impl.h:136
#11 0x0000000000826ad4 in QtPrivate::FunctionPointer<void (GLWidget::*)()>::call<QtPrivate::List<>, void>(void (GLWidget::*)(), GLWidget*, void**) (f=(void (GLWidget::*)(GLWidget * const)) 0x8197bc <GLWidget::initializeGL()>, o=0x3a4a440, arg=0 x7fce04c6ab40) at /usr/include/QtCore/qobjectdefs_impl.h:169

This does not happen, when using the Mesa driver (nouveau or other).

I’m not sure, but guess it’s a bug in Kdenlive, so I have informed the maintainer about it, but he doesn’t know how to fix it. I’m posting this here in the hope that maybe someone from Nvidia or another knowledgeable developer has some idea.

I haven’t tried editing anything, but using NVIDIA’s 384.111 driver on Fedora 27 with kdenlive-17.12.1-1.fc27.x86_64 it seems to work for me. My guess is that it is actually a bug in the Qt use of OpenGL if it changes depending on OpenGL vendor. Whether or not there is anything NVIDIA could do to work around the Qt crash I don’t know. If you can update Qt (assuming there is an update…I don’t know), perhaps this would change things. FYI, my Qt5 is version 5.9.4-1.fc27.

Please read again, I’m talking about running FLATPAK-based Kdenlive, not the rpm version you are running!

I realize that…but your stack frame shows the failure is in Qt, not kdenlive. My kdenlive is a different version, and probably links to a different Qt. It just seems like the issue is in Qt interacting with the driver, and not with the application. You might want to mention which driver version you use, and which qt5-qtbase version you have.

Maybe if you post line 152 in file /run/build/kdenlive/src/monitor/glwidget.cpp, someone can tell what call is causing the crash.

Then QOffscreenSurface Class | Qt GUI 5.10 ?