From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Chris Hall" Newsgroups: gmane.emacs.bugs Subject: Re: 23.0.60; Seg fault in xfaces.c at line 6703 (Emacs.app on GNUstep) Date: Tue, 05 Feb 2008 01:07:49 -1000 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Generated by Pantomime 1.2.0) Content-Type: text/plain; charset="us-ascii"; format="flowed" X-Trace: ger.gmane.org 1202209433 27850 80.91.229.12 (5 Feb 2008 11:03:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Feb 2008 11:03:53 +0000 (UTC) Cc: Emacs bugs , Dan Nicolaescu To: YAMAMOTO Mitsuharu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 05 12:04:14 2008 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 1JMLb1-0007KO-Dt for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Feb 2008 12:04:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JMLaY-0006yr-RV for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Feb 2008 06:03:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JMLaQ-0006tX-IS for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2008 06:03:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JMLaO-0006o3-4p for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2008 06:03:32 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JMLaO-0006no-0T for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2008 06:03:32 -0500 Original-Received: from wr-out-0506.google.com ([64.233.184.233]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JMLaN-0002cz-FX for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2008 06:03:31 -0500 Original-Received: by wr-out-0506.google.com with SMTP id 58so1958937wri.10 for ; Tue, 05 Feb 2008 03:03:29 -0800 (PST) Original-Received: by 10.143.17.13 with SMTP id u13mr4150224wfi.69.1202209408057; Tue, 05 Feb 2008 03:03:28 -0800 (PST) Original-Received: from localhost.localdomain ( [75.95.220.61]) by mx.google.com with ESMTPS id 26sm266267wra.27.2008.02.05.03.03.24 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Feb 2008 03:03:25 -0800 (PST) In-Reply-To: User-Agent: GNUMail (Version 1.2.0) X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 (Google crawlbot) 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:17479 Archived-At: On 2008-02-03 21:38:04 -1000 YAMAMOTO Mitsuharu wrote: > > I don't think so. As I said in *1 above, I could reproduce the > null-face_cache problem in Emacs 23.0.50, which is the version before > the unicode merge. > I may have found what is causing the problem, but I have no idea what the fix might be. I use Emacs.app rc1, which is based on Emacs 23.0.0, so I have to code, and I rebuilt using the same CFLAGS I used for Emacs.app rc3, then spent some time running them side-by-side under GDB (using Terminal.app, of course! ;) It seems that between Emacs 23.0.0 (on which Emacs.app rc1 is based) and Emacs 23.0.60 (Emacs.app rc3), initialization function 'make_terminal_frame' got split into two functions: 'make_initial_frame' and 'make_terminal_frame'. Both versions of 'make_terminal_frame' end with a possible call to 'init_frame_faces', which fills in the face_struct for the initial terminal's frame. But in Emacs 23.0.60, 'make_terminal_frame' isn't called -- only 'make_initial_frame' is -- by 'init_window_once' prior to entering 'recursive_edit'. Then after Emacs enters 'recursive_edit', 'loadup.el' loads 'cus-faces.el', which contains 'custom-declare-faces', which calls 'face-spec-set', which calls 'face-spec-choose', which calls 'face-spec-set-match-display' which calls 'display-supports-face-attributes-p' which in turn tries to access a member of the 'face_cache' struct. I could very easily be mistaken, but on CANNOT_DUMP platforms it looks like these forms might actually be evaluated while loading, and thus the seg fault, since 'make_terminal_frame' and thus 'init_frame_faces' haven't yet been called so 'face_cache' isn't initialized when 'display-supports-face-attributes-p' is evaluated. HTH, Chris Hall