I'm reluctant to filtering it out unconditionally, because the font-backend is something the users can specify for themselves, perhaps to fix some problem with their installation.

The "right" fix, I think, would be either:

- To filter it out when saving, if it is the default (i.e., '(harfbuzz gdi) on Windows, currently), or
- To filter it out when loading, if the saved value is not supported on the running instance of Emacs.

The problem is, there's no way to get a list of supported font backends from elisp, there is?



On Sun, Dec 1, 2019 at 6:28 PM Eli Zaretskii <eliz@gnu.org> wrote:
> Date: Sun, 01 Dec 2019 05:38:06 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 38442@debbugs.gnu.org
>
> > From: Ola Nilsson <ola.nilsson@gmail.com>
> > Date: Sun, 1 Dec 2019 00:03:26 +0100
> >
> > I recently rebuilt my Emacs from master and also enabled cairo with
> > --with-cairo.  Something in my desktop file triggered a segmentation
> > fault with the backtrace below
>
> You switched to Cairo, but the desktop file mentions font back-ends
> not available with Cairo:
>
> > (setq desktop-saved-frameset [frameset 1 (24034 55364 390522 65000) (desktop . "208") "olani@blue" nil nil
> > ((((minibuffer . t) (undecorated) (override-redirect) (font-backend xft x) (font . "-PfEd-DejaVu Sans
>   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Juanma, I think given these problems we should filter out font-backend
when restoring a frameset.  If you agree, can you make this change,
please?

Thanks.