From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.bugs Subject: bug#34256: 27.0.50; Crash on draw_glyphs() Date: Mon, 4 Feb 2019 11:03:37 -0500 Message-ID: References: <83pnse15pb.fsf@gnu.org> <83k1im142z.fsf@gnu.org> <83bm3y0ycm.fsf@gnu.org> <834l9o2acz.fsf@gnu.org> <83lg30zs5d.fsf@gnu.org> <83ef8szi8i.fsf@gnu.org> <834l9nzys6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000dccfa6058113a48c" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="77157"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34256@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 04 17:09:56 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gqgok-000JvC-Vg for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Feb 2019 17:09:55 +0100 Original-Received: from localhost ([127.0.0.1]:45168 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqgoj-0005I0-TB for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Feb 2019 11:09:53 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqgkC-0002X0-6G for bug-gnu-emacs@gnu.org; Mon, 04 Feb 2019 11:05:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqgk3-0008HZ-Oy for bug-gnu-emacs@gnu.org; Mon, 04 Feb 2019 11:05:10 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60348) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gqgk2-0008GH-5B for bug-gnu-emacs@gnu.org; Mon, 04 Feb 2019 11:05:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gqgk1-0003NB-RQ for bug-gnu-emacs@gnu.org; Mon, 04 Feb 2019 11:05:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Kaushal Modi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Feb 2019 16:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34256 X-GNU-PR-Package: emacs Original-Received: via spool by 34256-submit@debbugs.gnu.org id=B34256.154929626212894 (code B ref 34256); Mon, 04 Feb 2019 16:05:01 +0000 Original-Received: (at 34256) by debbugs.gnu.org; 4 Feb 2019 16:04:22 +0000 Original-Received: from localhost ([127.0.0.1]:59629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqgjO-0003Ls-4l for submit@debbugs.gnu.org; Mon, 04 Feb 2019 11:04:22 -0500 Original-Received: from mail-lf1-f41.google.com ([209.85.167.41]:45060) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqgjM-0003Le-Pr for 34256@debbugs.gnu.org; Mon, 04 Feb 2019 11:04:21 -0500 Original-Received: by mail-lf1-f41.google.com with SMTP id b20so254118lfa.12 for <34256@debbugs.gnu.org>; Mon, 04 Feb 2019 08:04:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=23TI+XThBTCMVo5SqE4QgJSyowlC1qPAgJnQ4KezElc=; b=oFZYVZIZ9D0LjygDUV42LJx7eLTEheEExxjxgByTl4KBwUQoWlCKX2ItO0ij6tK/bR eB0bQw7Cbd4OWtUFfcQnzoe9kLCCJjdTgT/stiN3ACjz0Moo8oa6SvD3WZsPEWXtZmAg 1aj3IKW5evU1yfgTI7vw1i4gkeNVrinEKg0t532djps2On+sOgGaiESzbByQMj77eQ8u 1Ssz4s+L+GyvhQx/MesC3bZXbGwXNw64MgZykUfEE/qr5g1+a2rwGg+tAp7vR76yzRer dm+2AP2CSdd/WBO3UJMtxA56ykoRvarEU2VtL2rkNcP1bcB1X5MstjFtGKowhXK6ao3N OJgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=23TI+XThBTCMVo5SqE4QgJSyowlC1qPAgJnQ4KezElc=; b=l9QFPzLrE9ZErVt97ufTTiT24PQxMWLJnquYrVUK9bF1aIZGtYqafkAh7PC9o+/Ny3 hNuPGuiw6XO9Pnpysh9Cn7iCLXZ84Hp6BaicKp2TLRg0lJzy3jSmTj80Jsv1/Hb2sjYP D2RjDy1ZpScHFrSN6OOEm1uQ+PnCO5Ip9hyAHIh1Azx0Iq3Jwo0+BQuF5lFy5MzeSyKG Rw9RBq8KlyNI/xs+IKTBIdlJ6LJUO7I/R8Z2BnqXFz504rmee8g8Ln1Wo++w5rVAefu1 WlmPZTex9W6cumMpYKthtTg9Y2JprGwmOxHoP4RwnpNDIsHIrBvdWs+bfCgKLk5KeUJO NT5Q== X-Gm-Message-State: AHQUAubFAZZX8N6fP/hS8696RDRHQh4hvLmTgJaM8WWDff8ExXNV2N3v DeQz1NzCLcnX4PCJKjJnw5vO1/S6ceWv8/aRuAI= X-Google-Smtp-Source: AHgI3IayA7vOR5Y9iOKrpdNWOKL/wgCCNZ4g06n0V4J3eWChgsOVyg1rB9QNCceeRsbhZ/DPhDr7sZzP2Wp/fk6ObgE= X-Received: by 2002:ac2:5087:: with SMTP id f7mr64706lfm.100.1549296253847; Mon, 04 Feb 2019 08:04:13 -0800 (PST) In-Reply-To: <834l9nzys6.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:155081 Archived-At: --000000000000dccfa6058113a48c Content-Type: text/plain; charset="UTF-8" Hi Eli, On Fri, Feb 1, 2019 at 3:41 AM Eli Zaretskii wrote: > > "redisplay_internal (C function)" (0x0) > > Thanks, I think I understand what happened here. Does the patch below > fix the problem? If it doesn't, please repeat the procedure with the > patched Emacs. > > diff --git a/src/frame.h b/src/frame.h > index ab3efdf..e0dab51 100644 > --- a/src/frame.h > +++ b/src/frame.h > @@ -413,6 +413,10 @@ struct frame > /* Non-zero if this frame's faces need to be recomputed. */ > bool_bf face_change : 1; > > + /* Non-zero if this frame's image cache cannot be freed because the > + frame is in the process of being redisplayed. */ > + bool_bf inhibit_clear_image_cache : 1; > + > /* Bitfield area ends here. */ > > /* This frame's change stamp, set the last time window change > diff --git a/src/image.c b/src/image.c > index 2014860..342b647 100644 > --- a/src/image.c > +++ b/src/image.c > @@ -1554,7 +1554,7 @@ clear_image_cache (struct frame *f, Lisp_Object > filter) > { > struct image_cache *c = FRAME_IMAGE_CACHE (f); > > - if (c) > + if (c && !f->inhibit_clear_image_cache) > { > ptrdiff_t i, nfreed = 0; > > diff --git a/src/xdisp.c b/src/xdisp.c > index ec8dd86..b43777a 100644 > --- a/src/xdisp.c > +++ b/src/xdisp.c > @@ -14440,7 +14440,17 @@ redisplay_internal (void) > FRAME_TERMINAL (f)->condemn_scroll_bars_hook (f); > > if (FRAME_VISIBLE_P (f) && !FRAME_OBSCURED_P (f)) > - redisplay_windows (FRAME_ROOT_WINDOW (f)); > + { Thanks for the patch! I couldn't apply the patch, so had to apply it manually. But it works! I am looking forward to understand in plain terms what this fix did. Thank you. --000000000000dccfa6058113a48c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Eli,

On Fri, Feb 1, 2019 at 3:41 AM Eli Zaretskii <eliz@gnu.org> wrote:
> &qu= ot;redisplay_internal (C function)" (0x0)

Thanks, I think I understand what happened here.=C2=A0 Does the patch below=
fix the problem?=C2=A0 If it doesn't, please repeat the procedure with = the
patched Emacs.

diff --git a/src/frame.h b/src/frame.h
index ab3efdf..e0dab51 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -413,6 +413,10 @@ struct frame
=C2=A0 =C2=A0/* Non-zero if this frame's faces need to be recomputed.= =C2=A0 */
=C2=A0 =C2=A0bool_bf face_change : 1;

+=C2=A0 /* Non-zero if this frame's image cache cannot be freed because= the
+=C2=A0 =C2=A0 =C2=A0frame is in the process of being redisplayed.=C2=A0 */=
+=C2=A0 bool_bf inhibit_clear_image_cache : 1;
+
=C2=A0 =C2=A0/* Bitfield area ends here.=C2=A0 */

=C2=A0 =C2=A0/* This frame's change stamp, set the last time window cha= nge
diff --git a/src/image.c b/src/image.c
index 2014860..342b647 100644
--- a/src/image.c
+++ b/src/image.c
@@ -1554,7 +1554,7 @@ clear_image_cache (struct frame *f, Lisp_Object filte= r)
=C2=A0{
=C2=A0 =C2=A0struct image_cache *c =3D FRAME_IMAGE_CACHE (f);

-=C2=A0 if (c)
+=C2=A0 if (c && !f->inhibit_clear_image_cache)
=C2=A0 =C2=A0 =C2=A0{
=C2=A0 =C2=A0 =C2=A0 =C2=A0ptrdiff_t i, nfreed =3D 0;

diff --git a/src/xdisp.c b/src/xdisp.c
index ec8dd86..b43777a 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -14440,7 +14440,17 @@ redisplay_internal (void)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 FRAME_TERMINAL (f)-= >condemn_scroll_bars_hook (f);

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (FRAME_VISIBLE_P (f) &a= mp;& !FRAME_OBSCURED_P (f))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0redisplay_windows (= FRAME_ROOT_WINDOW (f));
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{
=
Thanks for the patch!

I couldn't apply th= e patch, so had to apply it manually.

But it works!

I am looking forward to understand in plain terms wha= t this fix did.


Thank you.
--000000000000dccfa6058113a48c--