From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.bugs Subject: bug#7190: Crash in menus on w32 Date: Tue, 19 Oct 2010 02:20:42 +0200 Message-ID: References: <831v7wmt84.fsf@gnu.org> <83vd58kqfh.fsf@gnu.org> <83tykrkz8s.fsf@gnu.org> 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 1287448966 4945 80.91.229.12 (19 Oct 2010 00:42:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 19 Oct 2010 00:42:46 +0000 (UTC) Cc: 7190@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 19 02:42:43 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 1P80Hq-0007Pw-Am for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Oct 2010 02:42:42 +0200 Original-Received: from localhost ([127.0.0.1]:46859 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P80Hp-00024s-H2 for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Oct 2010 20:42:41 -0400 Original-Received: from [140.186.70.92] (port=57832 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P80Hj-00024d-Ci for bug-gnu-emacs@gnu.org; Mon, 18 Oct 2010 20:42:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P80Hi-00039A-DT for bug-gnu-emacs@gnu.org; Mon, 18 Oct 2010 20:42:35 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37627) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P80Hi-000395-Au for bug-gnu-emacs@gnu.org; Mon, 18 Oct 2010 20:42:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P7zty-0002pi-BQ; Mon, 18 Oct 2010 20:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lennart Borgman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Oct 2010 00:18:02 +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.128744744010879 (code B ref 7190); Tue, 19 Oct 2010 00:18:02 +0000 Original-Received: (at 7190) by debbugs.gnu.org; 19 Oct 2010 00:17:20 +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 1P7ztH-0002pQ-Pm for submit@debbugs.gnu.org; Mon, 18 Oct 2010 20:17:20 -0400 Original-Received: from mail-qy0-f179.google.com ([209.85.216.179]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P7ztG-0002pL-I3 for 7190@debbugs.gnu.org; Mon, 18 Oct 2010 20:17:19 -0400 Original-Received: by qyk36 with SMTP id 36so399837qyk.3 for <7190@debbugs.gnu.org>; Mon, 18 Oct 2010 17:21:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=gPe/dvthd8vV3/7vci8NBpFwQJ+wCsDfA88B/xxs9qU=; b=pWj0iyszUyMx9/Jk4SdjzCij1BxczKqoJ3IWiS7HS3D3rgCI4pJyX5XaXgZSXxT4pt fgigkW9rAZ3/3u3pPTUBp+5kAR5UqNkrIUmiWQ6ObExPmP2DUwX6kFYyz/UBeNe3dlMY Fnd7suJ/sbD6DsSgPCmIpH/0U/K31UEkVtHe0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=uuZFY9CY6qKAiMyrGDtjHSkp94bgcDdpfnQbQWJWI1z65QCCnxuCIP6yqOuAb5avLR u2pJYUMSs+9CSPEW3NudCFk1sWbWfY7cTcCanx+E8PkZmWq4i409Oik0dhlA9JBjvv4y iJh29tohVrDMV1YvJRW2Q/F2iHFVuFOnjfOrE= Original-Received: by 10.229.239.130 with SMTP id kw2mr4496191qcb.115.1287447662514; Mon, 18 Oct 2010 17:21:02 -0700 (PDT) Original-Received: by 10.229.220.195 with HTTP; Mon, 18 Oct 2010 17:20:42 -0700 (PDT) In-Reply-To: <83tykrkz8s.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 18 Oct 2010 20:18: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:40978 Archived-At: On Tue, Oct 12, 2010 at 9:05 PM, Eli Zaretskii wrote: >> From: Lennart Borgman >> Date: Tue, 12 Oct 2010 11:37:52 +0200 >> Cc: 7190@debbugs.gnu.org >> >> > I didn't mean that you need to remember what you did. =C2=A0I meant to= use >> > the debugger _when_ it crashes to find out what was the menu in >> > question. >> >> Exactly how do I see that? > > By looking at the menu data structures accessed by these functions: > > =C2=A0#7 =C2=A00x011c4e4b in w32_free_submenu_strings (menu=3D0x205e3) at= w32menu.c:1701 > =C2=A0#8 =C2=A00x011c4e5f in w32_free_submenu_strings (menu=3D0x205f3) at= w32menu.c:1706 > =C2=A0#9 =C2=A00x011c4e5f in w32_free_submenu_strings (menu=3D0xdd10145) = at w32menu.c:1706 > =C2=A0#10 0x011c4eaa in w32_free_menu_strings (hwnd=3D0x900ca) at w32menu= .c:1723 > =C2=A0#11 0x011c2b6e in menubar_selection_callback (f=3D0x3f63000, client= _data=3D0x2510) > =C2=A0 =C2=A0 =C2=A0at 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. =C2=A0If > my reading of the code is correct, this code: > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0entry =3D AREF (vector, i + MENU_ITEMS_= ITEM_VALUE); > > retrieves the selected menu item, and `vector' is the entire menu bar, > computed as > > =C2=A0vector =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. I just got a new crash, but unfortunately I have still not understand how to look at those values. With "bt full" I get this (part of the bt): #6 0x7c927573 in ntdll!RtlPcToFileHeader () from C:\WINDOWS\system32\ntdll.dll No symbol table info available. #7 0x011c5399 in w32_free_submenu_strings (menu=3D0x9a05c5) at w32menu.c:1= 692 info =3D { cbSize =3D 44, fMask =3D 52, fType =3D 256, fState =3D 0, wID =3D 0, hSubMenu =3D 0x0, hbmpChecked =3D 0x0, hbmpUnchecked =3D 0x0, dwItemData =3D 8975208, dwTypeData =3D 0x0, cch =3D 0 } i =3D 6 num =3D 17 #8 0x011c53ad in w32_free_submenu_strings (menu=3D0x5e80611) at w32menu.c:= 1697 info =3D { cbSize =3D 44, fMask =3D 52, fType =3D 0, fState =3D 0, wID =3D 0, hSubMenu =3D 0x9a05c5, hbmpChecked =3D 0x0, hbmpUnchecked =3D 0x0, dwItemData =3D 0, dwTypeData =3D 0x0, cch =3D 10 } i =3D 10 num =3D 30 #9 0x011c53ad in w32_free_submenu_strings (menu=3D0x464d04eb) at w32menu.c= :1697 info =3D { cbSize =3D 44, fMask =3D 52, fType =3D 0, fState =3D 0, wID =3D 0, hSubMenu =3D 0x5e80611, hbmpChecked =3D 0x0, hbmpUnchecked =3D 0x0, dwItemData =3D 0, dwTypeData =3D 0x0, cch =3D 4 } i =3D 5 num =3D 10 #10 0x011c53f8 in w32_free_menu_strings (hwnd=3D0x220048) at w32menu.c:1714 menu =3D 0x464d04eb #11 0x011c311a in menubar_selection_callback (f=3D0x411dc00, client_data=3D= 0x184a) at w32menu.c:353 j =3D 1 buf =3D { kind =3D MENU_BAR_EVENT, code =3D 0, part =3D scroll_bar_above_handle, modifiers =3D 0, x =3D 0, y =3D 0, timestamp =3D 0, padding =3D {0x0, 0x0}, frame_or_window =3D 68279301, arg =3D 59691226 } frame =3D 68279301 prefix =3D 59691298 entry =3D 59691226 vector =3D 92061701 subprefix_stack =3D 0x825f00 submenu_depth =3D 1 i =3D 6218 #12 0x011dcc2c in w32_read_socket (terminal=3D0x2d04c00, expected=3D0, hold_quit=3D0x82f6e0) at w32term.c:4623 inev =3D { kind =3D NO_EVENT, code =3D 0, part =3D scroll_bar_above_handle, modifiers =3D 0, x =3D 0, y =3D 0, timestamp =3D 0, padding =3D {0x0, 0x0}, frame_or_window =3D 0, arg =3D 45484058 } do_help =3D 0 count =3D 0 check_visibility =3D 0 msg =3D { msg =3D { hwnd =3D 0x220048, message =3D 273, wParam =3D 6218, lParam =3D 0, time =3D 59842578, pt =3D { x =3D 7, y =3D 327687 } }, dwModifiers =3D 0, rect =3D { left =3D 545258848, top =3D 2118300673, right =3D 13317672, bottom =3D 0 } } f =3D 0x411dc00 dpyinfo =3D 0x14061b0