unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Ponce <david@dponce.com>
Cc: emacs-devel@gnu.org
Subject: Re: NT Emacs crashes when selecting a menubar item
Date: Fri, 26 Jul 2002 14:30:39 +0200	[thread overview]
Message-ID: <3D4140EF.4000607@dponce.com> (raw)
In-Reply-To: 200207251807.g6PI7I907645@aztec.santafe.edu

>
>
>One interesting question is what data is in core before the start of
>this object.  Is any ASCII text present there?
>
Hi,

I worked a little more on this problem and, simply calling fprintf in
various locations in w32menu.c (I don't have a debugger), I found that
the function `single_submenu' seems to receive corrupted data in
static variable `menu_items'.

Notice that I only observed garbaged menu item names in dynamic menus
like "Buffers" (I use msb) or imenu.

More details...

Only after this line (w32menu.c::1268):

      wv->name = (char *) SDATA (item_name);

The following fprintf showed corrupted data:

fprintf(stderr,
 "single_submenu::1268/wv->name = SDATA (item_name) = %p@%s\n",
 wv->name, wv->name);

Here is a snippet of the printed data (the first value of `item_name'
seems correct, but the next ones are corrupted):

[...]
single_submenu::1268/wv->name = SDATA (item_name) = 01772128@Select and 
Paste
single_submenu::1268/wv->name = SDATA (item_name) = 01EFC1D0@  
wv->name...DEADBEEF;

single_submenu::1268/wv->name = SDATA (item_name) = 01EFC1B4@
  wv->nam...DEADBEEF;

single_submenu::1268/wv->name = SDATA (item_name) = 01EF2B70@: Ditto.
single_submenu::1268/wv->name = SDATA (item_name) = 01EF2B80@: Moved 
definitions.
single_submenu::1268/wv->name = SDATA (item_name) = 01EFC198@K  Void 
va...vironment.
single_submenu::1268/wv->name = SDATA (item_name) = 01EFC17C@;; Unused 
...$nterm))
[...]

`item_name' is a local Lisp_Object variable initialized to
(w32menu.c::1240):

      item_name = AREF (menu_items, i + MENU_ITEMS_ITEM_NAME);

`menu_items' is initialized in the function `set_frame_menubar'
(w32menu.c::1395):

      menu_items = f->menu_bar_vector;

It seems that f->menu_bar_vector is setup in keyboard.c in function
`menu_bar_items'.  Maybe is there a problem here?

I had a look at this function, but I lack more knowledge of Emacs
internal (and probably C) to really understand its code.

Nevertheless, I hope this report will help.

David

  reply	other threads:[~2002-07-26 12:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-24 18:55 NT Emacs crashes when selecting a menubar item David Ponce
2002-07-25 18:07 ` Richard Stallman
2002-07-26 12:30   ` David Ponce [this message]
2002-07-27 18:52     ` Richard Stallman
2002-07-28 16:56       ` David Ponce
2002-07-29 17:30         ` Richard Stallman
2002-07-29 18:16           ` David Ponce
2002-07-30 18:46             ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2002-07-30 11:28 David PONCE
     [not found] <3D2A791A00A0862A@mel-rta9.wanadoo.fr>
2002-07-31 21:57 ` Richard Stallman
2002-07-31 22:37   ` David Ponce
2002-08-01  7:54 jasonr
2002-08-01 11:39 David PONCE

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D4140EF.4000607@dponce.com \
    --to=david@dponce.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).