Subject: 29.0.50; PGTK cannot yank after second frame is deleted
From: Protesilaos Stavrou <[email-masked]>
To: [email-masked]
Date: Thu, 07 Jul 2022 15:01:06 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Dear maintainers,

I can reproduce the following on emacs -Q:

1. Produce a second frame with either M-x tear-off-window or C-x 5 b BUFFER

2. Mark a region with some text and type M-w

3. Delete the frame either via the system's window manager or C-x 5 0

4. Type C-y

5. Emacs hangs and displays the echo area message "Waiting for reply from
   selection owner..."

Setting debug-on-error to non-nil has no effect.  When Emacs hangs, the
shell prints this:

    (emacs:2090): GLib-GObject-CRITICAL **: 14:53:23.604: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

I am using the GNOME desktop right now.

Can you reproduce it on your end?  Do you want me to test something else?

All the best,
Protesilaos (or simply "Prot")

* * *

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6)
 of 2022-07-06 built on kronos
Repository revision: f65e4c46a3418c7f24f53503feda42e844951997
Repository branch: master
System Description: Arch Linux

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
 --with-modules --without-libotf --without-m17n-flt --without-gconf
 --with-native-compilation --with-xinput2 --with-pgtk --without-xaw3d
 --with-sound=no --without-gpm --without-compress-install
 '--program-transform-name=s/\([ec]tags\)/\1.emacs/'
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions
 -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security
 -fstack-clash-protection -fcf-protection'
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK
PNG RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP XIM GTK3
ZLIB

Important settings:
  value of $LANG: C
  locale-coding-system: nil

-- 
Protesilaos Stavrou
https://protesilaos.com