If you build kwin master from scratch stray files from old builds can cause crashes. We've had a few duplicate bug reports of this, so I'm sending an email.
The most important file to remove is. $prefix/lib/qt5/plugins/org.kde.kwin.waylandbackends/KWinWaylandWaylandBackend.so You can also safely remove: $prefix/lib/plugins/kf5/org.kde.kwindowsystem.platforms/KF5WindowSystemKWinPrivatePlugin.so $prefix/lib/plugins/kf5/org.kde.kglobalaccel5.platforms/KF5GlobalAccelPrivateKWin.so $prefix/lib/plugins/kf5/org.kde.kidletime.platforms/KF5IdleTimeKWinWaylandPrivatePlugin.so This code is now bundled inside kwin, as it is very kwin-specific. If you run unit tests, please clean the build dir. Distro packages are unaffected. David