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#21428: 24.5; Crash of emacs on OS X, installed via homebrew cask Date: Fri, 25 Sep 2015 17:39:43 +0300 Message-ID: <8337y2imvk.fsf@gnu.org> References: <83zj0gm3yu.fsf@gnu.org> <83y4g0m0js.fsf@gnu.org> <83wpvjnc5m.fsf@gnu.org> <83twqnnbdz.fsf@gnu.org> <837fnhlb3v.fsf@gnu.org> <83y4fvixvx.fsf@gnu.org> <83pp17ismu.fsf@gnu.org> <83lhbvir5b.fsf@gnu.org> <838u7uizqs.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1443192104 28328 80.91.229.3 (25 Sep 2015 14:41:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Sep 2015 14:41:44 +0000 (UTC) Cc: 21428@debbugs.gnu.org, mituharu+bug-gnu-emacs-mac@math.s.chiba-u.ac.jp To: Rainer M Krug Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 25 16:41:24 2015 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 1ZfUBa-0001D2-7D for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Sep 2015 16:41:18 +0200 Original-Received: from localhost ([::1]:44042 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfUBZ-0007ug-MM for geb-bug-gnu-emacs@m.gmane.org; Fri, 25 Sep 2015 10:41:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfUAQ-0006M9-Ic for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 10:40:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfUAM-0000pA-G7 for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 10:40:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54221) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfUAM-0000oX-5b for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 10:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZfUAL-000647-Ph for bug-gnu-emacs@gnu.org; Fri, 25 Sep 2015 10:40:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Sep 2015 14:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21428 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 21428-submit@debbugs.gnu.org id=B21428.144319198423287 (code B ref 21428); Fri, 25 Sep 2015 14:40:01 +0000 Original-Received: (at 21428) by debbugs.gnu.org; 25 Sep 2015 14:39:44 +0000 Original-Received: from localhost ([127.0.0.1]:43192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZfUA3-00063W-W8 for submit@debbugs.gnu.org; Fri, 25 Sep 2015 10:39:44 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:52454) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZfUA1-00063M-Lo for 21428@debbugs.gnu.org; Fri, 25 Sep 2015 10:39:43 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NV800A00LM6CB00@a-mtaout21.012.net.il> for 21428@debbugs.gnu.org; Fri, 25 Sep 2015 17:39:39 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NV800A8IM239D90@a-mtaout21.012.net.il>; Fri, 25 Sep 2015 17:39:39 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il 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: 208.118.235.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:106909 Archived-At: > From: Rainer M Krug > Cc: 21428@debbugs.gnu.org, mituharu+bug-gnu-emacs-mac@math.s.chiba-u.ac.jp > Date: Fri, 25 Sep 2015 14:30:05 +0200 > > ,---- > | xdisp.c:24333: Emacs fatal error: assertion failed: face != NULL > | > | Breakpoint 1, terminate_due_to_signal (sig=6, backtrace_limit=2147483647) at emacs.c:370 > | 370 signal (sig, SIG_DFL); > | (gdb) bt > | #0 terminate_due_to_signal (sig=6, backtrace_limit=2147483647) at emacs.c:370 > | #1 0x00000001002256eb in die (msg=0x1003b680a "face != NULL", file=0x1003b24f0 "xdisp.c", line=24333) at alloc.c:6951 > | #2 0x0000000100062f17 in get_glyph_face_and_encoding (f=0x103811830, glyph=0x103c4b060, char2b=0x7fff5fbfb310) at xdisp.c:24333 > | #3 0x00000001000b581d in fill_glyph_string (s=0x7fff5fbfb360, face_id=50, start=34, end=71, overlaps=0) at xdisp.c:24558 OK, I think I've seen enough of these for now, thanks. It seems like a face is removed from the frame's face cache, but Emacs still thinks the face is cached and tries to use its (stale) cache slot. The face is different each time, and there's nothing problematic with the face itself. I took a look at the code, and couldn't find any obvious way this could happen. I need some way to narrow down the search. So I need to ask you to try a few things, okay? First, I'd like to know whether the line of code marked below is ever executed: static void uncache_face (struct face_cache *c, struct face *face) { int i = face->hash % FACE_CACHE_BUCKETS_SIZE; if (face->prev) face->prev->next = face->next; else c->buckets[i] = face->next; if (face->next) face->next->prev = face->prev; c->faces_by_id[face->id] = NULL; if (face->id == c->used) --c->used; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< } This is from xfaces.c, line 4322 with the current Git master. Please put a breakpoint there, and run Emacs under GDB until it crashes as before, or until this breakpoint breaks. If it breaks, please show the backtrace. If this breakpoint never breaks before another crash, please reconfigure Emacs like this: CFLAGS="-ggdb3 -O0" CXXFLAGS="-ggdb3 -O0" LDFLAGS="-ggdb3" ./configure --enable-checking='yes,glyphs' then rebuild, and run it after setting these three variables to t: inhibit-try-cursor-movement inhibit-try-window-id inhibit-try-window-reusing This disables some redisplay optimizations, so you might see slow redisplay; this is normal. What is important is to see whether the crashes disappear when these variables are set to non-nil values. If you run for a long time without crashes, then set these variables to nil, one by one, in the order they are shown above, and each time let Emacs run enough time for you to be sure the problem doesn't happen, before you proceed to the next variable. I hope these two procedures will collect data that will help me zero in on the problematic code. Thanks.