(gdb) #0 QScopedPointer<KWaylandServer::SurfaceInterfacePrivate, QScopedPointerDeleter<KWaylandServer::SurfaceInterfacePrivate> >::operator->() const (this=0x10) at /opt/qt5/include/QtCore/qscopedpointer.h:118 #1 0x00007f2653ca48d9 in KWaylandServer::SurfaceInterface::size() const (this=0x0) at /home/david/projects/kde5/src/kde/workspace/kwayland-server/src/server/surface_interface.cpp:807 #2 0x00007f26567a08d0 in KWin::WindowPixmap::shape() const (this=0x56436e79f060) at /home/david/projects/kde5/src/kde/workspace/kwin/scene.cpp:1278 #3 0x00007f265679fa6b in KWin::Scene::Window::makeContentsQuads() const (this=0x56436dd25650) at /home/david/projects/kde5/src/kde/workspace/kwin/scene.cpp:1030 #4 0x00007f265679f44b in KWin::Scene::Window::buildQuads(bool) const (this=0x56436dd25650, force=false) at /home/david/projects/kde5/src/kde/workspace/kwin/scene.cpp:903 #5 0x00007f265679b88d in KWin::Scene::paintSimpleScreen(int, QRegion const&) (this=0x56436cc10e20, orig_mask=0, region=...) at /home/david/projects/kde5/src/kde/workspace/kwin/scene.cpp:295 #6 0x00007f264c1e0c42 in KWin::SceneOpenGL2::paintSimpleScreen(int, QRegion const&) (this=0x56436cc10e20, mask=0, region=...) at /home/david/projects/kde5/src/kde/workspace/kwin/plugins/scenes/opengl/scene_opengl.cpp:1010 #7 0x00007f265679a93a in KWin::Scene::finalPaintScreen(int, QRegion const&, KWin::ScreenPaintData&) (this=0x56436cc10e20, mask=0, region=..., data=...) at /home/david/projects/kde5/src/kde/workspace/kwin/scene.cpp:188 #8 0x00007f265669e6ff in KWin::EffectsHandlerImpl::paintScreen(int, QRegion const&, KWin::ScreenPaintData&) (this=0x56436d457000, mask=0, region=..., data=...) at /home/david/projects/kde5/src/kde/workspace/kwin/effects.cpp:386 #9 0x00007f26561f934d in KWin::Effect::paintScreen(int, QRegion const&, KWin::ScreenPaintData&) (this=0x56436d432b20, mask=0, region=..., data=...) I'm not sure I get the current code QRegion WindowPixmap::shape() const { if (subSurface()) return QRect(QPoint(), surface()->size()); return m_window->clientShape(); } Is it meaning to check surface and is a typo?
Hmm, this crash is really strange. My assumption was that the surface tree never contains inert sub-surfaces. As for the WindowPixmap::shape() method, it returns the shape of the pixmap. For X11 windows, it corresponds to the bounding shape. For Wayland surfaces, it is QRect(QPoint(0, 0), size) since the Shape extension is X11-only.
My backtrace for https://invent.kde.org/plasma/kwin/-/merge_requests/408 is identical to David's.
FWIW, I found that checking only for surface() without subSurface() lead to black window decorations on XWayland clients.