From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#11541: 24.0.97; Crash when visiting file on OS X 10.7.3 Date: Thu, 31 May 2012 20:54:49 +0300 Message-ID: <83fwag1biu.fsf@gnu.org> References: <4fbb6a82.d491cc0a.42d6.3965@mx.google.com> <878vgbozcz.fsf@gnu.org> <877gvu9wun.fsf@gnu.org> <874nqyyn83.fsf@gnu.org> <87d35lyen5.fsf@gnu.org> <87d35kj10j.fsf@gnu.org> <87txywofx7.fsf@gnu.org> <83hauw1hcs.fsf@gnu.org> <16181D4F-4289-47B2-AF61-FCBD189AF4B0@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1338487000 22632 80.91.229.3 (31 May 2012 17:56:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 31 May 2012 17:56:40 +0000 (UTC) Cc: 11541@debbugs.gnu.org, cyd@gnu.org To: "C. Florian Ebeling" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu May 31 19:56:36 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 1Sa9br-0002LK-S6 for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 May 2012 19:56:32 +0200 Original-Received: from localhost ([::1]:56466 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sa9br-00015D-Kh for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 May 2012 13:56:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sa9bp-00014o-46 for bug-gnu-emacs@gnu.org; Thu, 31 May 2012 13:56:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sa9bn-0002fx-8v for bug-gnu-emacs@gnu.org; Thu, 31 May 2012 13:56:28 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sa9bn-0002fp-5I for bug-gnu-emacs@gnu.org; Thu, 31 May 2012 13:56:27 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Sa9dJ-0007aH-ON for bug-gnu-emacs@gnu.org; Thu, 31 May 2012 13:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 31 May 2012 17:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11541 X-GNU-PR-Package: emacs,ns X-GNU-PR-Keywords: Original-Received: via spool by 11541-submit@debbugs.gnu.org id=B11541.133848703929101 (code B ref 11541); Thu, 31 May 2012 17:58:01 +0000 Original-Received: (at 11541) by debbugs.gnu.org; 31 May 2012 17:57:19 +0000 Original-Received: from localhost ([127.0.0.1]:52162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sa9cd-0007ZJ-A3 for submit@debbugs.gnu.org; Thu, 31 May 2012 13:57:19 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:61339) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sa9cH-0007YU-Qi for 11541@debbugs.gnu.org; Thu, 31 May 2012 13:57:17 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0M4W00D00F093900@a-mtaout22.012.net.il> for 11541@debbugs.gnu.org; Thu, 31 May 2012 20:54:37 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.210.75]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M4W00CYCF31LS90@a-mtaout22.012.net.il>; Thu, 31 May 2012 20:54:37 +0300 (IDT) In-reply-to: <16181D4F-4289-47B2-AF61-FCBD189AF4B0@gmail.com> X-012-Sender: halo1@inter.net.il 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:60569 Archived-At: > From: "C. Florian Ebeling" > Date: Thu, 31 May 2012 19:27:13 +0200 > Cc: Chong Yidong , > 11541@debbugs.gnu.org > > > This might be a slower way to find the culprit, but I think it is a > > lot more sure to give good results. > > This is what a healthy and the crashing call produce with font_spec and fdesc being printed: > > Breakpoint 2, ns_findfonts (font_spec=4338015181, isMatch=0 '\000') at nsfont.m:496 > 496 Lisp_Object tem, list = Qnil; > # > > Breakpoint 3, ns_findfonts (font_spec=4338015181, isMatch=0 '\000') at nsfont.m:529 > 529 if (!FONT_SPEC_P (font_spec)) > # > > Breakpoint 2, ns_findfonts (font_spec=4338015181, isMatch=0 '\000') at nsfont.m:496 > 496 Lisp_Object tem, list = Qnil; > # > > Breakpoint 3, ns_findfonts (font_spec=4338015181, isMatch=0 '\000') at nsfont.m:529 > 529 if (!FONT_SPEC_P (font_spec)) > # > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000 > 0x00007fff8966d3c2 in CFStringGetLength () > > (gdb) i b > Num Type Disp Enb Address What > --- snip --- > 2 breakpoint keep y 0x00000001001a0fb5 in ns_findfonts at nsfont.m:496 > breakpoint already hit 7 times > pp font_spec > continue > 3 breakpoint keep y 0x00000001001a11ca in ns_findfonts at nsfont.m:529 > breakpoint already hit 7 times > pp font_spec > continue > > I can't really tell which font_spec is acceptable, and which not, though. > > The crashing one has a third element of nil, is that ok or not? I have no idea. Assuming I understand the data you presented, one font (Monaco) is OK, but another (apple) is not? That still makes no sense to me. That's why I suggested to actually _step_ through the code of ns_findfonts, one line at a time, including stepping into any functions it calls whose source is part of Emacs, looking for possible culprits, like NULL pointers, garbled pointers, uninitialized variables, blown-up stack, etc. Just showing a few breakpoint hits won't cut it, as it didn't until now, if my experience in debugging tricky problems means anything. Like I said: it might be slower, but in the end it will surely deliver. TIA