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#17753: Cygwin emacs-X11 core dump Date: Thu, 09 Oct 2014 14:55:18 +0300 Message-ID: <837g09ihjt.fsf@gnu.org> References: " <21431.6898.745604.392984@wombat.mininet>" <53B805C7.8030209@cornell.edu> <21435.4511.658539.666411@wombat.mininet> <53BD4A64.8000003@cornell.edu> <457212308be445a70279d3ece6e28207@mhoenicka.de> <993b66d09d7bfc46fc7433de63fde3be@mhoenicka.de> <83sijq362c.fsf@gnu.org> <5419A604.8060201@cornell.edu> <83fvfq2n40.fsf@gnu.org> <5433FF2D.3020600@cornell.edu> <83vbnvly2l.fsf@gnu.org> <02f02d94fb60ba0b677caf6939534c5e@mhoenicka.de> <83lhorlskg.fsf@gnu.org> <83iojtipuc.fsf@gnu.org> <83eguhil89.fsf@gnu.org> <83bnplij2w.fsf@gnu.org> <295e34582a7c09b3453833837f084e1d@mhoenicka.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1412855788 17170 80.91.229.3 (9 Oct 2014 11:56:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Oct 2014 11:56:28 +0000 (UTC) Cc: 17753@debbugs.gnu.org To: Markus Hoenicka Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 09 13:56:22 2014 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 1XcCKS-0004UR-3u for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Oct 2014 13:56:20 +0200 Original-Received: from localhost ([::1]:42022 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcCKQ-00027S-ED for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Oct 2014 07:56:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcCKJ-00026y-3n for bug-gnu-emacs@gnu.org; Thu, 09 Oct 2014 07:56:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XcCKA-0007vZ-IQ for bug-gnu-emacs@gnu.org; Thu, 09 Oct 2014 07:56:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcCKA-0007vN-Fc for bug-gnu-emacs@gnu.org; Thu, 09 Oct 2014 07:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XcCK9-0004fE-Vd for bug-gnu-emacs@gnu.org; Thu, 09 Oct 2014 07:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Oct 2014 11:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17753 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 17753-submit@debbugs.gnu.org id=B17753.141285570817852 (code B ref 17753); Thu, 09 Oct 2014 11:56:01 +0000 Original-Received: (at 17753) by debbugs.gnu.org; 9 Oct 2014 11:55:08 +0000 Original-Received: from localhost ([127.0.0.1]:38596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcCJH-0004dq-F6 for submit@debbugs.gnu.org; Thu, 09 Oct 2014 07:55:07 -0400 Original-Received: from mtaout27.012.net.il ([80.179.55.183]:56708) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcCJE-0004df-2t for 17753@debbugs.gnu.org; Thu, 09 Oct 2014 07:55:05 -0400 Original-Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0ND600F00D9R3X00@mtaout27.012.net.il> for 17753@debbugs.gnu.org; Thu, 09 Oct 2014 14:49:45 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0ND6009CCE6XNW80@mtaout27.012.net.il>; Thu, 09 Oct 2014 14:49:45 +0300 (IDT) In-reply-to: <295e34582a7c09b3453833837f084e1d@mhoenicka.de> 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: 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:94333 > Date: Thu, 09 Oct 2014 13:47:34 +0200 > From: Markus Hoenicka > Cc: kbrown@cornell.edu, 17753@debbugs.gnu.org > > Am 2014-10-09 13:22, schrieb Eli Zaretskii: > >> Date: Thu, 09 Oct 2014 12:44:44 +0200 > >> From: Markus Hoenicka > >> Cc: kbrown@cornell.edu, 17753@debbugs.gnu.org > >> > >> (gdb) print (it->f)->face_cache->used > >> $4 = 31 > > > > ??? That's unexpected. What about this one: > > > > (gdb) print (it->f)->face_cache->faces_by_id[it->face_id] > > > > (The above is the expansion of the call to the FACE_FROM_ID macro, > > which, judging by your backtrace, yielded a NULL pointer.) > > This one yields: > > (gdb) print (it->f)->face_cache->faces_by_id[it->face_id] > $5 = (struct face *) 0x60128bad0 So maybe this crash _is_ for the same reason that caused the other crashes in this bug report. Observe what the relevant portion of get_next_display_element (the function in frame #1 of your backtrace) does: if ((it->what == IT_CHARACTER || it->what == IT_COMPOSITION) && it->multibyte_p && success_p && FRAME_WINDOW_P (it->f)) { struct face *face = FACE_FROM_ID (it->f, it->face_id); if (it->what == IT_COMPOSITION && it->cmp_it.ch >= 0) { /* Automatic composition with glyph-string. */ Lisp_Object gstring = composition_gstring_from_id (it->cmp_it.id); it->face_id = face_for_font (it->f, LGSTRING_FONT (gstring), face); } else { ptrdiff_t pos = (it->s ? -1 : STRINGP (it->string) ? IT_STRING_CHARPOS (*it) : IT_CHARPOS (*it)); int c; if (it->what == IT_CHARACTER) c = it->char_to_display; else { struct composition *cmp = composition_table[it->cmp_it.id]; int i; c = ' '; for (i = 0; i < cmp->glyph_len; i++) /* TAB in a composition means display glyphs with padding space on the left or right. */ if ((c = COMPOSITION_GLYPH (cmp, i)) != '\t') break; } it->face_id = FACE_FOR_CHAR (it->f, face, c, pos, it->string); The last line is the one that called face_for_char with the 'face' argument a NULL pointer. But the value of 'face' was computed by this line: struct face *face = FACE_FROM_ID (it->f, it->face_id); which, if you repeat it in GDB, yields a non-NULL pointer. So how could it become a NULL pointer when the code was executed?? Am I missing something here?