From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: leohdz172--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#63614: 29.0.91; PGTK Emacs crashes after clearing the clipboard Date: Thu, 25 May 2023 20:27:18 +0000 Message-ID: References: <87zg5ssnoz.fsf@yahoo.com> Reply-To: Leonardo =?UTF-8?Q?Hern=C3=A1ndez_?= =?UTF-8?Q?Hern=C3=A1ndez?= Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40082"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63614@debbugs.gnu.org To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 26 00:40:27 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q2JdD-000AIN-5D for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 May 2023 00:40:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2Jct-00087z-2w; Thu, 25 May 2023 18:40:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2Jcp-00087Y-7J for bug-gnu-emacs@gnu.org; Thu, 25 May 2023 18:40:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q2Jco-0007zZ-V1 for bug-gnu-emacs@gnu.org; Thu, 25 May 2023 18:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q2Jco-0001YJ-Q9 for bug-gnu-emacs@gnu.org; Thu, 25 May 2023 18:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Leonardo =?UTF-8?Q?Hern=C3=A1ndez_?= =?UTF-8?Q?Hern=C3=A1ndez?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 May 2023 22:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63614 X-GNU-PR-Package: emacs Original-Received: via spool by 63614-submit@debbugs.gnu.org id=B63614.16850543445878 (code B ref 63614); Thu, 25 May 2023 22:40:02 +0000 Original-Received: (at 63614) by debbugs.gnu.org; 25 May 2023 22:39:04 +0000 Original-Received: from localhost ([127.0.0.1]:48348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2Jbq-0001We-Rd for submit@debbugs.gnu.org; Thu, 25 May 2023 18:39:04 -0400 Original-Received: from mail-4325.protonmail.ch ([185.70.43.25]:29121) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2HYZ-0006Ec-Mj for 63614@debbugs.gnu.org; Thu, 25 May 2023 16:27:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1685046445; x=1685305645; bh=qQlFdT3c+zpRvwTz50vSxOEOxFxzfFKKjkk2XVnBxGQ=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=RfQMPiF12bJN6mxxQ0zUilL6CT8rsL7D/xOzwxbOotNyqanf3QyYQY1GOCEPQTDBT TRx291VuAkFMIGKrTw8fBCqmfGuculkNgZOWonPq4EPu3Kae+saxXUgbO+0MnmnUT0 WyYXmdCaz9SalXQ+WRG4UzmiQKK5c180ko75bH+VTh+2dHwd1zug7ST94REtERUN4H 1Y2iS9eE5thHkXmVC1/VDzB7ozwjuowdbZXxvYq95MLm8VD37a4H38yKAv0KvfJ1uP ySvmITn8/1ZxlKR8EVbBNXXpTkSlJX8Qyz0HlSOX7M4lNIHNVax00wJMcOkKcHhmel VolmXHAdOYTtw== In-Reply-To: <87zg5ssnoz.fsf@yahoo.com> Feedback-ID: 45473059:user:proton X-Mailman-Approved-At: Thu, 25 May 2023 18:38:57 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:262393 Archived-At: On Thu, May 25, 2023 at 04:35:56AM -0600, Po Lu wrote: > OK, thanks. Does the crash still happen with this? >=20 > diff --git a/src/pgtkterm.c b/src/pgtkterm.c > index b8c626d81d8..bbe68f04adc 100644 > --- a/src/pgtkterm.c > +++ b/src/pgtkterm.c > @@ -6606,8 +6606,7 @@ pgtk_selection_event (GtkWidget *widget, GdkEvent *= event, >=20 > if (event->type =3D=3D GDK_PROPERTY_NOTIFY) > pgtk_handle_property_notify (&event->property); > - else if (event->type =3D=3D GDK_SELECTION_CLEAR > -=09 || event->type =3D=3D GDK_SELECTION_REQUEST) > + else if (event->type =3D=3D GDK_SELECTION_REQUEST) > { > f =3D pgtk_find_selection_owner (event->selection.window); >=20 The crash does not happen when copying text from outside emacs, however it crashes when pasting text killed from emacs, for example, open `emacs -Q` kill some text and try to paste that text outside emacs (just run `wl-paste`) Here the backtrace: (gdb) bt full #0 0x00007f1daf5d58ec in () at /usr/lib64/libc.so.6 #1 0x00007f1daf5863e2 in raise () at /usr/lib64/libc.so.6 #2 0x00005634e0ec7c68 in terminate_due_to_signal (sig=3D11, backtrace_limi= t=3D) at emacs.c:464 #3 0x00005634e0ec8abb in handle_fatal_signal (sig=3D11) at sysdep.c:1783 fatal =3D #4 deliver_thread_signal (handler=3D, sig=3D11) at sysdep.c= :1775 fatal =3D #5 deliver_fatal_thread_signal (sig=3D11) at sysdep.c:1795 fatal =3D #6 handle_sigsegv (sig=3D11, siginfo=3D0x5634e174fcb0 , arg=3D) at sysdep.c:1888 fatal =3D #7 0x00007f1daf586490 in () at /usr/lib64/libc.so.= 6 #8 pgtk_handle_selection_request (event=3D0x7fffdb8c9420) at pgtkselect.c:= 573 local_selection_time =3D dpyinfo =3D 0xe35f53a0 selection =3D 0x45 selection_symbol =3D 0x150 target =3D target_symbol =3D 0x2a30 property =3D 0x5d local_selection_data =3D success =3D false pushed =3D false alias =3D tem =3D #9 0x00005634e0fe4a75 in pgtk_handle_selection_event (event=3D0x7fffdb8c94= 20) at pgtkselect.c:784 event =3D 0x5634e16fff20 copy =3D {kind =3D SELECTION_REQUEST_EVENT, dpyinfo =3D 0xe35f53a0,= requestor =3D 0x5634e3756330, selection =3D 0x45, target =3D 0x4c, propert= y =3D 0x5d, time =3D 0} moved_events =3D #10 process_special_events () at keyboard.c:4449 event =3D 0x5634e16fff20 copy =3D {kind =3D SELECTION_REQUEST_EVENT, dpyinfo =3D 0xe35f53a0,= requestor =3D 0x5634e3756330, selection =3D 0x45, target =3D 0x4c, propert= y =3D 0x5d, time =3D 0} moved_events =3D #11 0x00005634e0fe5bed in swallow_events (do_display=3Dtrue) at keyboard.c:= 4489 old_timers_run =3D #12 0x00005634e110195c in wait_reading_process_output (time_limit=3D, nsecs=3D, read_kbd=3D, do_display=3D, wait_for_cell=3D,= wait_proc=3D, just_wait_proc=3D) at process.c:5781 leave =3D false wrapped =3D process_skipped =3D channel_start =3D child_fd =3D channel =3D nfds =3D Available =3D {fds_bits =3D {16, 0 }} Writeok =3D {fds_bits =3D {0 }} check_write =3D true check_delay =3D no_avail =3D false xerrno =3D 11 proc =3D timeout =3D {tv_sec =3D 0, tv_nsec =3D 0} end_time =3D {tv_sec =3D , tv_nsec =3D } timer_delay =3D {tv_sec =3D , tv_nsec =3D } got_output_end_time =3D {tv_sec =3D , tv_nsec =3D } wait =3D got_some_output =3D prev_wait_proc_nbytes_read =3D retry_for_async =3D count =3D {bytes =3D } now =3D {tv_sec =3D , tv_nsec =3D } last_read_channel =3D -1 #13 0x00005634e0ee23a0 in sit_for (timeout=3D, reading=3D, display_option= =3D) at dispnew.c:6264 sec =3D 30 nsec =3D 0 do_display =3D curbuf_eq_winbuf =3D true nbytes =3D #14 0x00005634e0fee4f5 in read_char (commandflag=3D1, map=3D0x5634e3b7e0e3, prev_event=3D0x0, used_mouse_me= nu=3D0x7fffdb8c9f1b, end_time=3D0x0) at keyboard.c:2881 delay_level =3D buffer_size =3D c =3D 0x0 local_getcjmp =3D {{__jmpbuf =3D {94785120273024, -6001558012053156= 1, 1, 139765404497672, 0, 94785158788803, -60015580189737577, -599971086574= 3200873}, __mask_was_saved =3D 0, __saved_mask =3D {__val =3D {947851143318= 72, 2000000000002, 586, 500000, 94785114346639, 0, 40080, 140736876813568, = 0, 0, 139765404497677, 0, 94785114190645, 0, 146, 147}}}} save_jump =3D {{__jmpbuf =3D {0, 0, 0, 0, 0, 0, 0, 0}, __mask_was_s= aved =3D 0, __saved_mask =3D {__val =3D {0 }}}} tem =3D save =3D previous_echo_area_message =3D 0x0 also_record =3D 0x0 reread =3D false recorded =3D false polling_stopped_here =3D false orig_kboard =3D 0x5634e356ffb0 #15 0x00005634e119c3a7 in read_key_sequence.constprop.0 (keybuf=3D, prevent_redisplay=3Dfalse, fix_current_buffe= r=3D, can_return_switch_frame=3D, dont_downca= se_last=3D, prompt=3D) at keyboard.c:10083 interrupted_kboard =3D 0x5634e356ffb0 key =3D used_mouse_menu =3D false echo_local_start =3D 0 last_real_key_start =3D 0 keys_local_start =3D 0 new_binding =3D t =3D 0 echo_start =3D 0 keys_start =3D 0 current_binding =3D 0x5634e3b7e0e3 first_unbound =3D 31 mock_input =3D 0 used_mouse_menu_history =3D {false } fkey =3D {parent =3D 0x5634e3406393, map =3D 0x5634e3406393, start = =3D 0, end =3D 0} keytran =3D {parent =3D 0x7f1dabc0897b, map =3D 0x7f1dabc0897b, sta= rt =3D 0, end =3D 0} indec =3D {parent =3D 0x5634e34063a3, map =3D 0x5634e34063a3, start= =3D 0, end =3D 0} shift_translated =3D delayed_switch_frame =3D original_uppercase =3D original_uppercase_position =3D dummyflag =3D false fake_prefixed_keys =3D 0x0 first_event =3D 0x0 second_event =3D #16 0x00005634e0fe1b8a in command_loop_1 () at keyboard.c:1384 cmd =3D keybuf =3D {0x5e, 0x5634e10a0676 , 0x5634e33b3510, 0= x5634e10f91fc , 0x0, 0x80, 0x0, 0x7f1dab90e738, 0x5634e= 1250020 , 0x7f1dabce62b5, 0x5634e33f93c4, 0x0, 0x5634= e11da314, 0x7f1db0e68705, 0x53474e, 0x7f1daf5e3400, 0x7fffdb8ca510, 0x1cdd2= cc6a070d500, 0x9510, 0x5634e11e0d60, 0x7fffdb8ca1e0, 0x60, 0x5634e33f93c4, = 0x0, 0x5634e1250020 , 0x5634e0fdf8c5 , 0x5634e11da314, 0x7f1daf5e3f12 , 0x15, 0x30} i =3D prev_modiff =3D 42 prev_buffer =3D 0x7f1dab497708 #17 0x00005634e109aa57 in internal_condition_case (bfun=3D0x5634e0fe18c0 , handlers=3D, hf= un=3D0x5634e0fdf320 ) at eval.c:1474 val =3D c =3D 0x5634e33fd350 #18 0x00005634e0fdf5de in command_loop_2 (handlers=3Dhandlers@entry=3D0x90)= at keyboard.c:1133 val =3D #19 0x00005634e109a9ac in internal_catch (tag=3D, func=3D0x5634e0fdf5b0 , arg=3D0= x90) at eval.c:1197 val =3D c =3D 0x5634e33fcde0 #20 0x00005634e0fe13a9 in command_loop () at keyboard.c:1111 #21 0x00005634e11cf8a0 in recursive_edit_1.isra.0 () at keyboard.c:720 val =3D #22 0x00005634e0fe188c in Frecursive_edit () at keyboard.c:803 buffer =3D #23 0x00005634e0ed5b9d in main (argc=3D, argv=3D0x7fffdb8ca6= 28) at emacs.c:2529 stack_bottom_variable =3D 0x0 no_loadup =3D false junk =3D 0x0 dname_arg =3D 0x0 ch_to_dir =3D 0x0 original_pwd =3D 0x0 dump_mode =3D skip_args =3D 0 temacs =3D 0x0 attempt_load_pdump =3D only_version =3D false rlim =3D {rlim_cur =3D 10022912, rlim_max =3D 18446744073709551615} lc_all =3D sockfd =3D -1 module_assertions =3D (gdb) frame 8 #8 pgtk_handle_selection_request (event=3D0x7fffdb8c9420) at pgtkselect.c:= 573 573=09 local_selection_data =3D LOCAL_SELECTION (selection_symbol, dpyinfo)= ; (gdb) p *event $2 =3D {kind =3D SELECTION_REQUEST_EVENT, dpyinfo =3D 0xe35f53a0, requestor= =3D 0x5634e3756330, selection =3D 0x45, target =3D 0x4c, property =3D 0x5d, time =3D 0} (gdb) p *event->selection $3 =3D (gdb) p *event->dpyinfo Cannot access memory at address 0xe35f53a0 (gdb) p kbd_buffer[1856].sie $4 =3D {kind =3D NO_EVENT, dpyinfo =3D 0x0, requestor =3D 0x0, selection = =3D 0x0, target =3D 0x0, property =3D 0x0, time =3D 0} (gdb)