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) (fwd) Date: Tue, 05 Feb 2008 12:40:29 -1000 Message-ID: <4a39c8a7539441c8cd0153bc2ae0a019@lagorda> 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 1202250973 16410 80.91.229.12 (5 Feb 2008 22:36:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Feb 2008 22:36:13 +0000 (UTC) To: Emacs bugs Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 05 23:36:34 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 1JMWP4-0006Q8-Cn for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Feb 2008 23:36:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JMWOb-00081w-UZ for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Feb 2008 17:36:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JMWOW-00081j-VV for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2008 17:36:00 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JMWOV-00081X-PX for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2008 17:36:00 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JMWOV-00081U-LH for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2008 17:35:59 -0500 Original-Received: from out3.smtp.messagingengine.com ([66.111.4.27]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JMWOV-0004zS-Ag for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2008 17:35:59 -0500 Original-Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 8D4238FB23 for ; Tue, 5 Feb 2008 17:35:58 -0500 (EST) Original-Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 05 Feb 2008 17:35:58 -0500 X-Sasl-enc: 4r98Z5VgzSjhPBcmMWl1gXKFVI4FbNRb/Fv9yy6CtDC3 1202250958 Original-Received: from localhost.localdomain (75-95-220-61.hon.clearwire-dns.net [75.95.220.61]) by mail.messagingengine.com (Postfix) with ESMTP id 293DEBB89 for ; Tue, 5 Feb 2008 17:35:58 -0500 (EST) Original-Received: from localhost ([127.0.0.1] helo=localhost.localdomain ident=cjh) by localhost.localdomain with esmtp (Exim 4.50) id 1JMWSr-0001Fu-FH for bug-gnu-emacs@gnu.org; Tue, 05 Feb 2008 12:40:29 -1000 User-Agent: GNUMail (Version 1.2.0) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:17482 Archived-At: I think I mis-posted this yesterday. ---------- Forwarded message ---------- Date: 2008-02-05 01:07:49 -1000 From: Chris Hall Subject: Re: 23.0.60; Seg fault in xfaces.c at line 6703 (Emacs.app on GNUstep) 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