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 23:12:09 +0300 Message-ID: <83v94rpnmu.fsf@gnu.org> References: <87mtq4rmh0.fsf@arrian.i-did-not-set--mail-host-address--so-tickle-me> <83eebfrixt.fsf@gnu.org> <871r7fhcpv.fsf@turtle-trading.net> <835ywrr5ve.fsf@gnu.org> <87wnp77gdn.fsf@turtle-trading.net> <83wnp7po2q.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40610"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49782@debbugs.gnu.org To: b.riefenstahl@turtle-trading.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 30 22:13:14 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 1m9Ysb-000APj-EQ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Jul 2021 22:13:13 +0200 Original-Received: from localhost ([::1]:49800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9YsZ-0001RD-A1 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 30 Jul 2021 16:13:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m9YsR-0001R4-0G for bug-gnu-emacs@gnu.org; Fri, 30 Jul 2021 16:13:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49472) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m9YsQ-0005M5-G2 for bug-gnu-emacs@gnu.org; Fri, 30 Jul 2021 16:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m9YsQ-0008Oz-7S for bug-gnu-emacs@gnu.org; Fri, 30 Jul 2021 16:13:02 -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 20:13:02 +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.162767595532256 (code B ref 49782); Fri, 30 Jul 2021 20:13:02 +0000 Original-Received: (at 49782) by debbugs.gnu.org; 30 Jul 2021 20:12:35 +0000 Original-Received: from localhost ([127.0.0.1]:32785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9Yry-0008OC-QA for submit@debbugs.gnu.org; Fri, 30 Jul 2021 16:12:35 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m9Yrw-0008Nz-N6 for 49782@debbugs.gnu.org; Fri, 30 Jul 2021 16:12:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54386) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m9Yrr-0004r1-68; Fri, 30 Jul 2021 16:12:27 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3356 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 1m9Yrq-0001SL-Qp; Fri, 30 Jul 2021 16:12:27 -0400 In-Reply-To: <83wnp7po2q.fsf@gnu.org> (message from Eli Zaretskii on Fri, 30 Jul 2021 23:02:37 +0300) 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:210947 Archived-At: > Date: Fri, 30 Jul 2021 23:02:37 +0300 > From: Eli Zaretskii > Cc: 49782@debbugs.gnu.org > > > But that additional condition re-introduces the original problem. > > Then I'll need a backtrace from a live Emacs process with "xbacktrace" > results as well, and in a build without optimizations, so I could see > what's the difference between these two use cases. But before you embark on that adventure, please try another stab in the dark: diff --git a/src/fontset.c b/src/fontset.c index d2d428d..7d4bd65 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -1356,15 +1356,16 @@ check_fontset_name (Lisp_Object name, Lisp_Object *frame) int id; struct frame *f = decode_live_frame (*frame); - if (!FRAME_WINDOW_P (f) && !FRAME_INITIAL_P (f)) - error ("Can't use fontsets in non-GUI frames"); - XSETFRAME (*frame, f); if (EQ (name, Qt)) return Vdefault_fontset; if (NILP (name)) - id = FRAME_FONTSET (f); + { + if (!FRAME_WINDOW_P (f)) + error ("Can't use fontsets in non-GUI frames"); + id = FRAME_FONTSET (f); + } else { CHECK_STRING (name);