wlroots sends an xdg_surface must have a role error to a xdg_surface with an active xdg_popup role
This issue manifests itself as Evolution sometimes (but not always) crashing when opening an editor window (e.g., when attempting to reply to an e-mail) when running under Sway. The crash seems is accompanied by one of two possible error messages from GTK, either Error 71 (Protocol error) dispatching to Wayland display
or Lost connection to Wayland compositor
.
The issue was first reported to the Evolution bug tracker. The Evolution maintainers believed it to be a GTK bug and reassigned it to the GTK bug tracker. The GTK developers then went on to conclude that it is a wlroots bug. The bug title used here is the their one-line summary of the problem.
The original bug report is found at https://gitlab.gnome.org/GNOME/gtk/-/issues/5533. It contains a WAYLAND_DEBUG=1
log of the crash (direct link) as well as a backtrace (direct link).
Note that I have very little knowledge about the inner workings of Wayland, wlroots and GTK, as I am just an ordinary user of Evolution and Sway. If there are any follow-up questions, it is probably most efficient to take those directly with the GTK developers in the issue linked above. That said, if you do not have an account in the GNOME GitLab or would for some other reason prefer not to do follow up there, I would be happy to serve as a proxy.