From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#3659: FW: 23.0.95; crash on set-frame-font Date: Fri, 26 Jun 2009 23:18:21 -0400 Message-ID: <87ws6y2wle.fsf@stupidchicken.com> References: <63C2A154B1708946B60726AFDBA00AC005E5EC5A@ukmailemea01.misys.global.ad> <87iqinxbs7.fsf@stupidchicken.com> <63C2A154B1708946B60726AFDBA00AC005EABBA6@ukmailemea01.misys.global.ad> <87fxdp4ssu.fsf@stupidchicken.com> <87eit9ugs9.fsf@stupidchicken.com> Reply-To: Chong Yidong , 3659@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1246073865 20596 80.91.229.12 (27 Jun 2009 03:37:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Jun 2009 03:37:45 +0000 (UTC) Cc: 3659@emacsbugs.donarmstrong.com, Simon.Marshall@misys.com To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 27 05:37:37 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MKOjR-00082b-8R for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Jun 2009 05:37:37 +0200 Original-Received: from localhost ([127.0.0.1]:52067 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MKOjQ-0005qO-Ic for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Jun 2009 23:37:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MKOjM-0005og-SL for bug-gnu-emacs@gnu.org; Fri, 26 Jun 2009 23:37:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MKOjH-0005mg-35 for bug-gnu-emacs@gnu.org; Fri, 26 Jun 2009 23:37:32 -0400 Original-Received: from [199.232.76.173] (port=39735 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MKOjH-0005mc-0V for bug-gnu-emacs@gnu.org; Fri, 26 Jun 2009 23:37:27 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:49252) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MKOjG-0007cE-0k for bug-gnu-emacs@gnu.org; Fri, 26 Jun 2009 23:37:26 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5R3bNbM004217; Fri, 26 Jun 2009 20:37:23 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n5R3P8ig002058; Fri, 26 Jun 2009 20:25:08 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Chong Yidong Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 27 Jun 2009 03:25:08 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3659 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3659-submit@emacsbugs.donarmstrong.com id=B3659.12460727171048 (code B ref 3659); Sat, 27 Jun 2009 03:25:08 +0000 Original-Received: (at 3659) by emacsbugs.donarmstrong.com; 27 Jun 2009 03:18:37 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from pantheon-po33.its.yale.edu (pantheon-po33.its.yale.edu [130.132.50.94]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5R3IXa9001039 for <3659@emacsbugs.donarmstrong.com>; Fri, 26 Jun 2009 20:18:35 -0700 Original-Received: from furry (WHITAKER-TWO-FOURTEEN.MIT.EDU [18.56.5.214]) (authenticated bits=0) by pantheon-po33.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n5R3ILNG024845 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 26 Jun 2009 23:18:27 -0400 Original-Received: by furry (Postfix, from userid 1000) id 8CCEBC09B; Fri, 26 Jun 2009 23:18:21 -0400 (EDT) In-Reply-To: (Glenn Morris's message of "Fri, 26 Jun 2009 22:45:18 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Fri, 26 Jun 2009 23:37:32 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:29021 Archived-At: Glenn Morris writes: > "xftfont" is always 0 (perhaps I am printing it wrong? I use "pp".) Does the following patch prevent the crash? *** trunk/src/xftfont.c.~1.24.~ 2009-05-11 12:06:41.000000000 -0400 --- trunk/src/xftfont.c 2009-06-26 23:15:32.000000000 -0400 *************** *** 287,300 **** match = XftFontMatch (display, FRAME_X_SCREEN_NUMBER (f), pat, &result); FcPatternDestroy (pat); xftfont = XftFontOpenPattern (display, match); - ft_face = XftLockFace (xftfont); - UNBLOCK_INPUT; - if (! xftfont) { XftPatternDestroy (match); return Qnil; } /* We should not destroy PAT here because it is kept in XFTFONT and destroyed automatically when XFTFONT is closed. */ font_object = font_make_object (VECSIZE (struct xftfont_info), entity, size); --- 287,301 ---- match = XftFontMatch (display, FRAME_X_SCREEN_NUMBER (f), pat, &result); FcPatternDestroy (pat); xftfont = XftFontOpenPattern (display, match); if (! xftfont) { + UNBLOCK_INPUT; XftPatternDestroy (match); return Qnil; } + ft_face = XftLockFace (xftfont); + UNBLOCK_INPUT; + /* We should not destroy PAT here because it is kept in XFTFONT and destroyed automatically when XFTFONT is closed. */ font_object = font_make_object (VECSIZE (struct xftfont_info), entity, size);