From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.bugs Subject: bug#17486: 24.4.50; set-face-font problem on OSX Date: Sun, 18 May 2014 20:17:53 +0400 Message-ID: <5378DD31.8090604@yandex.ru> References: <2C3533D7-8966-48CC-A63E-E7C363E5F429@swipnet.se> <537613B2.10803@swipnet.se> <53762664.9040700@yandex.ru> <4D37DE1B-52D9-4AD1-AC85-8E17C1887110@swipnet.se> <537632E0.1010403@yandex.ru> <18DD744E-FCBD-4613-A4F0-E74404B662F3@swipnet.se> <53784884.6040704@yandex.ru> <40E1EC60-3BC6-491D-ACF2-13DFF19B03A2@swipnet.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010404090808060505090306" X-Trace: ger.gmane.org 1400429972 20351 80.91.229.3 (18 May 2014 16:19:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 May 2014 16:19:32 +0000 (UTC) Cc: 17486@debbugs.gnu.org, Christian Lynbech To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 18 18:19:26 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wm3o4-0004D4-Sq for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 May 2014 18:19:25 +0200 Original-Received: from localhost ([::1]:44054 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wm3o4-0003vA-FW for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 May 2014 12:19:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wm3nq-0003fc-Dy for bug-gnu-emacs@gnu.org; Sun, 18 May 2014 12:19:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wm3nj-0002w0-7G for bug-gnu-emacs@gnu.org; Sun, 18 May 2014 12:19:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53427) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wm3nj-0002vs-0H for bug-gnu-emacs@gnu.org; Sun, 18 May 2014 12:19:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wm3ni-0004Fw-Ee for bug-gnu-emacs@gnu.org; Sun, 18 May 2014 12:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Antipov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 May 2014 16:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17486 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17486-submit@debbugs.gnu.org id=B17486.140042988916289 (code B ref 17486); Sun, 18 May 2014 16:19:02 +0000 Original-Received: (at 17486) by debbugs.gnu.org; 18 May 2014 16:18:09 +0000 Original-Received: from localhost ([127.0.0.1]:52304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wm3mq-0004Ef-TT for submit@debbugs.gnu.org; Sun, 18 May 2014 12:18:09 -0400 Original-Received: from forward4l.mail.yandex.net ([84.201.143.137]:51541) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wm3mn-0004E7-Us for 17486@debbugs.gnu.org; Sun, 18 May 2014 12:18:07 -0400 Original-Received: from smtp8.mail.yandex.net (smtp8.mail.yandex.net [77.88.61.54]) by forward4l.mail.yandex.net (Yandex) with ESMTP id 5156514410AF; Sun, 18 May 2014 20:17:59 +0400 (MSK) Original-Received: from smtp8.mail.yandex.net (localhost [127.0.0.1]) by smtp8.mail.yandex.net (Yandex) with ESMTP id D900F1B60059; Sun, 18 May 2014 20:17:58 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp8.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id oeEaJkpej0-HuaSrFRi; Sun, 18 May 2014 20:17:57 +0400 (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client certificate not present) X-Yandex-Uniq: 324efce9-e080-4780-8663-1f90adbf734c DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1400429878; bh=hftZx8xAcZHferC1XoM8nNe+UwCYikZibr7ZBfC7dfs=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type; b=ZGNGCz989+FObWIjwRtWg9MoQSVF3bmEvC/hzLBm4Pr7EeQH560qnXZXTbTRU4UzA gnRCzltMEgDGMldTHCTcGeF/TBaKhltQp7mF2orBO9lC4g0NofzTMU3KgC3kqzf+L/ q9X3IUlKWz0bnJVoNjctrnfpxblXrVGILjpYgn3M= Authentication-Results: smtp8.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: <40E1EC60-3BC6-491D-ACF2-13DFF19B03A2@swipnet.se> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:89211 Archived-At: This is a multi-part message in MIME format. --------------010404090808060505090306 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable On 05/18/2014 11:19 AM, Jan Dj=E4rv wrote: >> Could you please check whether set-face-font hits one of the following= extra easserts? >> > > ../../current/src/font.c:3311: Emacs fatal error: assertion failed: NIL= P (entity) || FONT_ENTITY_P (entity) > > (gdb) pp entity > [#] Hm... so font_matching_entity sometimes returns [#] instead = of #. Something may be wrong with font cache or with font driver-specific match= routine. An output of (frame-font-cache) looks correct, so let's check both cases = with the following patch. My output looks like: font_matching_entity: matched entity nil font_matching_entity: matched entity # font_matching_entity: matched entity nil font_matching_entity: matched entity # font_matching_entity: matched entity nil font_matching_entity: matched entity # font_matching_entity: matched entity nil font_matching_entity: matched entity # font_matching_entity: matched entity nil and I do not see 1-item vectors here. Dmitry --------------010404090808060505090306 Content-Type: text/x-patch; name="bug17486_extra_easserts_debug_print.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bug17486_extra_easserts_debug_print.patch" === modified file 'src/font.c' --- src/font.c 2014-04-05 19:30:36 +0000 +++ src/font.c 2014-05-18 16:11:09 +0000 @@ -2803,10 +2803,16 @@ ASET (work, FONT_TYPE_INDEX, driver_list->driver->type); entity = assoc_no_quit (work, XCDR (cache)); if (CONSP (entity)) - entity = XCDR (entity); + { + entity = XCDR (entity); + fprintf (stderr, "%s: cached entity ", __func__); + debug_print (entity); + } else { entity = driver_list->driver->match (f, work); + fprintf (stderr, "%s: matched entity ", __func__); + debug_print (entity); if (!NILP (entity)) { Lisp_Object copy = copy_font_spec (work); @@ -3299,6 +3305,7 @@ Lisp_Object entity, name; entity = font_find_for_lface (f, attrs, spec, -1); + eassert (NILP (entity) || FONT_ENTITY_P (entity)); if (NILP (entity)) { /* No font is listed for SPEC, but each font-backend may have @@ -3307,6 +3314,7 @@ if (NILP (entity)) return Qnil; } + eassert (NILP (entity) || FONT_ENTITY_P (entity)); /* Don't lose the original name that was put in initially. We need it to re-apply the font when font parameters (like hinting or dpi) have changed. */ --------------010404090808060505090306--