all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Felix Dietrich <felix.dietrich@sperrhaken.name>
To: Eric S Fraga <e.fraga@ucl.ac.uk>
Cc: help-gnu-emacs@gnu.org
Subject: Re: how to track down "invalid face attribute" errors?
Date: Sun, 25 Sep 2022 16:26:15 +0200	[thread overview]
Message-ID: <87edvzbke0.fsf@sperrhaken.name> (raw)
In-Reply-To: <87k05rr79k.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Sun, 25 Sep 2022 13:03:03 +0100")

Hi Eric,

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> some package I'm using is leading to errors of the form
>
>   Invalid face attribute :foreground nil [54 times]
>
> can anybody suggest how I can track down which package/function is
> causing this?  Debugging on error doesn't catch this.

I am just going to brainstorm some ideas here:

1. Go through every buffer and check for every buffer position whether
any anonymous face set in a text property or overlay property has a
:foreground attribute that is nil.  This might give you an idea about
which packages could be responsible.  I do not have code for that, but
could probably concoct something.


2. Grep through your configuration and your installed packages for
":foreground" and see if it is paired with nil somewhere.  One of the
various functions to add text properties [1] or ‘overlay-put’ should be
close by.


3. Deactivate groups of packages and see what happens.  Might be a bit
to tedious and error prone if you have a lot installed and need to
manage their shared dependencies.


4. A bit of a harebrained sledgehammer approach (which might lead
nowhere): run Emacs in a debugger, set a watchpoint on ‘add_to_log’
being called with a ‘format’ argument starting with "Invalid face
attribute", then, on break, analyse the stack, and see if you can figure
out the culprit.


Footnotes:
[1]  (info "(elisp) Changing Properties")

     <https://www.gnu.org/software/emacs/manual/html_node/elisp/Changing-Properties.html>

-- 
Felix Dietrich




  parent reply	other threads:[~2022-09-25 14:26 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-25 12:03 how to track down "invalid face attribute" errors? Eric S Fraga
2022-09-25 13:00 ` Emanuel Berg
2022-09-26  9:04   ` Eric S Fraga
2022-09-26  9:40     ` Robert Pluim
2022-09-26  9:50       ` Fraga, Eric
2022-09-27 11:12       ` Felix Dietrich
2022-09-27 14:08         ` Robert Pluim
2022-10-05 12:32           ` Felix Dietrich
2022-10-05 13:31             ` Robert Pluim
2022-10-05 13:51             ` Eli Zaretskii
2022-10-06 14:58               ` Felix Dietrich
2022-09-28 11:41   ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-09-28 15:04     ` Robert Pluim
2022-09-29 16:32     ` Emanuel Berg
2022-10-03 19:19       ` Felix Dietrich
2022-10-03 22:46         ` Emanuel Berg
2022-10-04 11:06         ` Felix Dietrich
2022-10-05 11:29           ` Felix Dietrich
2022-09-25 14:01 ` Eli Zaretskii
2022-09-25 15:53   ` Eric S Fraga
2022-09-25 16:06     ` Eli Zaretskii
2022-09-25 17:20       ` Eric S Fraga
2022-09-25 14:26 ` Felix Dietrich [this message]
2022-09-25 15:51   ` Fraga, Eric

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87edvzbke0.fsf@sperrhaken.name \
    --to=felix.dietrich@sperrhaken.name \
    --cc=e.fraga@ucl.ac.uk \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.