From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#49782: 28.0.50; set-fontset-font crashes in init (server) Date: Fri, 30 Jul 2021 21:19:52 +0300 Message-ID: <83czqzr7ef.fsf@gnu.org> References: <87mtq4rmh0.fsf@arrian.i-did-not-set--mail-host-address--so-tickle-me> <83eebfrixt.fsf@gnu.org> <87r1ffk7wy.fsf@turtle-trading.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25886"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49782@debbugs.gnu.org To: Benjamin Riefenstahl Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 30 20:21:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m9X8D-0006Xo-8K for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Jul 2021 20:21:13 +0200 Original-Received: from localhost ([::1]:44986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9X8B-0007YR-Rp for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Jul 2021 14:21:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58112) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9X82-0007Y9-Ff for bug-gnu-emacs@gnu.org; Fri, 30 Jul 2021 14:21:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49330) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m9X82-0005Ok-8C for bug-gnu-emacs@gnu.org; Fri, 30 Jul 2021 14:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m9X81-0005Uj-Th for bug-gnu-emacs@gnu.org; Fri, 30 Jul 2021 14:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Jul 2021 18:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49782 X-GNU-PR-Package: emacs Original-Received: via spool by 49782-submit@debbugs.gnu.org id=B49782.162766921821049 (code B ref 49782); Fri, 30 Jul 2021 18:21:01 +0000 Original-Received: (at 49782) by debbugs.gnu.org; 30 Jul 2021 18:20:18 +0000 Original-Received: from localhost ([127.0.0.1]:60876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9X7J-0005TR-L6 for submit@debbugs.gnu.org; Fri, 30 Jul 2021 14:20:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60104) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9X7H-0005TA-Pc for 49782@debbugs.gnu.org; Fri, 30 Jul 2021 14:20:16 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50510) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9X7C-0004lZ-2m; Fri, 30 Jul 2021 14:20:10 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4448 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9X7B-0003ci-Bj; Fri, 30 Jul 2021 14:20:10 -0400 In-Reply-To: <87r1ffk7wy.fsf@turtle-trading.net> (message from Benjamin Riefenstahl on Fri, 30 Jul 2021 19:50:37 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:210927 Archived-At: > From: Benjamin Riefenstahl > Cc: 49782@debbugs.gnu.org > Date: Fri, 30 Jul 2021 19:50:37 +0200 > > > Does the patch below prevent the crash? > > > > diff --git a/src/fontset.c b/src/fontset.c > > index 332be6c..52c7e38 100644 > > --- a/src/fontset.c > > +++ b/src/fontset.c > > @@ -1356,6 +1356,9 @@ check_fontset_name (Lisp_Object name, Lisp_Object *frame) > > int id; > > struct frame *f = decode_live_frame (*frame); > > > > + if (!FRAME_WINDOW_P (f)) > > + error ("Can't use fontsets in non-GUI frames"); > > + > > XSETFRAME (*frame, f); > > This works. At least it tells what the problem is. The error could > even be caught. Thanks, I installed the change on the master branch. > But what I actually want is probably display-multi-font-p, right? If you want to add the condition to your code, yes.