From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud Newsgroups: gmane.emacs.bugs Subject: bug#59351: 29.0.50; [PATCH] Fix mouse click position to menu bar entry Date: Mon, 21 Nov 2022 15:46:51 +0100 Message-ID: <875yf85pr8.fsf@elite.giraud> References: <87tu2wlku7.fsf@elite.giraud> <878rk8ee6d.fsf@yahoo.com> <8735agr0g4.fsf@elite.giraud> <83o7t4bhk4.fsf@gnu.org> <87zgcov1ps.fsf@elite.giraud> <8335agbai5.fsf@gnu.org> <875yfcuw5r.fsf@elite.giraud> <83r0y09td6.fsf@gnu.org> <87zgcotbw9.fsf@elite.giraud> <83iljc9k5s.fsf@gnu.org> <87a64k5su7.fsf@elite.giraud> <83o7t02xq2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8675"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: luangruo@yahoo.com, 59351@debbugs.gnu.org, Manuel Giraud To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 21 15:47:11 2022 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 1ox84l-0001za-ID for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Nov 2022 15:47:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ox84f-0004Tk-7I; Mon, 21 Nov 2022 09:47:05 -0500 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 1ox84c-0004Sy-JJ for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 09:47:02 -0500 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 1ox84b-0006xN-RJ for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 09:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ox84b-0004tv-Mc for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 09:47:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Nov 2022 14:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59351 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59351-submit@debbugs.gnu.org id=B59351.166904201718827 (code B ref 59351); Mon, 21 Nov 2022 14:47:01 +0000 Original-Received: (at 59351) by debbugs.gnu.org; 21 Nov 2022 14:46:57 +0000 Original-Received: from localhost ([127.0.0.1]:45984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ox84W-0004ta-I1 for submit@debbugs.gnu.org; Mon, 21 Nov 2022 09:46:57 -0500 Original-Received: from ledu-giraud.fr ([51.159.28.247]:40961) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ox84U-0004tQ-6a for 59351@debbugs.gnu.org; Mon, 21 Nov 2022 09:46:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=WNHjhNXb2UGiAYPD 4tYj13u7olC4tZFuEpuPXHSzCe4=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=JFK6xq8vHo9lt9IX0RZRF6V0WLBZg9+VvUdFaU QhpRnacBq+S2ltOx9eArsHnaK9FIUApC2QIZMglexmQ8azks0DiP55Yqqflt98fSRvawWo 10FDkdTceR9YSWbd98dud2rvzkeC5i+jKc7byRRbUsnR9hfCG5/i6LlVHduDpzuZBR6fWa LrQGdJ7wPYm5RS8FQWOISv5jVRFibL5wcPMlziRI7uVt06Nbg09Byu6lgW0ezcTh4J2qct oPYFfb0XrAo/7T/ElCqWP9bI9qfTDGP4buPk1Ra2XwqWgLEoTxtUpldC6ETw/DpTrzO6fR NvBXDHzTgONHL3AEIH6cqOlw== Original-Received: from elite.giraud ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 44ba0653 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 21 Nov 2022 15:46:52 +0100 (CET) In-Reply-To: <83o7t02xq2.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 21 Nov 2022 16:23:01 +0200") 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:248538 Archived-At: Eli Zaretskii writes: >> From: Manuel Giraud >> Cc: Manuel Giraud , luangruo@yahoo.com, >> 59351@debbugs.gnu.org >> Date: Mon, 21 Nov 2022 14:40:16 +0100 >> >> I'm trying to debug this from "M-x gdb". I've put a breakpoint at >> display_menu_bar but whenever I'm doing a 'next' at the init_iterator >> call I get the following message: >> >> --8<---------------cut here---------------start------------->8--- >> Thread 1 received signal SIGTRAP, Trace/breakpoint trap. >> _thread_sys_poll () at /tmp/-:3 >> 3 /tmp/-: No such file or directory. >> --8<---------------cut here---------------end--------------->8--- > > What does "bt" show in this case? Here it is: --8<---------------cut here---------------start------------->8--- #0 _thread_sys_poll () at /tmp/-:3 #1 0x00000a4800b10c4e in _libc_poll_cancel (fds=0x7f7ffffc52a8, nfds=1, timeout=-1) at /usr/src/lib/libc/sys/w_poll.c:27 #2 0x00000a4798da5532 in _xcb_conn_wait (c=0xa47977e9000, cond=, vector=0x0, count=0x0) at /usr/xenocara/lib/libxcb/libxcb/../../../dist/libxcb/src/xcb_conn.c:508 #3 0x00000a4798db7ad4 in wait_for_reply (c=0xa47977e9000, request=815, e=0x7f7ffffc53b8) at /usr/xenocara/lib/libxcb/libxcb/../../../dist/libxcb/src/xcb_in.c:522 #4 0x00000a4798db7bf5 in xcb_wait_for_reply64 (c=0xa47977e9000, request=815, e=0x7f7ffffc53b8) at /usr/xenocara/lib/libxcb/libxcb/../../../dist/libxcb/src/xcb_in.c:566 #5 0x00000a47866f6ac2 in _XReply () from /usr/X11R6/lib/libX11.so.18.0 #6 0x00000a47866d6814 in XGetWindowProperty () from /usr/X11R6/lib/libX11.so.18.0 #7 0x00000a4504dfe121 in x_handle_wm_state (f=0xa47cbcaf7b0, ie=0x7f7ffffc6c28) at xterm.c:18198 #8 0x00000a4504dd9801 in handle_one_xevent (dpyinfo=0xa47dab78080, event=0x7f7ffffc6cb8, finish=0x7f7ffffc6d7c, hold_quit=0x7f7ffffc6e08) at xterm.c:19096 #9 0x00000a4504e07b2f in XTread_socket (terminal=0xa47dab8c950, hold_quit=0x7f7ffffc6e08) at xterm.c:24751 #10 0x00000a4504e7f73c in gobble_input () at keyboard.c:7413 #11 0x00000a4504e80037 in handle_async_input () at keyboard.c:7644 #12 0x00000a4504e7fffe in process_pending_signals () at keyboard.c:7658 #13 0x00000a4504e800bb in unblock_input_to (level=0) at keyboard.c:7673 #14 0x00000a4504e7c650 in unblock_input () at keyboard.c:7692 #15 0x00000a450511f632 in ftcrfont_text_extents (font=0xa4767ecc8f8, code=0x7f7ffffc72e8, nglyphs=1, metrics=0xa45056fea78 ) at ftcrfont.c:430 #16 0x00000a4504c7ffe7 in get_per_char_metric (font=0xa4767ecc8f8, char2b=0x7f7ffffc72e8) at xdisp.c:29566 #17 0x00000a4504c841d9 in gui_produce_glyphs (it=0x7f7ffffc7370) at xdisp.c:31736 #18 0x00000a4504c569eb in produce_special_glyphs (it=0x7f7ffffc8960, what=IT_TRUNCATION) at xdisp.c:31346 #19 0x00000a4504c54dac in init_iterator (it=0x7f7ffffc8960, w=0xa4767edf000, charpos=-1, bytepos=-1, row=0xa4767ec8000, base_face_id=MENU_FACE_ID) at xdisp.c:3314 #20 0x00000a4504cd4e8b in display_menu_bar (w=0xa47cbcafa20) at xdisp.c:26281 #21 0x00000a4504cc80ae in redisplay_window (window=XIL(0xa47cbcafa25), just_this_one_p=false) at xdisp.c:20374 #22 0x00000a4504cc2d7a in redisplay_window_0 (window=XIL(0xa47cbcafa25)) at xdisp.c:17397 #23 0x00000a4504fd67b6 in internal_condition_case_1 (bfun=0xa4504cc2d30 , arg=XIL(0xa47cbcafa25), handlers=XIL(0xa4736467f5b), hfun=0xa4504cc1160 ) at eval.c:1498 #24 0x00000a4504cc0fe1 in redisplay_windows (window=XIL(0xa47cbcafa25)) at xdisp.c:17367 #25 0x00000a4504c6500b in redisplay_internal () at xdisp.c:16816 #26 0x00000a4504c70567 in redisplay () at xdisp.c:16006 #27 0x00000a4504e72d3f in read_char (commandflag=1, map=XIL(0xa47b29a34b3), prev_event=XIL(0), used_mouse_menu=0x7f7ffffd059f, end_time=0x0) at keyboard.c:2623 #28 0x00000a4504e6d0ea in read_key_sequence (keybuf=0x7f7ffffd0a90, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:10070 #29 0x00000a4504e6aad6 in command_loop_1 () at keyboard.c:1376 #30 0x00000a4504fd667e in internal_condition_case (bfun=0xa4504e6a4a0 , handlers=XIL(0x90), hfun=0xa4504e6bcd0 ) at eval.c:1474 #31 0x00000a4504e6a430 in command_loop_2 (handlers=XIL(0x90)) at keyboard.c:1125 #32 0x00000a4504fd5413 in internal_catch (tag=XIL(0xfb10), func=0xa4504e6a400 , arg=XIL(0x90)) at eval.c:1197 #33 0x00000a4504e690e6 in command_loop () at keyboard.c:1103 #34 0x00000a4504e68e2d in recursive_edit_1 () at keyboard.c:712 #35 0x00000a4504e695d1 in Frecursive_edit () at keyboard.c:795 #36 0x00000a4504e6517b in main (argc=2, argv=0x7f7ffffd1238) at emacs.c:2516 --8<---------------cut here---------------end--------------->8--- >> I guess that this is an issue with thread but maybe there is some tricks >> to debug a threaded emacs. I cannot find hindsights in "etc/DEBUG". I >> also tried to compile "--without-threads" but it seems to be for elisp >> support. > > This has nothing to do with --without-threads, so no need to rebuild Emacs. > The only thing you need to make sure is that Emacs is build without > optimizations (-O0 compiler switch) and with -g3 (to include detailed debug > info including macros). Yes, it is compiled with both -O0 and -g3 (and even --enable-checking="yes,glyphs" and --enable-check-lisp-object-type: I have followed etc/DEBUG on this). -- Manuel Giraud