1 new commit in XEmacs:
https://bitbucket.org/xemacs/xemacs/changeset/3fde0e346ad7/
changeset: 3fde0e346ad7
user: stephen_at_xemacs
date: 2011-10-28 17:35:33
summary: 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.
affected #: 4 files
diff -r d8a11d5ebc9fd44f07ba43e58876aaf83122264d -r
3fde0e346ad710f69d233e5bc8d47defef4ea53f src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,16 @@
+2011-10-29 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ 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.
+
2011-10-09 Aidan Kehoe <kehoea(a)parhasard.net>
* fns.c (remassoc_no_quit):
diff -r d8a11d5ebc9fd44f07ba43e58876aaf83122264d -r
3fde0e346ad710f69d233e5bc8d47defef4ea53f src/frame.c
--- a/src/frame.c
+++ b/src/frame.c
@@ -793,7 +793,8 @@
f->minibuffer_window = Qnil;
}
-/* Make a frame containing only a minibuffer window. */
+/* Make a frame containing only a minibuffer window.
+ The minibuffer window is also the root window. */
static void
setup_minibuffer_frame (struct frame *f)
@@ -957,8 +958,12 @@
if (initialized && !DEVICE_STREAM_P (d))
{
if (!NILP (f->minibuffer_window))
- reset_face_cachels (XWINDOW (f->minibuffer_window));
+ {
+ reset_face_cachels (XWINDOW (f->minibuffer_window));
+ reset_glyph_cachels (XWINDOW (f->minibuffer_window));
+ }
reset_face_cachels (XWINDOW (f->root_window));
+ reset_glyph_cachels (XWINDOW (f->root_window));
}
/* If no frames on this device formerly existed, say this is the
diff -r d8a11d5ebc9fd44f07ba43e58876aaf83122264d -r
3fde0e346ad710f69d233e5bc8d47defef4ea53f src/redisplay.c
--- a/src/redisplay.c
+++ b/src/redisplay.c
@@ -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
diff -r d8a11d5ebc9fd44f07ba43e58876aaf83122264d -r
3fde0e346ad710f69d233e5bc8d47defef4ea53f src/window.c
--- a/src/window.c
+++ b/src/window.c
@@ -383,7 +383,10 @@
All callers of allocate_window should therefore call
reset_face_cachels on the created window. We can't do it
here because the window must have its frame pointer set or
- reset_face_cachels will fail. */
+ reset_face_cachels will fail.
+ A similar requirement holds for reset_glyph_cachels. We *could* do
+ that here (there's no reference to the frame pointer in that function),
+ but we may as well have the same discipline. */
Lisp_Object
allocate_window (void)
{
Repository URL:
https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches