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#11813: bug#11850: crash (null font) running emacs built from git Date: Sun, 08 Jul 2012 22:20:01 +0800 Message-ID: <87txxi1gj2.fsf@gnu.org> References: <831uks6bvy.fsf@gnu.org> <83y5n04wno.fsf@gnu.org> <83d34b4hdq.fsf@gnu.org> <831ukr45gh.fsf@gnu.org> <83y5my2vp8.fsf@gnu.org> <83sjd62lng.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1341757261 2058 80.91.229.3 (8 Jul 2012 14:21:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 8 Jul 2012 14:21:01 +0000 (UTC) Cc: Left Right , 11813@debbugs.gnu.org, 11850@debbugs.gnu.org, Yotam Medini =?UTF-8?Q?=D7=99=D7=95=D7=AA=D7=9D_?= =?UTF-8?Q?=D7=9E=D7=93=D7=99=D7=A0=D7=99?= To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 08 16:20:59 2012 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 1SnsM7-0005Ok-Kt for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Jul 2012 16:20:59 +0200 Original-Received: from localhost ([::1]:39890 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnsM6-0008JI-BG for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Jul 2012 10:20:58 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnsM3-0008J8-6S for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2012 10:20:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SnsM1-0002Oj-8S for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2012 10:20:54 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47219) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnsM1-0002Oe-2K for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2012 10:20:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SnsR0-0002Ey-BN for bug-gnu-emacs@gnu.org; Sun, 08 Jul 2012 10:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Jul 2012 14:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11813 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11813-submit@debbugs.gnu.org id=B11813.13417575278568 (code B ref 11813); Sun, 08 Jul 2012 14:26:02 +0000 Original-Received: (at 11813) by debbugs.gnu.org; 8 Jul 2012 14:25:27 +0000 Original-Received: from localhost ([127.0.0.1]:56763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SnsQP-0002E5-JF for submit@debbugs.gnu.org; Sun, 08 Jul 2012 10:25:27 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:36083) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SnsQL-0002Du-Gt; Sun, 08 Jul 2012 10:25:23 -0400 Original-Received: from cm162.gamma80.maxonline.com.sg ([202.156.80.162]:55103 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SnsLI-0000KS-Px; Sun, 08 Jul 2012 10:20:09 -0400 In-Reply-To: <83sjd62lng.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 05 Jul 2012 19:54:59 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:61719 Archived-At: Eli Zaretskii writes: > OK, then does the following patch fix the problem? > > --- src/xdisp.c 2012-07-05 16:28:34 +0000 > +++ src/xdisp.c 2012-07-05 16:51:53 +0000 > @@ -22604,7 +22604,7 @@ fill_glyphless_glyph_string (struct glyp > last = s->row->glyphs[s->area] + end; > voffset = glyph->voffset; > s->face = FACE_FROM_ID (s->f, face_id); > - s->font = s->face->font; > + s->font = s->face->font ? s->face->font : FRAME_FONT (s->f); > s->nchars = 1; > s->width = glyph->pixel_width; > glyph++; This patch is correct, please commit it. Indeed, when creating glyphless glyphs, we cannot assume that the face has a well-defined font, because of the case where font loading during face realization fails. I'm not sure why font loading fails in the reporter's specific case, but it's very likely a system misconfiguration. One way to induce this bug is to delete a font file, or change its permissions so that it becomes unreadable. When you do this, the fontconfig cache will tell Emacs that the font exists, but then Emacs fails to load the font when it tries, triggering this bug. The reporter should try running `fc-cache -fs' and see if the problem goes away.