Subject: Re: bug#62291: 30.0.50; PGTK copy + paste to other app problem

From: Po Lu <[email-masked]>
Date: Mon, 20 Mar 2023 19:05:24 +0800

Andrew Tropin <[email-masked]> writes:

> Hello dear maintainers!
>
> I use pgtk emacs on wayland (sway) and a few months ago started facing a
> problem with copy/pasting to ungoogled-chromium.  Tried to find relevant
> reports on bug-gun-emacs, but didn't succeed.
>
> Way to reproduce and observed behavior:
>
> 0. guix shell emacs-next-pgtk (or build a fresh emacs with pgtk from master).
> 1. Launch emacs -Q.
> 2. Select any text and optionally copy it with M-w.
> 3. Paste it to chromium address bar with middle mouse or C-v if it was
> copied with M-w.
> 4. Both chromium and emacs get frozen for some time.
> 5. After some time Emacs crashes, chromium unfreezes.
> 6. A few times I saw "waiting for reply from selection owner." in emacs
> echo area, but can't reproduce it right now.
>
> - The same workflow, but with foot terminal instead of emacs works fine.
> - The same version of Emacs, but built without PGTK, works fine too:
> guix shell emacs-next-tree-sitter -- emacs -Q
> - Copy pasting from emacs-next-pgtk to alacritty and icecat works fine.
>
> The report of this problem on bug-guix and a backtrace of segfault:
> https://yhetil.org/guix-bugs/[email-masked]/

Unfortunately, the backtrace is not helpful, because it does not include
symbols from the crashing Emacs.

Would you please run Emacs under GDB and reproduce the crash there?
Then, when Emacs crashes, type:

  (gdb) bt

then type return, and send the output here.  Thanks.