Subject: bug#79422: 30.1; invalid face reference

From: Eli Zaretskii <[email-masked]>
Date: Wed, 10 Sep 2025 15:01:41 +0300

> From: Francesco Potortì <[email-masked]>
> Date: Wed, 10 Sep 2025 13:33:58 +0200
> 
> I have seven open windows: a textual one on Screen, five on different desktops of X on :0 and one on :7 which is managed by Xpra (a sort of graphical Screen).
> 
> Starting some weeks ago, I occasinally see this message:
> 
> Face default, frame #<frame tooltip 0x562ed6872df0>: invalid attribute :background #edeceb from X resource
> Invalid face reference: quote [3 times]
> 
> Here are all similar messages that I gathered from the *Messages* buffer.  Emacs has run for six days.

I see no 'quote' face in Emacs.  Please look at your customizations to
find where it comes from, and then tell how it is defined.

The error message about X resources tells me that you should look at
your X resource settings and try to figure out which face there sets
the background attribute to an invalid value.  It may or may not be
related to the mysterious 'quote' face.

In case you didn't know already, these latter error messages come from
here:

  (defun set-face-attribute-from-resource (face attribute resource class frame)
    "Set FACE's ATTRIBUTE from X resource RESOURCE, class CLASS on FRAME.
  Value is the attribute value specified by the resource, or nil
  if not present.  This function displays a message if the resource
  specifies an invalid attribute."
    (let* ((face-name (face-name face))
	   (value (internal-face-x-get-resource (concat face-name resource)
						class frame)))
      (when value
	(condition-case ()
	    (internal-set-lisp-face-attribute-from-resource
	     face attribute (downcase value) frame)
	  (error
	   (message "Face %s, frame %s: invalid attribute %s %s from X resource"
		    face-name frame attribute value))))
      value))

So if nothing else helps, I would suggest running Emacs under GDB with
breakpoints in all the places where
internal-set-lisp-face-attribute-from-resource and/or
internal-set-lisp-face-attribute which it calls can signal an error
related to the :background attribute, and see what you find.