From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Will Bush Newsgroups: gmane.emacs.bugs Subject: bug#40733: 28.0.50; Emacs locks up on paste (yank) of unicode characters Date: Sat, 25 Apr 2020 05:34:23 -0500 Message-ID: References: <87mu756aen.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000002bc2d205a41b0776" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="101961"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "Basil L. Contovounesios" , 40733@debbugs.gnu.org, James Cloos To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 25 12:35:13 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 1jSI9Q-000QOC-Re for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Apr 2020 12:35:12 +0200 Original-Received: from localhost ([::1]:34272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSI9P-0007vV-F1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Apr 2020 06:35:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36958) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jSI9H-0007vO-VE for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2020 06:35:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jSI9H-0002WU-1t for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2020 06:35:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47057) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jSI9G-0002WP-LH for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2020 06:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jSI9G-00005g-IQ for bug-gnu-emacs@gnu.org; Sat, 25 Apr 2020 06:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Will Bush Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Apr 2020 10:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40733 X-GNU-PR-Package: emacs Original-Received: via spool by 40733-submit@debbugs.gnu.org id=B40733.158781088432767 (code B ref 40733); Sat, 25 Apr 2020 10:35:02 +0000 Original-Received: (at 40733) by debbugs.gnu.org; 25 Apr 2020 10:34:44 +0000 Original-Received: from localhost ([127.0.0.1]:58601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSI8y-0008WL-2f for submit@debbugs.gnu.org; Sat, 25 Apr 2020 06:34:44 -0400 Original-Received: from mail-lf1-f43.google.com ([209.85.167.43]:39686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jSI8v-0008Vz-0p for 40733@debbugs.gnu.org; Sat, 25 Apr 2020 06:34:42 -0400 Original-Received: by mail-lf1-f43.google.com with SMTP id m2so9801527lfo.6 for <40733@debbugs.gnu.org>; Sat, 25 Apr 2020 03:34:40 -0700 (PDT) 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=No38axUmpdmA/kLu0bMy06zePjDvBBXgzhUvZycNw/8=; b=GH2D4ArFIGsAjdkSrcXARXdiDZH+1MCrrkD8pkQ//tDZNXV4YRL816ovw63URpyu1n Wxsg/tXbXu6wq+zcoJnt+JVsOWq/5+OGOtFPo2bx55h/xOS4cbADffsnGtn8R8Mxyz6w mToV1vt6VSC49hsPx78JL/Exl84U4HW9PeHNSfVM8uDFOZpJsT3CbMYfyM0NtKykoc5G vnvQ/yiocweaHc8dY//KVSyq8b7gwB9PI0fZHfpEkxfA81OxfNAwq4Tfuo9NoaEeg5kN nGLgSC/ZhE/eH5zYi5kjszWDp4f4AdfsTzEVX37fAUTyXC+7V5+gZojBgygCxGuwaDz5 Ie/g== 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=No38axUmpdmA/kLu0bMy06zePjDvBBXgzhUvZycNw/8=; b=K3TpYoMtZGfo86HnEP/Axbgg7eMm7SBduZIB53gsbkzX+TykWEtP8wt03WUNoOxL3v zUQ1HBYJfzcqGmx7FRIYYR8rIFtosWGwJ5/MxkmGhgiiwJiQOQg05hbB9gLRrYx4f+S7 2J2VH7vClGXgFbiOaCwwgQAWajr5DSlXrcb3TKq3tIGUZVr7KKqUgDvCy+69UznScsHd dkfC/bBOtu0oGsk6c5OmBxXThtNffOuQIdcBALZBghe9oDq/pfx++g7mHLpw6Ur2gtax K/TtmAt1zw3u8fqCFB7ddoaLgQow23wAgQfm3mGZc8ZQKrZTt5xw4AxWw9kdFcRhIU0H wR9g== X-Gm-Message-State: AGi0Pub8Xy4jCgx2Ey9tPqzMptIIkekcXUjP8qlQBnM3bORHFuADKVEo JwVr4yTtPII9RDjD2t+nTBQhbhVeq/yTsVAi9dY= X-Google-Smtp-Source: APiQypJ0YqM3fRPBTrRyVaR5v4XSuMpobxZRHvp5gM2dUIoOoFBV6o3qkd7etK8XLaNqfEjcwGOkczyAl614R2pf9Ow= X-Received: by 2002:a19:f614:: with SMTP id x20mr9252302lfe.84.1587810874932; Sat, 25 Apr 2020 03:34:34 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:178981 Archived-At: --0000000000002bc2d205a41b0776 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Robert> Which font specifically does emacs end up using for that character? Robert> Emacs ends up using 'Noto Sans CJK KR' for me here. When google fonts is removed? This is what `C-u C-x =3D` says: ftcrhb:-PfEd-Unifont-normal-normal-normal-*-15-*-*-*-d-0-iso10646-1 (#xDD38ftcrhb:-PfEd-Unifont-normal-normal-normal-*-15-*-*-*-d-0-iso10646-1 (#xDD38) Note on the above: For the hell of it, I tried installing `noto-fonts` font pack from nixpkgs and it didn't make a difference. Then again, `fc-list --verbose | rg "Noto Sans CJK" -i` produced no results so that specific font probably isn't in that font pack. When google fonts are installed: ftcrhb:-GNU-Unifont-normal-normal-normal-Sans-Serif-16-*-*-*-c-80-iso10646-= 1 (#xDD36) Robert> BTW, if you want to ignore that font, you can set Robert> 'face-ignored-fonts' to match it, and you won't have to uninstall it. Thanks, I didn't know that! Maybe I can use that to narrow down to the specific font that's causing problems because adding `google-fonts` adds 2905 fonts for me, and many I would like to have. Robert> I don=CA=BCt think there=CA=BCs much point in that: emacs-26 uses X= ft for font Robert> handling, emacs-27 uses Cairo+Harfbuzz[1]; they=CA=BCre fundamental= ly doing Robert> very different things, so I don=CA=BCt think this is caused by a si= ngle Robert> identifiable change. I'm not trying to prove you wrong or anything. It's just easy for me to try different versions because I'm using (https://github.com/nix-community/emacs-overlay). However, I tried Emacs 27.0.50 and it's behaving exactly the same as Emacs 26. I glanced at the `report-emacs-bug` output and the build inputs look the same. I can include it if desired. =CE=BB ~/ time emacs -Q --eval '(message "hi")' -kill emacs -Q --eval '(message "hi")' -kill 0.18s user 0.02s system 67% cpu 0.303 total =CE=BB ~/ time emacs -Q --eval '(message "=EF=B8=B5")' -kill emacs -Q --eval '(message "=EF=B8=B5")' -kill 0.44s user 0.03s system 95% = cpu 0.494 total =CE=BB ~/ emacs --version GNU Emacs 27.0.50 Robert> ...we implicitly do '--with-cairo' now. Is that since 27.0.50? Were either Cairo+Harfbuzz libraries updated since 27.0.50 (perhaps a regression in those libraries)? I'll follow up with an update later after testing more versions. Robert> Although you can still build it with Xft if you want, but I Robert> wouldn=CA=BCt recommend that, since it will crash once you start Robert> processing Emojis and other 'interesting' Unicode characters. Just to verity I understand. Building with Xft is what `--with-xft` is doing in the following from my initial email? Configured using: 'configure --prefix=3D/nix/store/5v0fp6vikajaqc2v0ppkm51hfc054mnm-emacs-git-20190910.= 0 --disable-build-details --with-modules --with-x-toolkit=3Dgtk3 --with-xft CFLAGS=3D-DMAC_OS_X_VERSION_MAX_ALLOWED=3D101200' Eli> I'm not sure I understand: you are saying that slow, but correct Eli> display is _worse_ than displaying a white space instead of the Eli> correct glyph, i.e. producing incorrect display? To me, it sounds Eli> like Emacs 27+ actually _improves_ things in this case. Let me quantify the performance because I've been ambiguous about it so far= : =CE=BB ~/ time emacs -Q --eval '(message "hi")' -kill emacs -Q --eval '(message "hi")' -kill 0.19s user 0.02s system 55% cpu 0.371 total =CE=BB ~/ time emacs -Q --eval '(message "=EF=B8=B5")' -kill emacs -Q --eval '(message "=EF=B8=B5")' -kill 81.64s user 0.03s system 99%= cpu 1:21.91 total It takes ~81 seconds to do something while locking up the UI. That's personally beyond my threshold for killing the process. On Wed, Apr 22, 2020 at 2:35 AM Robert Pluim wrote: > >>>>> On Tue, 21 Apr 2020 15:35:23 -0400, James Cloos > said: > > >>>>> "RP" =3D=3D Robert Pluim writes: > RP> Footnotes: > RP> [1] Although you can still build it with Xft if you want, but I > RP> wouldn=CA=BCt recommend that, since it will crash once you start > RP> processing Emojis and other 'interesting' Unicode characters. > > James> note that master will also crash when using cr+hb on some code > points. > > James> such as some private use characters. > > Examples? Eli fixed one such case with Bug#39892, but if there are > more we should fix them (please open a separate bug report for that). > > Robert > --0000000000002bc2d205a41b0776 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Robert> Which font specifically does emacs end up using= for that character?
Robert> Emacs ends up using 'Noto Sans CJK K= R' for me here.

When google fonts is removed?

This is wha= t `C-u C-x =3D` says:

ftcrhb:-= PfEd-Unifont-normal-normal-normal-*-15-*-*-*-d-0-iso10646-1 (#xDD38ftcrhb:-= PfEd-Unifont-normal-normal-normal-*-15-*-*-*-d-0-iso10646-1 (#xDD38)=

Note on the above: For the hell of it, I tried installing `noto-fon= ts` font pack
from nixpkgs and it didn't make a difference. Then aga= in, `fc-list --verbose |
rg "Noto Sans CJK" -i` produced no re= sults so that specific font probably isn't
in that font pack.
When google fonts are installed:

ftcrhb:-GNU-Unifont-normal-normal-normal-Sans-Serif-16-*-*-*-c-80-iso10= 646-1 (#xDD36)

Robert> BTW, if you want to ignore that fon= t, you can set
Robert> 'face-ignored-fonts' to match it, and = you won't have to uninstall it.

Thanks, I didn't know that! = Maybe I can use that to narrow down to the specific
font that's caus= ing problems because adding `google-fonts` adds 2905 fonts for
me, and m= any I would like to have.

Robert> I don=CA=BCt think there=CA=BCs= much point in that: emacs-26 uses Xft for font
Robert> handling, ema= cs-27 uses Cairo+Harfbuzz[1]; they=CA=BCre fundamentally doing
Robert>= ; very different things, so I don=CA=BCt think this is caused by a singleRobert> identifiable change.

I'm not trying to prove you wr= ong or anything. It's just easy for me to try
different versions bec= ause I'm using
(https://github.com/nix-community/emacs-overlay). However, I trie= d Emacs 27.0.50
and it's behaving exactly the same as Emacs 26. I gl= anced at the
`report-emacs-bug` output and the build inputs look the sam= e. I can include it
if desired.

=CE=BB ~/ time emacs -Q --eval '(message "hi")' -kil= l
emacs -Q --eval '(message "hi")' -kill=C2=A0 0.18s u= ser 0.02s system 67% cpu 0.303 total
=CE=BB ~/ time emacs -Q --eval '= ;(message "=EF=B8=B5")' -kill
emacs -Q --eval '(messag= e "=EF=B8=B5")' -kill=C2=A0 0.44s user 0.03s system 95% cpu 0= .494 total
=CE=BB ~/ emacs --version
GNU Emacs 27.0.50


= Robert> ...we implicitly do '--with-cairo' now.

Is that s= ince 27.0.50?

Were either Cairo+Harfbuzz libraries updated since 27.= 0.50 (perhaps a regression
in those libraries)? I'll follow up with = an update later after testing more versions.

Robert> Although you= can still build it with Xft if you want, but I
Robert> wouldn=CA=BCt= recommend that, since it will crash once you start
Robert> processin= g Emojis and other 'interesting' Unicode characters.

Just to= verity I understand. Building with Xft is what `--with-xft` is doing inthe following from my initial email?

Configured using:
=C2=A0'configure
=C2=A0--prefix=3D/nix/= store/5v0fp6vikajaqc2v0ppkm51hfc054mnm-emacs-git-20190910.0
=C2=A0--disa= ble-build-details --with-modules --with-x-toolkit=3Dgtk3 --with-xft
=C2= =A0CFLAGS=3D-DMAC_OS_X_VERSION_MAX_ALLOWED=3D101200'


Eli&= gt; I'm not sure I understand: you are saying that slow, but correctEli> display is _worse_ than displaying a white space instead of theEli> correct glyph, i.e. producing incorrect display?=C2=A0 To me, it s= ounds
Eli> like Emacs 27+ actually _improves_ things in this case.
Let me quantify the performance because I've been ambiguous about = it so far:

=CE=BB ~/ time emac= s -Q --eval '(message "hi")' -kill
emacs -Q --eval = 9;(message "hi")' -kill=C2=A0 0.19s user 0.02s system 55% cpu= 0.371 total
=CE=BB ~/ time emacs -Q --eval '(message "=EF=B8= =B5")' -kill
emacs -Q --eval '(message "=EF=B8=B5"= ;)' -kill=C2=A0 81.64s user 0.03s system 99% cpu 1:21.91 total

It takes ~81 seconds to do something while locking up the UI. That= 9;s personally
beyond my threshold for killing the process.


On We= d, Apr 22, 2020 at 2:35 AM Robert Pluim <rpluim@gmail.com> wrote:
>>>>> On Tue, 21 Apr 2020 15:35:23 -040= 0, James Cloos <c= loos@jhcloos.com> said:

>>>>> "RP" =3D=3D Robert Pluim <rpluim@gmail.com> writes:
=C2=A0 =C2=A0 RP> Footnotes:
=C2=A0 =C2=A0 RP> [1]=C2=A0 Although you can still build it with Xft if = you want, but I
=C2=A0 =C2=A0 RP> wouldn=CA=BCt recommend that, since it will crash once= you start
=C2=A0 =C2=A0 RP> processing Emojis and other 'interesting' Unic= ode characters.

=C2=A0 =C2=A0 James> note that master will also crash when using cr+hb o= n some code points.

=C2=A0 =C2=A0 James> such as some private use characters.

Examples? Eli fixed one such case with Bug#39892, but if there are
more we should fix them (please open a separate bug report for that).

Robert
--0000000000002bc2d205a41b0776--