| Summary: | Kdenlive crashes instantly on Wayland due to EGL format mismatch | ||
|---|---|---|---|
| Product: | [Applications] kdenlive | Reporter: | login.kde |
| Component: | User Interface & Miscellaneous | Assignee: | Jean-Baptiste Mardelle <jb> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | alex765, fritzibaby, geisserml, jacques.noe.kde, julius.kuenzel, kirill.bogdanenko, omeritzicschwartz, rdieter, tom |
| Priority: | NOR | Flags: | fritzibaby:
Brainstorm+
|
| Version First Reported In: | 20.12.1 | ||
| Target Milestone: | --- | ||
| Platform: | FreeBSD Ports | ||
| OS: | FreeBSD | ||
| Latest Commit: | https://invent.kde.org/multimedia/kdenlive/commit/be5f24f72a6b4189b6069a71bef53041689a330a | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
| Attachments: | attachment-20422-0.html | ||
I can confirm the same (or very similar) error on fedora 33, plasma-5.21.2 wayland session tail end of console output: QQmlEngine::setContextForObject(): Object already has a QQmlContext QQmlEngine::setContextForObject(): Object already has a QQmlContext QWaylandGLContext::makeCurrent: eglError: 3009, this: 0x5626634b3b20 QWaylandGLContext::makeCurrent: eglError: 3009, this: 0x5626634cd5e0 QWaylandGLContext::makeCurrent: eglError: 3009, this: 0x7f98d80084d0 QOpenGLFunctions created with non-current context The Wayland connection experienced a fatal error: Bad file descriptor Unable to start Dr. Konqi Please try with the current Kdenlive AppImage version 21.04.0 to see if there are any packaging issues https://download.kde.org/stable/kdenlive/21.04/linux/ (In reply to login.kde from comment #0) > Specifically the issue seems to be the lack of depth and stencil buffer. > This patch lets kdenlive work on wayland at least without the GPU engine > (that one throws an egl error 3002 - EGL_BAD_ACCESS in makeCurrent): Thanks for that! Can you open a merge request at https://invent.kde.org/multimedia/kdenlive/ ? I think this could be similar to this Bug 433393 *** Bug 433393 has been marked as a duplicate of this bug. *** I can confirm this issue with the Kdenlive version that is currently in Neon User. *** Bug 438746 has been marked as a duplicate of this bug. *** There is a workaround (that defeats the purpose of running. Kdenlive on Wayland) QT_QPA_PLATFORM=xkb kdenlive Created attachment 139478 [details] attachment-20422-0.html Hello, Thank you for the support. There is a typo in the workaround, it is "QT_QPA_PLATFORM=xcb kdenlive". kdenlive works well now. Best regards, Jacques Noé Le jeu. 17 juin 2021 à 21:04, Kyrylo Bohdanenko <bugzilla_noreply@kde.org> a écrit : > https://bugs.kde.org/show_bug.cgi?id=431505 > > --- Comment #8 from Kyrylo Bohdanenko <kirill.bogdanenko@gmail.com> --- > There is a workaround (that defeats the purpose of running. Kdenlive on > Wayland) > > QT_QPA_PLATFORM=xkb kdenlive > > -- > You are receiving this mail because: > You are on the CC list for the bug. Git commit 185b30362f1f2a3cf340e6fbcd92cd41157e2c9d by Jean-Baptiste Mardelle. Committed on 18/06/2021 at 14:41. Pushed by mardelle into branch 'master'. Fix startup crash on Wayland, thanks to login.kde@unrelenting.technology M +4 -1 src/monitor/glwidget.cpp https://invent.kde.org/multimedia/kdenlive/commit/185b30362f1f2a3cf340e6fbcd92cd41157e2c9d Thanks for merging the patch, but what about this? (Comment 0) > that one [the GPU engine] throws an egl error 3002 - EGL_BAD_ACCESS in makeCurrent Also, I'd like to mention this bug is to some extent a regression, because I remember older versions of kdenlive (i.e. what was in Neon User at the time of Plasma 5.20) worked just fine on Wayland, even in gpu mode. remarking resolved, guessing/hoping the prior comment re-opening was unintentional It was certainly intentional. If you read my previous comment you should know why. Git commit be5f24f72a6b4189b6069a71bef53041689a330a by Jean-Baptiste Mardelle. Committed on 25/06/2021 at 12:37. Pushed by mardelle into branch 'release/21.04'. Fix startup crash on Wayland, thanks to login.kde@unrelenting.technology M +4 -1 src/monitor/glwidget.cpp https://invent.kde.org/multimedia/kdenlive/commit/be5f24f72a6b4189b6069a71bef53041689a330a |
SUMMARY As soon as the kdenlive window appears, it crashes: QWaylandGLContext::makeCurrent: eglError: 3009, this: 0xb99e12c94a0 QWaylandGLContext::makeCurrent: eglError: 3009, this: 0xb99e12c9080 QWaylandGLContext::makeCurrent: eglError: 3009, this: 0xb99f643c780 QOpenGLFunctions created with non-current context ASSERT: "QOpenGLFunctions::isInitialized(d_ptr)" in file /usr/local/include/qt5/QtGui/qopenglfunctions.h, line 949 It seems that Qt (still) doesn't implement pbuffer support on Wayland-EGL, so an invisible wayland surface is used. This means that the formats of the offscreen surface and the window surface have to match, otherwise EGL refuses to makeCurrent and everything breaks. Specifically the issue seems to be the lack of depth and stencil buffer. This patch lets kdenlive work on wayland at least without the GPU engine (that one throws an egl error 3002 - EGL_BAD_ACCESS in makeCurrent): --- src/monitor/glwidget.cpp.orig 2021-01-12 13:57:33 UTC +++ src/monitor/glwidget.cpp @@ -120,7 +120,10 @@ GLWidget::GLWidget(int id, QObject *parent) setPersistentSceneGraph(true); setClearBeforeRendering(false); setResizeMode(QQuickView::SizeRootObjectToView); - m_offscreenSurface.setFormat(QOpenGLContext::globalShareContext()->format()); + auto fmt = QOpenGLContext::globalShareContext()->format(); + fmt.setDepthBufferSize(format().depthBufferSize()); + fmt.setStencilBufferSize(format().stencilBufferSize()); + m_offscreenSurface.setFormat(fmt); m_offscreenSurface.create(); m_refreshTimer.setSingleShot(true); SOFTWARE/OS VERSIONS FreeBSD: 13-CURRENT + drm 5.4-lts Mesa(RadeonSI): master Wayfire/wlroots: master KDE Frameworks Version: 5.77.0 Qt Version: 5.15.2