From: "Jan D." <jan.h.d@swipnet.se>
Cc: reiner.steib@gmx.de, emacs-devel@gnu.org
Subject: Re: All platforms fail with Unicode in menus.
Date: Mon, 30 Aug 2004 12:28:38 +0200 [thread overview]
Message-ID: <5ADE9B02-FA6F-11D8-8A82-000D93505B76@swipnet.se> (raw)
In-Reply-To: <wlr7ppjc5f.wl@church.math.s.chiba-u.ac.jp>
>> It seems that the string returned by ENCODE_UTF_8 gets collected
>> during GC, resulting in passing garbage to the GTK menu code.
>
> In this case, the Lisp Object returned by ENCODE_UTF_8 is reachable
> from the root set via `menu_items', which is staticpro-ed. I think
> the problem is that ENCODE_UTF_8 may cause GC, and that leads to
> relocation of string contents by the compaction of small strings.
> Without the call of inhibit_garbage_collection, the buffer list in the
> "Buffers" menu is also corrupted if "Math" menu is present.
Yes, you are correct. The problem is that the menu code saves a pointer
to the strings in the menus, not the Lisp value, in its internal data
structure. As it reaches the "Math" menu, the compaction of small
strings
makes the previously saved pointers point to garbage as the strings has
been
moved.
This problem has been considered in the code when the
inhibit_garbage_collection was removed. The pointers to the strings
are
not stored until after the whole data structure is done, and no GC can
happen. But it is only done properly for the top level (i.e. menu bar)
entries. Fixing the others should be easy, I'll do it within a day or
two.
Jan D.
prev parent reply other threads:[~2004-08-30 10:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-25 21:48 All platforms fail with Unicode in menus David Kastrup
2004-08-26 8:13 ` YAMAMOTO Mitsuharu
2004-08-26 18:30 ` Jan D.
2004-08-28 7:11 ` David Kastrup
2004-08-28 7:42 ` Jan D.
2004-08-28 8:08 ` David Kastrup
2004-08-28 8:24 ` Andreas Schwab
2004-08-28 21:38 ` Stefan
2004-08-28 22:18 ` Jan D.
2004-08-28 22:38 ` Stefan
2004-08-30 7:52 ` YAMAMOTO Mitsuharu
2004-08-30 10:28 ` Jan D. [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5ADE9B02-FA6F-11D8-8A82-000D93505B76@swipnet.se \
--to=jan.h.d@swipnet.se \
--cc=emacs-devel@gnu.org \
--cc=reiner.steib@gmx.de \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.