From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#7190: Crash in menus on w32 Date: Tue, 12 Oct 2010 21:05:55 +0200 Message-ID: <83tykrkz8s.fsf@gnu.org> References: <831v7wmt84.fsf@gnu.org> <83vd58kqfh.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1286910762 24446 80.91.229.12 (12 Oct 2010 19:12:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 12 Oct 2010 19:12:42 +0000 (UTC) Cc: 7190@debbugs.gnu.org To: Lennart Borgman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 12 21:12:41 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P5kHA-00022u-Ro for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Oct 2010 21:12:41 +0200 Original-Received: from localhost ([127.0.0.1]:51495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5kH9-0007bt-Ui for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Oct 2010 15:12:40 -0400 Original-Received: from [140.186.70.92] (port=38973 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5kGj-0007Qe-V4 for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2010 15:12:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P5kGf-00073U-2K for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2010 15:12:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33210) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P5kGf-00073Q-0k for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2010 15:12:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P5k8o-0003Rr-1A; Tue, 12 Oct 2010 15:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Oct 2010 19:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7190 X-GNU-PR-Package: emacs,w32 X-GNU-PR-Keywords: Original-Received: via spool by 7190-submit@debbugs.gnu.org id=B7190.128691019813238 (code B ref 7190); Tue, 12 Oct 2010 19:04:01 +0000 Original-Received: (at 7190) by debbugs.gnu.org; 12 Oct 2010 19:03:18 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P5k86-0003RT-46 for submit@debbugs.gnu.org; Tue, 12 Oct 2010 15:03:18 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P5k83-0003RO-BQ for 7190@debbugs.gnu.org; Tue, 12 Oct 2010 15:03:16 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LA600A00YDNMB00@a-mtaout22.012.net.il> for 7190@debbugs.gnu.org; Tue, 12 Oct 2010 21:05:49 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.229.93.189]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LA600A2YYDOJ330@a-mtaout22.012.net.il>; Tue, 12 Oct 2010 21:05:49 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 12 Oct 2010 15:04:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:40831 Archived-At: > From: Lennart Borgman > Date: Tue, 12 Oct 2010 11:37:52 +0200 > Cc: 7190@debbugs.gnu.org >=20 > > I didn't mean that you need to remember what you did. =C2=A0I mea= nt to use > > the debugger _when_ it crashes to find out what was the menu in > > question. >=20 > Exactly how do I see that? By looking at the menu data structures accessed by these functions: #7 0x011c4e4b in w32_free_submenu_strings (menu=3D0x205e3) at w32m= enu.c:1701 #8 0x011c4e5f in w32_free_submenu_strings (menu=3D0x205f3) at w32m= enu.c:1706 #9 0x011c4e5f in w32_free_submenu_strings (menu=3D0xdd10145) at w3= 2menu.c:1706 #10 0x011c4eaa in w32_free_menu_strings (hwnd=3D0x900ca) at w32menu= .c:1723 #11 0x011c2b6e in menubar_selection_callback (f=3D0x3f63000, client= _data=3D0x2510) at w32menu.c:353 In menubar_selection_callback, you will find that Emacs stores in the keyboard buffer a couple of events produced by a menu selection. If my reading of the code is correct, this code: =09 entry =3D AREF (vector, i + MENU_ITEMS_ITEM_VALUE); retrieves the selected menu item, and `vector' is the entire menu bar= , computed as vector =3D f->menu_bar_vector; See frame.h for the structure of this vector. By looking at `entry' you can find which menu item is being selected. Then in w32_free_submenu_strings, you can see the same info in its bare C form. > >> Maybe it would be useful to trace the order of events with DebPr= int > >> since they seem to be wrong? Any suggestions on what to trace? > > > > I have no idea, because I don't know how to guess that from the > > backtrace alone. =C2=A0At least some data regarding the reason(s)= of the > > crash is needed, see above. >=20 > I just meant adding some DebPrint statements and recompile. I wouldn't know where to add these statements, because we have no ide= a what is causing the memory corruption which leads to the crash.