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: Fri, 26 May 2023 02:01:39 +0000 Message-ID: References: <87zg5ssnoz.fsf@yahoo.com> <875y8grkwf.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="30650"; 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 04:03:38 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 1q2Mnp-0007ii-39 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 May 2023 04:03:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2MnH-0007hx-Jz; Thu, 25 May 2023 22:03:03 -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 1q2MnG-0007hp-Nt for bug-gnu-emacs@gnu.org; Thu, 25 May 2023 22:03:02 -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 1q2MnG-0003HP-Fy for bug-gnu-emacs@gnu.org; Thu, 25 May 2023 22:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q2MnF-00078G-WC for bug-gnu-emacs@gnu.org; Thu, 25 May 2023 22:03: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: Fri, 26 May 2023 02:03:01 +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.168506652527348 (code B ref 63614); Fri, 26 May 2023 02:03:01 +0000 Original-Received: (at 63614) by debbugs.gnu.org; 26 May 2023 02:02:05 +0000 Original-Received: from localhost ([127.0.0.1]:48472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2MmK-000771-Js for submit@debbugs.gnu.org; Thu, 25 May 2023 22:02:05 -0400 Original-Received: from mail-4325.protonmail.ch ([185.70.43.25]:20901) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2MmH-00076T-00 for 63614@debbugs.gnu.org; Thu, 25 May 2023 22:02:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1685066514; x=1685325714; bh=Tyn33+W09uxQjfwPfiPxKpbWcuVgwy6WK2my0aq97UY=; 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=UuMJUBtU09yLMKK19Ym58tAazIjxoPowRYUTZAAfKlqo/LcTQ2xwVBfYZReMp1TAq q1xUurQGmi1v2jlooXNEnrbjIlWroD5L995TMH04PlHMZG4vJ8p1OOlXicZPizNnqy 08t7y07GhGlTye7vfWl782VjkuJao2zGFzdaC8SKOsWdN4NJkvE3kcoC+QdFpm6IBO IpcTx3fi614MJ3nqvbRwXs/WanYozUUgzxEHWcI9FLT0EQttjD0mFcLGDBi57OIt3X aH5UgCunA8K6D2YdPLa8L4f8zJgBvbEkW67MiEl1Z6JwOQWs1D5+glQuPy3HDGmYVb OxbtMbH6a1MWA== In-Reply-To: <875y8grkwf.fsf@yahoo.com> Feedback-ID: 45473059:user:proton 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:262398 Archived-At: On Thu, May 25, 2023 at 06:33:52PM -0600, Po Lu wrote: > What if you apply this change? >=20 > diff --git a/src/pgtkterm.c b/src/pgtkterm.c > index b8c626d81d8..bfad949941b 100644 > --- a/src/pgtkterm.c > +++ b/src/pgtkterm.c > @@ -376,11 +376,16 @@ mark_pgtkterm (void) > for (i =3D 0; i < n; i++) > { > union buffered_input_event *ev =3D &evq->q[i]; > - mark_object (ev->ie.x); > - mark_object (ev->ie.y); > - mark_object (ev->ie.frame_or_window); > - mark_object (ev->ie.arg); > - mark_object (ev->ie.device); > + > + if (ev->ie.type !=3D SELECTION_CLEAR_EVENT > +=09 && ev->ie.type !=3D SELECTION_REQUEST_EVENT) > +=09{ > +=09 mark_object (ev->ie.x); > +=09 mark_object (ev->ie.y); > +=09 mark_object (ev->ie.frame_or_window); > +=09 mark_object (ev->ie.arg); > +=09 mark_object (ev->ie.device); > +=09} > } >=20 > for (dpyinfo =3D x_display_list; dpyinfo; I did not apply the patch, instead I updated to 42052686752e399e778d33401dd= 621afbac0071d which is basically the same patch. It still crashes (the same way I reporte= d first). Here the backtrace: (gdb) bt full #0 0x00007f1c8c2ad8ec in () at /usr/lib64/libc.so.6 #1 0x00007f1c8c25e3e2 in raise () at /usr/lib64/libc.so.6 #2 0x0000558328bcdc78 in terminate_due_to_signal (sig=3D11, backtrace_limi= t=3D) at emacs.c:464 #3 0x0000558328bceacb 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=3D0x558329455cb0 , arg=3D) at sysdep.c:1888 fatal =3D #7 0x00007f1c8c25e490 in () at /usr/lib64/libc.so.= 6 #8 0x0000558328e86fb9 in pgtk_handle_selection_clear (event=3D) at pgtkselect.c:742 selection =3D changed_owner_time =3D 0 selection_symbol =3D local_selection_data =3D local_selection_time =3D dpyinfo =3D 0x29baeab0 Vselection_alist =3D #9 0x0000558328cea9c6 in pgtk_handle_selection_event (event=3D0x7fffe2a229= b0) at pgtkselect.c:782 event =3D 0x558329405c80 copy =3D {kind =3D SELECTION_CLEAR_EVENT, dpyinfo =3D 0x29baeab0, r= equestor =3D 0x0, selection =3D 0x45, target =3D 0x0, property =3D 0x0, tim= e =3D 0} moved_events =3D #10 process_special_events () at keyboard.c:4449 event =3D 0x558329405c80 copy =3D {kind =3D SELECTION_CLEAR_EVENT, dpyinfo =3D 0x29baeab0, r= equestor =3D 0x0, selection =3D 0x45, target =3D 0x0, property =3D 0x0, tim= e =3D 0} moved_events =3D #11 0x0000558328cebbcd in swallow_events (do_display=3Dtrue) at keyboard.c:= 4489 old_timers_run =3D #12 0x0000558328e0789c 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 0x0000558328be8350 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 0x0000558328cf44d5 in read_char (commandflag=3D1, map=3D0x55832a17ef73, prev_event=3D0x0, used_mouse_me= nu=3D0x7fffe2a234ab, end_time=3D0x0) at keyboard.c:2881 delay_level =3D buffer_size =3D c =3D 0x0 local_getcjmp =3D {{__jmpbuf =3D {94021820932736, -9615324123280819= 99, 1, 139760518129416, 0, 94021828021619, -961532411696839247, -6458610983= 165819471}, __mask_was_saved =3D 0, __saved_mask =3D {__val =3D {9402181499= 1392, 94021835287715, 586, 2, 94021815006159, 140736995668736, 40128, 14073= 6995668624, 0, 0, 139760518129421, 0, 94021835287715, 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 0x558329b292d0 #15 0x0000558328ea2417 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 0x558329b292d0 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 0x55832a17ef73 first_unbound =3D 31 mock_input =3D 0 used_mouse_menu_history =3D {false } fkey =3D {parent =3D 0x5583299bd393, map =3D 0x5583299bd393, start = =3D 0, end =3D 0} keytran =3D {parent =3D 0x7f1c888080f3, map =3D 0x7f1c888080f3, sta= rt =3D 0, end =3D 0} indec =3D {parent =3D 0x5583299bd3a3, map =3D 0x5583299bd3a3, 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 0x0000558328ce7b6a in command_loop_1 () at keyboard.c:1384 cmd =3D keybuf =3D {0x5e, 0x558328da6526 , 0x55832996a510, 0= x558328dff13c , 0x0, 0x80, 0x0, 0x7f1c8850dbc8, 0x55832= 8f56020 , 0x7f1c888e52e2, 0x5583299b03c4, 0x0, 0x5583= 28ee0314, 0x7f1c8dbc3705, 0x5441465f53554244, 0x7f1c8c2bb400, 0x7fffe2a23aa= 0, 0xa6ec1548f4ad3200, 0x9540, 0x558328ee6d80, 0x7fffe2a23770, 0x60, 0x5583= 299b03c4, 0x0, 0x558328f56020 , 0x558328ce58a5 , 0x558328ee0314, 0x7f1c8c2bbf12 , 0x15, 0x30} i =3D prev_modiff =3D 34 prev_buffer =3D 0x7f1c88096708 #17 0x0000558328da0907 in internal_condition_case (bfun=3D0x558328ce78a0 , handlers=3D, hf= un=3D0x558328ce5300 ) at eval.c:1474 val =3D c =3D 0x5583299b4350 #18 0x0000558328ce55be in command_loop_2 (handlers=3Dhandlers@entry=3D0x90)= at keyboard.c:1133 val =3D #19 0x0000558328da085c in internal_catch (tag=3D, func=3D0x558328ce5590 , arg=3D0= x90) at eval.c:1197 val =3D c =3D 0x5583299b3de0 #20 0x0000558328ce7389 in command_loop () at keyboard.c:1111 #21 0x0000558328ed5910 in recursive_edit_1.isra.0 () at keyboard.c:720 val =3D #22 0x0000558328ce786c in Frecursive_edit () at keyboard.c:803 buffer =3D #23 0x0000558328bdbbad in main (argc=3D, argv=3D0x7fffe2a23b= b8) 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 9 #9 0x0000558328cea9c6 in pgtk_handle_selection_event (event=3D0x7fffe2a229= b0) at pgtkselect.c:782 782=09 pgtk_handle_selection_clear (event); (gdb) p *event $1 =3D {kind =3D SELECTION_CLEAR_EVENT, dpyinfo =3D 0x29baeab0, requestor = =3D 0x0, selection =3D 0x45, target =3D 0x0, property =3D 0x0, time =3D 0} (gdb) p *event->selection $2 =3D (gdb) p *event->dpyinfo Cannot access memory at address 0x29baeab0 (gdb) p kbd_buffer[1152].sie $3 =3D {kind =3D NO_EVENT, dpyinfo =3D 0x0, requestor =3D 0x0, selection = =3D 0x0, target =3D 0x0, property =3D 0x0, time =3D 0} (gdb) p x_display_list $4 =3D (struct pgtk_display_info *) 0x558329baeab0 (gdb) p *x_display_list $5 =3D {next =3D 0x0, terminal =3D 0x558329a8e7f0, {gdpy =3D 0x558329ac4b10= , display =3D 0x558329ac4b10}, name_list_element =3D 0x5583299bd383, refere= nce_count =3D 1, x_id =3D 1, x_id_name =3D 0x558329b781a0 "emacs@gentoo", n_fonts =3D 5, smallest_char= _width =3D 2, smallest_font_height =3D 15, bitmaps =3D 0x0, bitmaps_size = =3D 0, bitmaps_last =3D 0, resx =3D 96, resy =3D 96, grabbed =3D 0, n_planes =3D 32, color_p =3D 1, icon_bitmap_id =3D -2, roo= t_window =3D 42, rdb =3D 0x0, vertical_scroll_bar_cursor =3D 0x558329b49230= , horizontal_scroll_bar_cursor =3D 0x558329bfbe30, mouse_highlight =3D {mouse_face_beg_row =3D -1, mouse_face_beg_col =3D -1= , mouse_face_beg_x =3D 0, mouse_face_end_row =3D -1, mouse_face_end_col =3D= -1, mouse_face_end_x =3D 0, mouse_face_window =3D 0x0, mouse_face_face_id =3D 0, mouse_face_overlay =3D 0x0, mouse_face_mouse_= frame =3D 0x0, mouse_face_mouse_x =3D 0, mouse_face_mouse_y =3D 0, mouse_fa= ce_past_end =3D false, mouse_face_defer =3D false, mouse_face_hidden =3D false}, highlight_frame =3D 0x0, x_focus_frame = =3D 0x0, x_focus_event_frame =3D 0x0, last_mouse_frame =3D 0x0, last_mouse_= motion_frame =3D 0x0, last_mouse_motion_x =3D 0, last_mouse_motion_y =3D 0, last_mouse_glyph =3D {x =3D 0, y =3D 0, width = =3D 0, height =3D 0}, last_mouse_movement_time =3D 0, last_user_time =3D 10= 173018, last_mouse_scroll_bar =3D 0x0, invisible_cursor =3D 0x558329bb7b30, xg_cursor =3D 0x558329bb72b0, device= s =3D 0x558329c0e860, last_mouse_glyph_frame =3D 0x0, last_click_event =3D = 0x0, im =3D {context =3D 0x558329b952b0, focused_frame =3D 0x0}, scroll =3D {acc_x =3D 0, acc_y =3D 0, x_per_cha= r =3D 1, y_per_line =3D 1}, connection =3D 4} (gdb)