all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: inappropriate whole-frame flicker
Date: Thu, 28 Aug 2003 12:53:06 -0400	[thread overview]
Message-ID: <E19sQ1C-00020r-AU@fencepost.gnu.org> (raw)
In-Reply-To: <861xv7c94c.fsf@gerd.free-bsd.org> (gerd.moellmann@t-online.de)

    All the values stored in struct glyph are computed while producing
    glyphs, from buffer text, properties and so on.  Functions like
    x_append_glyph fill out a glyph structure with what was computed,
    usually from a struct it.  (I've factored the glyph filling in a few
    such functions; it's not distributed in the redisplay code.)  If some
    such function leaves some struct glyph member unset, which was the
    hard to find flicker case I've been mentioning in the #if 0'd code,
    there is a problem.

    When we leave glyphs unintialized the unset glyph member has a random
    value, which is clearly a bug.


    When we bzero glyphs, the unset field has a known value of zero, but
    that's a bug as well, because the computed value may well something
    different.

    So, whatever we do, the bug remains.

We could find these bugs systematically with debugging code that would
store unlikely values (analogous 0xdeadbeef) into all the fields, then
check later on which fields have the unlikely values.  There might be
some fields for which it is hard to find a suitable unlikely value,
but if this is possible for most fields, it would find most such bugs.

We could also use a macro SET_GLYPH_FIELD (fieldname, value) which
would normally set the field using the standard place to find the
glyph.  But when DEBUG, there would be two copies of the glyph, one
initialized to all 0s and one initialized to all 1s.  Then SET_GLYPH_FIELD
would set the specified field in both glyphs.  If the two
glyphs are not identical, some field was not set.

Would someone like to implement one of these ideas, so we can find 
such bugs easily?

  parent reply	other threads:[~2003-08-28 16:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-21  9:31 inappropriate whole-frame flicker Miles Bader
2003-08-22  4:53 ` Miles Bader
     [not found] ` <E19qPZe-0001gV-Ey@fencepost.gnu.org>
     [not found]   ` <86brugya92.fsf@gerd.free-bsd.org>
     [not found]     ` <E19qz9g-0000OF-Gs@fencepost.gnu.org>
     [not found]       ` <861xvayk75.fsf@gerd.free-bsd.org>
     [not found]         ` <E19rJ92-0003T9-Iq@fencepost.gnu.org>
     [not found]           ` <8665klr8fe.fsf@gerd.free-bsd.org>
     [not found]             ` <E19s3Lw-0004zB-JA@fencepost.gnu.org>
     [not found]               ` <861xv7c94c.fsf@gerd.free-bsd.org>
2003-08-28 16:53                 ` Richard Stallman [this message]
2003-08-28 17:42                   ` Gerd Moellmann
2003-08-28 19:17                   ` Miles Bader

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=E19sQ1C-00020r-AU@fencepost.gnu.org \
    --to=rms@gnu.org \
    --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 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.