From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#42943: 28.0.50; Emacsclient crashes in ftcrfont_glyph_extents Date: Sat, 24 Oct 2020 17:12:04 +0300 Message-ID: <83h7qjhfwr.fsf@gnu.org> References: <877dtuta6z.fsf@tcd.ie> <87y2m82ix4.fsf@gnus.org> <87zh4emnzm.fsf@gnus.org> <87lffxlxm5.fsf@tcd.ie> <83lffvhmne.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32966"; mail-complaints-to="usenet@ciao.gmane.io" Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 24 16:13:22 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kWKIM-0008TT-6Q for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Oct 2020 16:13:22 +0200 Original-Received: from localhost ([::1]:52868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWKIL-0008W3-97 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Oct 2020 10:13:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kWKI5-0008Uy-98 for bug-gnu-emacs@gnu.org; Sat, 24 Oct 2020 10:13:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50914) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kWKI2-0002MX-Ab for bug-gnu-emacs@gnu.org; Sat, 24 Oct 2020 10:13:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kWKI2-0000K5-3q for bug-gnu-emacs@gnu.org; Sat, 24 Oct 2020 10:13: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: Sat, 24 Oct 2020 14:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42943 X-GNU-PR-Package: emacs Original-Received: via spool by 42943-submit@debbugs.gnu.org id=B42943.16035487461191 (code B ref 42943); Sat, 24 Oct 2020 14:13:02 +0000 Original-Received: (at 42943) by debbugs.gnu.org; 24 Oct 2020 14:12:26 +0000 Original-Received: from localhost ([127.0.0.1]:34227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWKHR-0000J9-Vl for submit@debbugs.gnu.org; Sat, 24 Oct 2020 10:12:26 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kWKHQ-0000Iw-8t for 42943@debbugs.gnu.org; Sat, 24 Oct 2020 10:12:25 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47118) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kWKHK-0002JO-6M; Sat, 24 Oct 2020 10:12:18 -0400 Original-Received: from [176.228.60.248] (port=4098 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kWKHJ-0007Mk-BV; Sat, 24 Oct 2020 10:12:17 -0400 In-Reply-To: (message from Robert Pluim on Sat, 24 Oct 2020 15:27:39 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:191427 Archived-At: > From: Robert Pluim > Cc: contovob@tcd.ie, larsi@gnus.org, 42943@debbugs.gnu.org > Date: Sat, 24 Oct 2020 15:27:39 +0200 > > static int > fill_gstring_glyph_string (struct glyph_string *s, int face_id, > int start, int end, int overlaps) > { > struct glyph *glyph, *last; > Lisp_Object lgstring; > int i; > bool glyph_not_available_p; > > s->for_overlaps = overlaps; > glyph = s->row->glyphs[s->area] + start; > last = s->row->glyphs[s->area] + end; > glyph_not_available_p = glyph->glyph_not_available_p; > s->cmp_id = glyph->u.cmp.id; > s->cmp_from = glyph->slice.cmp.from; > s->cmp_to = glyph->slice.cmp.to + 1; > s->face = FACE_FROM_ID (s->f, face_id); > lgstring = composition_gstring_from_id (s->cmp_id); > s->font = XFONT_OBJECT (LGSTRING_FONT (lgstring)); <---- > > so itʼs the caching in the Lisp_Object for the composition thatʼs > causing the problem. OK, so when we are about to release a font, we need to go over all the LGSTRING objects in gstring_hash_table, and remove from that cache every LGSTRING whose LGSTRING_FONT object holds the font we are about to release.