graesslin created this revision. graesslin added reviewers: Plasma, bshah. Restricted Application added a project: Plasma on Wayland. Restricted Application added a subscriber: plasma-devel.
REVISION SUMMARY In the situation that a wl_client gets destroyed while still wl_resources are around it can happen that one of them calls into the ClientConnection during the cleanup handling which gets triggered at the same time. This can then trigger a crash. This change uses deleteLater for the ClientConnection and sets the hold wl_client pointer to null instead of deleting directly. So the ClientConnection is still around while the Resources gets cleaned up. This is similar to the cleanup of Resource where on unbind the wl_resource pointer is set to null and the Resource gets delete later. BUG: 370232 FIXED-IN: 5.28 REPOSITORY rKWAYLAND KWayland BRANCH fix-client-disconnecting REVISION DETAIL https://phabricator.kde.org/D3004 AFFECTED FILES autotests/client/test_wayland_shell.cpp autotests/server/test_display.cpp src/server/clientconnection.cpp EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: graesslin, #plasma, bshah Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas