From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: inappropriate whole-frame flicker Date: Thu, 28 Aug 2003 12:53:06 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <86brugya92.fsf@gerd.free-bsd.org> <861xvayk75.fsf@gerd.free-bsd.org> <8665klr8fe.fsf@gerd.free-bsd.org> <861xv7c94c.fsf@gerd.free-bsd.org> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1062092848 9854 80.91.224.253 (28 Aug 2003 17:47:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 28 Aug 2003 17:47:28 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Aug 28 19:47:26 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19sQrm-0002tI-00 for ; Thu, 28 Aug 2003 19:47:26 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19sQyd-0004AZ-00 for ; Thu, 28 Aug 2003 19:54:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19sQnr-0005VL-SH for emacs-devel@quimby.gnus.org; Thu, 28 Aug 2003 13:43:23 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19sQ8O-0004Kz-O3 for emacs-devel@gnu.org; Thu, 28 Aug 2003 13:00:32 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19sQ6q-0003L7-QB for emacs-devel@gnu.org; Thu, 28 Aug 2003 12:58:58 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19sQ4m-0001pW-GB for emacs-devel@gnu.org; Thu, 28 Aug 2003 12:56:48 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.20) id 19sQ1C-00020r-AU; Thu, 28 Aug 2003 12:53:06 -0400 Original-To: gerd.moellmann@t-online.de (Gerd Moellmann) In-reply-to: <861xv7c94c.fsf@gerd.free-bsd.org> (gerd.moellmann@t-online.de) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:16177 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:16177 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?