Subject: Re: bug#70073: 29.3; Emacs-PGTK crashes upon marking some text inside emacs and then middle clicking outside of Emacs

From: "Abraham S.A.H." <[email-masked]>
Date: Fri, 12 Apr 2024 20:41:02 +0200 (CEST)

> At this point, please type at the GDB prompt...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GNU gdb (GDB) 14.2
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from emacs...
(gdb) r -Q
Starting program: /usr/bin/emacs -Q
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7fffeda006c0 (LWP 60662)]
[New Thread 0x7fffe7e006c0 (LWP 60663)]
[New Thread 0x7fffed0006c0 (LWP 60664)]
[New Thread 0x7fffe74006c0 (LWP 60665)]
[New Thread 0x7fffe6a006c0 (LWP 60666)]
[New Thread 0x7fffe50006c0 (LWP 60667)]
[Detaching after vfork from child process 60668]

Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
pgtk_handle_selection_request (event=0x7fffffffc040)
    at /usr/src/debug/emacs/emacs-29.3-wayland/src/pgtkselect.c:573
warning: 573    /usr/src/debug/emacs/emacs-29.3-wayland/src/pgtkselect.c: No such file or directory
(gdb) thread apply all bt

Thread 7 (Thread 0x7fffe50006c0 (LWP 60667) "emacs"):
#0  0x00007ffff37233ad in syscall () at /usr/lib/libc.so.6
#1  0x00007ffff6fc8487 in g_cond_wait () at /usr/lib/libglib-2.0.so.0
#2  0x00007ffff6f38454 in ??? () at /usr/lib/libglib-2.0.so.0
#3  0x00007ffff6f384bc in g_async_queue_pop () at /usr/lib/libglib-2.0.so.0
#4  0x00007ffff6046c08 in ??? () at /usr/lib/libpangoft2-1.0.so.0
#5  0x00007ffff6f9c065 in ??? () at /usr/lib/libglib-2.0.so.0
#6  0x00007ffff369ab9d in ??? () at /usr/lib/libc.so.6
#7  0x00007ffff3725cdc in ??? () at /usr/lib/libc.so.6

Thread 6 (Thread 0x7fffe6a006c0 (LWP 60666) "dconf worker"):
#0  0x00007ffff371876f in poll () at /usr/lib/libc.so.6
#1  0x00007ffff6fcd306 in ??? () at /usr/lib/libglib-2.0.so.0
#2  0x00007ffff6f6d712 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007fffee1c638e in ??? () at /usr/lib/gio/modules/libdconfsettings.so
#4  0x00007ffff6f9c065 in ??? () at /usr/lib/libglib-2.0.so.0
#5  0x00007ffff369ab9d in ??? () at /usr/lib/libc.so.6
#6  0x00007ffff3725cdc in ??? () at /usr/lib/libc.so.6

Thread 5 (Thread 0x7fffe74006c0 (LWP 60665) "gdbus"):
#0  0x00007ffff371876f in poll () at /usr/lib/libc.so.6
--Type <RET> for more, q to quit, c to continue without paging--c
#1  0x00007ffff6fcd306 in ??? () at /usr/lib/libglib-2.0.so.0
#2  0x00007ffff6f6edc7 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#3  0x00007ffff71ca83c in ??? () at /usr/lib/libgio-2.0.so.0
#4  0x00007ffff6f9c065 in ??? () at /usr/lib/libglib-2.0.so.0
#5  0x00007ffff369ab9d in ??? () at /usr/lib/libc.so.6
#6  0x00007ffff3725cdc in ??? () at /usr/lib/libc.so.6

Thread 4 (Thread 0x7fffed0006c0 (LWP 60664) "pool-emacs"):
#0  0x00007ffff37233ad in syscall () at /usr/lib/libc.so.6
#1  0x00007ffff6fc8e43 in g_cond_wait_until () at /usr/lib/libglib-2.0.so.0
#2  0x00007ffff6f38425 in ??? () at /usr/lib/libglib-2.0.so.0
#3  0x00007ffff6f38587 in g_async_queue_timeout_pop () at /usr/lib/libglib-2.0.so.0
#4  0x00007ffff6fa1a5e in ??? () at /usr/lib/libglib-2.0.so.0
#5  0x00007ffff6f9c065 in ??? () at /usr/lib/libglib-2.0.so.0
#6  0x00007ffff369ab9d in ??? () at /usr/lib/libc.so.6
#7  0x00007ffff3725cdc in ??? () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7fffe7e006c0 (LWP 60663) "gmain"):
#0  0x00007ffff371876f in poll () at /usr/lib/libc.so.6
#1  0x00007ffff6fcd306 in ??? () at /usr/lib/libglib-2.0.so.0
#2  0x00007ffff6f6d712 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007ffff6f6d762 in ??? () at /usr/lib/libglib-2.0.so.0
#4  0x00007ffff6f9c065 in ??? () at /usr/lib/libglib-2.0.so.0
#5  0x00007ffff369ab9d in ??? () at /usr/lib/libc.so.6
#6  0x00007ffff3725cdc in ??? () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7fffeda006c0 (LWP 60662) "pool-spawner"):
#0  0x00007ffff37233ad in syscall () at /usr/lib/libc.so.6
#1  0x00007ffff6fc8487 in g_cond_wait () at /usr/lib/libglib-2.0.so.0
#2  0x00007ffff6f38454 in ??? () at /usr/lib/libglib-2.0.so.0
#3  0x00007ffff6f9d29e in ??? () at /usr/lib/libglib-2.0.so.0
#4  0x00007ffff6f9c065 in ??? () at /usr/lib/libglib-2.0.so.0
#5  0x00007ffff369ab9d in ??? () at /usr/lib/libc.so.6
#6  0x00007ffff3725cdc in ??? () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7ffff2090080 (LWP 60645) "emacs"):
#0  pgtk_handle_selection_request (event=0x7fffffffc040) at /usr/src/debug/emacs/emacs-29.3-wayland/src/pgtkselect.c:573
#1  0x00005555556fbc8d in pgtk_handle_selection_event (event=0x7fffffffc040) at /usr/src/debug/emacs/emacs-29.3-wayland/src/pgtkselect.c:784
#2  process_special_events () at /usr/src/debug/emacs/emacs-29.3-wayland/src/keyboard.c:4449
#3  0x00005555556fcd91 in swallow_events (do_display=true) at /usr/src/debug/emacs/emacs-29.3-wayland/src/keyboard.c:4489
#4  0x0000555555831607 in wait_reading_process_output (time_limit=<optimized out>, nsecs=<optimized out>, read_kbd=<optimized out>, do_display=<optimized out>, wait_for_cell=<optimized out>, wait_proc=<optimized out>, just_wait_proc=<optimized out>) at /usr/src/debug/emacs/emacs-29.3-wayland/src/process.c:5788
#5  0x00005555555eea46 in sit_for (timeout=<optimized out>, reading=<optimized out>, display_option=<optimized out>) at /usr/src/debug/emacs/emacs-29.3-wayland/src/dispnew.c:6264
#6  0x0000555555705551 in read_char (commandflag=1, map=0x555556dc40f3, prev_event=0x0, used_mouse_menu=0x7fffffffcb6b, end_time=0x0) at /usr/src/debug/emacs/emacs-29.3-wayland/src/keyboard.c:2881
#7  0x00005555558d7de7 in read_key_sequence.constprop.0 (keybuf=<optimized out>, prevent_redisplay=false, fix_current_buffer=<optimized out>, can_return_switch_frame=<optimized out>, dont_downcase_last=<optimized out>, prompt=<optimized out>) at /usr/src/debug/emacs/emacs-29.3-wayland/src/keyboard.c:10084
#8  0x00005555556f50f4 in command_loop_1 () at /usr/src/debug/emacs/emacs-29.3-wayland/src/keyboard.c:1384
#9  0x00005555557b50df in internal_condition_case (bfun=0x5555556f4e20 <command_loop_1>, handlers=<optimized out>, hfun=0x5555556f2890 <cmd_error>) at /usr/src/debug/emacs/emacs-29.3-wayland/src/eval.c:1474
#10 0x00005555556f2b6e in command_loop_2 (handlers=handlers@entry=0x90) at /usr/src/debug/emacs/emacs-29.3-wayland/src/keyboard.c:1133
#11 0x00005555557b5035 in internal_catch (tag=<optimized out>, func=0x5555556f2b40 <command_loop_2>, arg=0x90) at /usr/src/debug/emacs/emacs-29.3-wayland/src/eval.c:1197
#12 0x00005555556f48f9 in command_loop () at /usr/src/debug/emacs/emacs-29.3-wayland/src/keyboard.c:1111
#13 0x000055555590ceb0 in recursive_edit_1.isra.0 () at /usr/src/debug/emacs/emacs-29.3-wayland/src/keyboard.c:720
#14 0x00005555556f4e00 in Frecursive_edit () at /usr/src/debug/emacs/emacs-29.3-wayland/src/keyboard.c:803
#15 0x00005555556fa777 in main (argc=<optimized out>, argv=0x7fffffffd278) at /usr/src/debug/emacs/emacs-29.3-wayland/src/emacs.c:2521
(gdb)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--
Best Regards,
Abraham
Sent with Tutanota; https://tuta.com