From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#30874: 27.0.50; Emacs crashes Date: Sat, 31 Mar 2018 15:55:13 +0200 Message-ID: <87in9cxsce.fsf@gmail.com> References: <83woy4i7rz.fsf@gnu.org> <83vadoi2ia.fsf@gnu.org> <878taf2kj5.fsf@gmail.com> <83d0zqg8p8.fsf@gnu.org> <87o9ja230e.fsf@gmail.com> <83605ig2se.fsf@gnu.org> <87fu4m1tht.fsf@gmail.com> <878tae1nzu.fsf@gmail.com> <83lgeedxv7.fsf@gnu.org> <874ll128ww.fsf@gmail.com> <83efk3dvq0.fsf@gnu.org> <87po3mdfl8.fsf@gmail.com> <83sh8idd3p.fsf@gnu.org> <87woxtq282.fsf@gmail.com> <83po3l946g.fsf@gnu.org> <87o9j5pvk4.fsf@gmail.com> <83lge98ymi.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1522504454 18963 195.159.176.226 (31 Mar 2018 13:54:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 31 Mar 2018 13:54:14 +0000 (UTC) Cc: 30874@debbugs.gnu.org, jsynacek@redhat.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 31 15:54:09 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f2GxN-0004pg-DZ for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Mar 2018 15:54:09 +0200 Original-Received: from localhost ([::1]:52273 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f2GzQ-0007fk-Um for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Mar 2018 09:56:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36464) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f2GzF-0007fF-I3 for bug-gnu-emacs@gnu.org; Sat, 31 Mar 2018 09:56:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f2GzC-0004ZU-Fn for bug-gnu-emacs@gnu.org; Sat, 31 Mar 2018 09:56:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53396) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f2GzC-0004Yy-Av for bug-gnu-emacs@gnu.org; Sat, 31 Mar 2018 09:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f2GzB-0000Lj-Np for bug-gnu-emacs@gnu.org; Sat, 31 Mar 2018 09:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Mar 2018 13:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30874 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30874-submit@debbugs.gnu.org id=B30874.15225045241319 (code B ref 30874); Sat, 31 Mar 2018 13:56:01 +0000 Original-Received: (at 30874) by debbugs.gnu.org; 31 Mar 2018 13:55:24 +0000 Original-Received: from localhost ([127.0.0.1]:33055 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f2GyZ-0000LC-R4 for submit@debbugs.gnu.org; Sat, 31 Mar 2018 09:55:24 -0400 Original-Received: from mail-wm0-f54.google.com ([74.125.82.54]:36694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f2GyX-0000L5-MW for 30874@debbugs.gnu.org; Sat, 31 Mar 2018 09:55:22 -0400 Original-Received: by mail-wm0-f54.google.com with SMTP id x82so20453933wmg.1 for <30874@debbugs.gnu.org>; Sat, 31 Mar 2018 06:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version:content-transfer-encoding; bh=96s+pox/wttLlZ+K4Od4nyEZzzGIsfoHlZt7XBxKIGE=; b=VHZSdaLqIHW6lLzKtKII++ZDpAVuW80JiiuuAGOo/uz5uYFyJxcwjDCOtqbrZBZPQ/ tPpVN7+lF1RWIh2q7lLw6I9b9ju/yIx3ZG1G20yUqkXu9uR9DJQmDODhxrMKknh+r51M iNl/xDMXgXRPwYGE4qAy/pE9fil4uBf9P7+nWAjZ6wBgDu9W2GEMYvYqveupubgL9AOr PJiLBe1HcpR7kvcL75iGvsiVBgZPnDdjBbbnX+EDmp9ORmQaC5mwfsxR+ziu+c3PUtRF Xj14fkOSKUTrb66fdFs9CDJ5VR0Dr3bQmXGXfRviP0JL+wGegbXXjh/bOok/V0E1f3FE Y3Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=96s+pox/wttLlZ+K4Od4nyEZzzGIsfoHlZt7XBxKIGE=; b=LC1PfpwqGEQ1i+xcVPtLQ04R05Y8hOPAbYHZ9yVIpSJ9JA2GFlBmysaUixASjwXksm ep4bns8lfq36OJVtY3c97ZXcNDGWgprbkHiADjNVlZFKp3H5wLm9rJtNaPPPWLbinSds IeXrPG4u1kpHDMUemHK8hF8cZPbqlQ3fudh4UYHmjayqUM9A+jVPDjPkLh8zvfrezOOT qSSw32OeuwokaPYUGlqeg6UuNn+OptkqDuGhDitiECEsDLI5YAkfVHrSg9j9KDddcHyE OMvhqKF2379BDd+OrAfyqxEah1v1F/La2UP8sVEceLmR+X0e/IwXAVS8DkXwf6zduRXX OZPA== X-Gm-Message-State: AElRT7ECkkhWyurbdKAET7BDBqHAfSmlFjMl+2R/2Qa9aeHg1z/f6rb7 U2/aCaVdZsvp5BPtWi3fsws= X-Google-Smtp-Source: AIpwx49svI/eiqVEHFlmf4mWC4n3yPKgrPUFD+NbKP88a2Cb317FpvuqsAUBsZ5LYaDQSH/ong78dA== X-Received: by 10.28.1.197 with SMTP id 188mr4692261wmb.49.1522504515523; Sat, 31 Mar 2018 06:55:15 -0700 (PDT) Original-Received: from rpluim (vav06-1-78-207-202-134.fbx.proxad.net. [78.207.202.134]) by smtp.gmail.com with ESMTPSA id n47sm11218509wrf.41.2018.03.31.06.55.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 31 Mar 2018 06:55:14 -0700 (PDT) Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: <83lge98ymi.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 30 Mar 2018 16:46:29 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:144759 Archived-At: Eli Zaretskii writes: > Yes, it's called gc_in_progress. I=CA=BCm testing the following, which fixes the 20890 crash for me when using Cairo. diff --git i/src/ftfont.c w/src/ftfont.c index c2e093e633..89c07e1f21 100644 --- i/src/ftfont.c +++ w/src/ftfont.c @@ -1242,6 +1242,11 @@ ftfont_close (struct font *font) struct ftfont_info *ftfont_info =3D (struct ftfont_info *) font; Lisp_Object val, cache; =20 +#ifdef USE_CAIRO + /* Bug#20890 workaround. */ + if (gc_in_progress) + return; +#endif val =3D Fcons (font->props[FONT_FILE_INDEX], make_number (ftfont_info->i= ndex)); cache =3D ftfont_lookup_cache (val, FTFONT_CACHE_FOR_FACE); eassert (CONSP (cache)); > I'm not sure it's about the font, it could be about some glyphs of the > font. You are probably right, but IME leaving a variable to get back > previous behavior is good policy; at the very least, it makes it easy > to ask users who complain about related problems to see if this > particular change is the culprit without having to rebuild Emacs. > >> > Also, we should probably condition this by HAVE_XFT, since AFAIU the >> > problem is only relevant to that build? This is what I=CA=BCm using at the moment. I can put the variable in syms_of_xftfont if you prefer. diff --git i/src/ftfont.c w/src/ftfont.c index c2e093e633..2190186940 100644 --- i/src/ftfont.c +++ w/src/ftfont.c @@ -764,6 +764,13 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout,= struct OpenTypeSpec **ots if (scalable >=3D 0 && ! FcPatternAddBool (pattern, FC_SCALABLE, scalable ? FcTrue : FcF= alse)) goto err; +#ifdef HAVE_XFT + /* We really don't like color fonts, they cause Xft crashes. See + bug#30874. */ + if (Vxft_ignore_color_fonts + && ! FcPatternAddBool(pattern, FC_COLOR, FcFalse)) + goto err; +#endif =20 goto finish; =20 @@ -2735,6 +2742,14 @@ syms_of_ftfont (void) DEFSYM (Qsans, "sans"); DEFSYM (Qsans__serif, "sans serif"); =20 +#ifdef HAVE_XFT + DEFVAR_BOOL ("xft-ignore-color-fonts", + Vxft_ignore_color_fonts, + doc: /* Non-nil means don't query fontconfig for color fonts, +since they often cause Xft crashes. bug#30874. */); + Vxft_ignore_color_fonts =3D 1; +#endif + staticpro (&freetype_font_cache); freetype_font_cache =3D list1 (Qt); =20