GNU bug report logs - #39865
28.0.50; Emacs crash

Previous Next

Package: emacs;

Reported by: Vinicius José Latorre <viniciusjl <at> gmail.com>

Date: Mon, 2 Mar 2020 01:55:02 UTC

Severity: normal

Tags: confirmed

Merged with 23386, 35803, 36835

Found in versions 25.0.95, 28.0.50, 24.1, 25.0.50, 24.5, 26.2, 27.0.50

Fixed in version 27.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #38 received at 39865 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 39865 <at> debbugs.gnu.org, viniciusjl <at> gmail.com
Subject: Re: bug#39865: 28.0.50; Emacs crash
Date: Tue, 10 Mar 2020 16:15:09 +0100
>>>>> On Tue, 10 Mar 2020 16:52:04 +0200, Eli Zaretskii <eliz <at> gnu.org> said:

    >> From: Robert Pluim <rpluim <at> gmail.com>
    >> Cc: Vinicius José Latorre <viniciusjl <at> gmail.com>,
    >> 39865 <at> debbugs.gnu.org
    >> Date: Tue, 10 Mar 2020 15:29:44 +0100
    >> 
    >> >> I think that emacs should be more robust about this and do not crash for any bad value.
    >> 
    Eli> I agree.  It is not a bad value, we just couldn't yet find a way of
    Eli> switching the font-backend.
    >> 
    >> Eli, would you accept a patch for emacs-27 that signals a user-error
    >> if trying to set a font-backend thatʼs not supported by the running
    >> emacs? Or that ignores it (with a message)?

    Eli> In general, yes; but I'd need to see the patch.

diff --git a/src/frame.c b/src/frame.c
index 51fc78ab70..3b0174cea9 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -4090,6 +4090,21 @@ gui_set_frame_parameters (struct frame *f, Lisp_Object alist)
 	}
       else
 	{
+          if (EQ (prop, Qfont_backend))
+            {
+              Lisp_Object tail = val;
+              Lisp_Object backend;
+              FOR_EACH_TAIL_SAFE (tail)
+                {
+                  backend = XCAR (tail);
+                  if (! c_symbol_p (XSYMBOL (backend)))
+                    {
+                      AUTO_STRING (format, "Unsupported font-backend: \"%s\"");
+                      xsignal1 (Quser_error, CALLN (Fformat, format, backend));
+                    }
+                }
+            }
+
 	  register Lisp_Object param_index, old_value;
 
 	  old_value = get_frame_param (f, prop);

    Eli> AFAIU, the problem in this case wasn't that the backend wasn't
    Eli> supported, it was that it was changed in the middle of a session.

Setting font-backend to a supported value with default-frame-alist
in .emacs should work, and does for me in master, at least switching
from 'ftcrhb' to 'ftcr'. Switching from 'ftcrhb' to 'xft' crashes.

Hmm, switching to 'x' also crashes. But I can create a new frame with
'x' as font-backend.

Robert




This bug report was last modified 5 years and 64 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.