diff src/redisplay.c @ 5587:3fde0e346ad7

Prevent assert at frame.c, l. 6311 by initializing glyph cachels. * frame.c (Fmake_frame): Ensure that reset_glyph_cachels gets called. (setup_minibuffer_frame): Improve header comment. * redisplay.c (redisplay_window): Update comment. Remove code checking for uninitialized face_cachels and glyph_cachels. Can't happen in theory, and guarded by asserts in practice. * window.c (allocate_window): Update comment on reset_*_cachels.
author Stephen J. Turnbull <stephen@xemacs.org>
date Sat, 29 Oct 2011 00:35:33 +0900
parents 56144c8593a8
children b0d712bbc2a6
line wrap: on
line diff
--- a/src/redisplay.c	Fri Oct 28 23:52:26 2011 +0900
+++ b/src/redisplay.c	Sat Oct 29 00:35:33 2011 +0900
@@ -6306,18 +6306,19 @@
      because we initialized them at startup and the only way to reduce
      their number is through calling reset_face_cachels() or
      reset_glyph_cachels(), which as a side effect sets up a number of
-     standard entries */
+     standard entries
+     2011-10-29 -- We were managing to hit the glyph_cachels assert in certain
+     contexts where VM was creating a lot of frames.  I don't have a full
+     analysis, but I suspect that we were failing to setup the glyph_cachels
+     at about l. 961 of frame.c, and a message was being sent to the echo area
+     before the initialization was complete.  This triggered a redisplay of
+     the minibuffer window (this part is confirmed), and thus this assert. */
   assert (Dynarr_length (w->face_cachels));
   assert (Dynarr_length (w->glyph_cachels));
 
   /* If the buffer has changed we have to invalidate all of our face
      cache elements. */
   if ((!echo_active && b != window_display_buffer (w))
-#if 0
-  /* #### Delete this code sometime later than 2-1-10 when we're sure it's
-     not needed */
-      || !Dynarr_length (w->face_cachels)
-#endif
       || f->faces_changed)
     reset_face_cachels (w);
   else
@@ -6327,11 +6328,6 @@
      the cache purely because glyphs have changed - this is now
      handled by the dirty flag.*/
   if ((!echo_active && b != window_display_buffer (w))
-#if 0
-  /* #### Delete this code sometime later than 2-1-10 when we're sure it's
-     not needed */
-      || !Dynarr_length (w->glyph_cachels)
-#endif
       || f->faces_changed)
     reset_glyph_cachels (w);
   else