emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]]


From: Gerd Moellmann
Subject: Re: address@hidden: Re: [Fwd: vc-annotate causes Emacs to die]]
Date: 26 Aug 2002 22:25:08 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Alan Shutko <address@hidden> writes:

> address@hidden (Gerd Moellmann) writes:
> 
> > What's the recipe to reproduce this?  And with which version of Emacs?
> 
> Here's a recipe.  Current CVS Emacs, in the Emacs CVS directory.
> 
> Script started on Mon Aug 26 14:32:50 2002
> [14:32:50] wesley:~/Projects/EmacsBugs/emacs $ pwd
> /home/ats/Projects/EmacsBugs/emacs
> [14:33:06] wesley:~/Projects/EmacsBugs/emacs $ emacs -q --no-site-file 
> ChangeLog
> [In Emacs, hit C-x v g ]

Thanks, Alan & Andre.  I can reproduce this with Alan's recipe.

Until I find time to debug this further, it might be worth using this
quich workaround:

Index: vc.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc.el,v
retrieving revision 1.335
diff -c -u -r1.335 vc.el
cvs server: conflicting specifications of output style
--- vc.el       22 Jul 2002 18:52:04 -0000      1.335
+++ vc.el       26 Aug 2002 20:07:37 -0000
@@ -3219,16 +3219,10 @@
                (setq difference (vc-annotate-difference vc-annotate-offset)))
       (let* ((color (or (vc-annotate-compcar difference vc-annotate-color-map)
                        (cons nil vc-annotate-very-old-color)))
-            ;; substring from index 1 to remove any leading `#' in the name
-            (face-name (concat "vc-annotate-face-" (substring (cdr color) 1)))
             ;; Make the face if not done.
-            (face (or (intern-soft face-name)
-                      (let ((tmp-face (make-face (intern face-name))))
-                        (set-face-foreground tmp-face (cdr color))
-                        (if vc-annotate-background
-                            (set-face-background tmp-face
-                                                 vc-annotate-background))
-                        tmp-face)))    ; Return the face
+            (face (nconc (list :foreground (cdr color))
+                         (when vc-annotate-background
+                           (list :background vc-annotate-background))))
             (point (point))
             overlay)
        (forward-line 1)

(This uses anonymous faces instead of constructing new named faces.
(My personal impression is that using anonymous faces might be
preferrable here, anyway.))

The original problem is that one of the set-face-{back,fore}ground
calls apparently leads to the face cache being cleared, which leaves
redisplay with a nonexistent face referenced from a glyph.  When
compiled with -DGLYPH_DEBUG, this results in an assertion violation.

Under which exact circumstances this face cache clearing happens is
not yet clear to me.  I think this cannot happen during redisplay,
since that is explicitly prevented by setting a flag.  Hm.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]