https://bugs.kde.org/show_bug.cgi?id=431505

            Bug ID: 431505
           Summary: Kdenlive crashes instantly on Wayland due to EGL
                    format mismatch
           Product: kdenlive
           Version: 20.12.1
          Platform: FreeBSD Ports
                OS: FreeBSD
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: User Interface
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

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

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to