GNU bug report logs - #39797
Emacs crashes when using Noto Color Emoji font

Previous Next

Package: emacs;

Reported by: Mike FABIAN <mfabian <at> redhat.com>

Date: Wed, 26 Feb 2020 09:15:02 UTC

Severity: normal

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39797 in the body.
You can then email your comments to 39797 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#39797; Package emacs. (Wed, 26 Feb 2020 09:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mike FABIAN <mfabian <at> redhat.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 26 Feb 2020 09:15:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mike FABIAN <mfabian <at> redhat.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Emacs crashes when using Noto Color Emoji font
Date: Wed, 26 Feb 2020 10:13:09 +0100
[Message part 1 (text/plain, inline)]
File to reproduce the problem:

$ cat reproduce-crash.el 
(set-fontset-font t '(#x10000 . #x1FFFF) '("Noto Color Emoji" . "unicode-bmp") nil 'append) (i
nsert "🥰")

(Also attached to this mail).

Then the crash can be reproduced like this:

$ emacs -q --file reproduce-crash.el --eval '(eval-buffer)'
X protocol error: BadLength (poly request too large or internal Xlib length error) on protocol
 request 138
When compiled with GTK, Emacs cannot recover from X disconnects.
This is a GTK bug: https://gitlab.gnome.org/GNOME/gtk/issues/221
For details, see etc/PROBLEMS.
Fatal error 6: Aborted

It happens with Emacs 26.3 and also whith Emacs compiled from current
git master.

A similar problem happens when trying to show that font with "xfd"

$ xfd -fa "Noto Color Emoji"
Warning: Missing charsets in String to FontSet conversion
X Error of failed request:  BadLength (poly request too large or internal Xlib length error)
  Major opcode of failed request:  138 (RENDER)
  Minor opcode of failed request:  20 (RenderAddGlyphs)
  Serial number of failed request:  208
  Current serial number in output stream:  271

This color emoji font contains bitmaps of emoji.


-- 
Mike FABIAN <mfabian <at> redhat.com>

[reproduce-crash.el (text/plain, inline)]
(set-fontset-font t '(#x10000 . #x1FFFF) '("Noto Color Emoji" . "unicode-bmp") nil 'append) (insert "🥰")

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39797; Package emacs. (Wed, 26 Feb 2020 10:06:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mike FABIAN <mfabian <at> redhat.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#39797: Emacs crashes when using Noto Color Emoji font
Date: Wed, 26 Feb 2020 10:46:34 +0100
> It happens with Emacs 26.3 and also whith Emacs compiled from current
> git master.

I tried to configure --with-cairo, so I am not sure why Xft is still
used somehow. My configure output looks like this:

Configured for 'x86_64-pc-linux-gnu'.
  
  Where should the build process find the source code?    .
  What compiler should emacs be built with?               gcc -g3 -O2
  Should Emacs use the GNU version of malloc?             no
    (The GNU allocators don't work with this system configuration.)
  Should Emacs use a relocating allocator for buffers?    no
  Should Emacs use mmap(2) for buffer allocation?         no
  What window system should Emacs use?                    x11
  What toolkit should Emacs use?                          GTK3
  Where do we find X Windows header files?                Standard dirs
  Where do we find X Windows libraries?                   Standard dirs
  Does Emacs use -lXaw3d?                                 no
  Does Emacs use -lXpm?                                   yes
  Does Emacs use -ljpeg?                                  yes
  Does Emacs use -ltiff?                                  yes
  Does Emacs use a gif library?                           yes -lgif
  Does Emacs use a png library?                           yes -lpng16 -lz
  Does Emacs use -lrsvg-2?                                yes
  Does Emacs use cairo?                                   yes
  Does Emacs use -llcms2?                                 yes
  Does Emacs use imagemagick?                             no
  Does Emacs support sound?                               yes
  Does Emacs use -lgpm?                                   yes
  Does Emacs use -ldbus?                                  yes
  Does Emacs use -lgconf?                                 no
  Does Emacs use GSettings?                               yes
  Does Emacs use a file notification library?             yes -lglibc (inotify)
  Does Emacs use access control lists?                    yes -lacl
  Does Emacs use -lselinux?                               yes
  Does Emacs use -lgnutls?                                yes
  Does Emacs use -lxml2?                                  yes
  Does Emacs use -lfreetype?                              yes
  Does Emacs use HarfBuzz?                                yes
  Does Emacs use -lm17n-flt?                              yes
  Does Emacs use -lotf?                                   yes
  Does Emacs use -lxft?                                   no
  Does Emacs use -lsystemd?                               yes
  Does Emacs use -ljansson?                               no
  Does Emacs use -lgmp?                                   yes
  Does Emacs directly use zlib?                           yes
  Does Emacs have dynamic modules support?                yes
  Does Emacs use toolkit scroll bars?                     yes
  Does Emacs support Xwidgets (requires gtk3)?            no
  Does Emacs have threading support in lisp?              yes
  Does Emacs support the portable dumper?                 yes
  Does Emacs support legacy unexec dumping?               no
  Which dumping strategy does Emacs use?                  pdumper

-- 
Mike FABIAN <mfabian <at> redhat.com>





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39797; Package emacs. (Wed, 26 Feb 2020 10:14:01 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mike FABIAN <mfabian <at> redhat.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#39797: Emacs crashes when using Noto Color Emoji font
Date: Wed, 26 Feb 2020 11:13:11 +0100
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37786

seems related and

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37786#49

says 

    Fixed by adding "Noto Color Emoji" to face-ignored-fonts
    instead. Closing.
    
    Committed as eae50e88ef

but although I have commit eae50e88ef it still crashes for me.

-- 
Mike FABIAN <mfabian <at> redhat.com>





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39797; Package emacs. (Wed, 26 Feb 2020 13:36:01 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mike FABIAN <mfabian <at> redhat.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#39797: Emacs crashes when using Noto Color Emoji font
Date: Wed, 26 Feb 2020 14:35:20 +0100
[Message part 1 (text/plain, inline)]
Mike FABIAN <mfabian <at> redhat.com> さんはかきました:

> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37786
>
> seems related and
>
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37786#49
>
> says 
>
>     Fixed by adding "Noto Color Emoji" to face-ignored-fonts
>     instead. Closing.
>     
>     Committed as eae50e88ef
>
> but although I have commit eae50e88ef it still crashes for me.

I made a mistake, I compiled from git master but then used an older
installation for testing.

It *does* work with git master.

As can be seen in the attached screenshot, Emacs can display colour
emoji in the buffer. The screenshot uses the “Joypixels” font (Version
5.5), but it works with “Noto Color Emoji” as well. I just tested wrong.

Some sequences like

👩‍🦰 U+1F469 U+200D U+1F9B0 woman: red hair
🧑‍🦰 U+1F9D1 U+200D U+1F9B0 person: red hair

don’t render correctly in the screenshot, although they work
using the same (“Joypixels”) font in gedit. But that is a different
problem …

So I think this bug here can be closed.

-- 
Mike FABIAN <mfabian <at> redhat.com>

[emacs-color-emoji.png (image/png, attachment)]

Reply sent to Robert Pluim <rpluim <at> gmail.com>:
You have taken responsibility. (Wed, 26 Feb 2020 15:21:02 GMT) Full text and rfc822 format available.

Notification sent to Mike FABIAN <mfabian <at> redhat.com>:
bug acknowledged by developer. (Wed, 26 Feb 2020 15:21:02 GMT) Full text and rfc822 format available.

Message #19 received at 39797-done <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Mike FABIAN <mfabian <at> redhat.com>
Cc: 39797-done <at> debbugs.gnu.org
Subject: Re: bug#39797: Emacs crashes when using Noto Color Emoji font
Date: Wed, 26 Feb 2020 16:20:47 +0100
>>>>> On Wed, 26 Feb 2020 14:35:20 +0100, Mike FABIAN <mfabian <at> redhat.com> said:

    Mike> Mike FABIAN <mfabian <at> redhat.com> さんはかきました:
    >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37786
    >> 
    >> seems related and
    >> 
    >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=37786#49
    >> 
    >> says 
    >> 
    >> Fixed by adding "Noto Color Emoji" to face-ignored-fonts
    >> instead. Closing.
    >> 
    >> Committed as eae50e88ef
    >> 
    >> but although I have commit eae50e88ef it still crashes for me.

    Mike> I made a mistake, I compiled from git master but then used an older
    Mike> installation for testing.

    Mike> It *does* work with git master.

You had me worried there for a moment :-)

    Mike> As can be seen in the attached screenshot, Emacs can display colour
    Mike> emoji in the buffer. The screenshot uses the “Joypixels” font (Version
    Mike> 5.5), but it works with “Noto Color Emoji” as well. I just tested wrong.

    Mike> Some sequences like

    Mike> 👩‍🦰 U+1F469 U+200D U+1F9B0 woman: red hair
    Mike> 🧑‍🦰 U+1F9D1 U+200D U+1F9B0 person: red hair

    Mike> don’t render correctly in the screenshot, although they work
    Mike> using the same (“Joypixels”) font in gedit. But that is a different
    Mike> problem …

Is this with a cairo build or an XFT one? Gedit will almost certainly
be using cairo. (Iʼd test it myself, but downloading joypixels
requires signing up, and Iʼm feeling ornery today).

    Mike> So I think this bug here can be closed.

Done with this message.

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#39797; Package emacs. (Wed, 26 Feb 2020 17:16:02 GMT) Full text and rfc822 format available.

Message #22 received at 39797-done <at> debbugs.gnu.org (full text, mbox):

From: Mike FABIAN <mfabian <at> redhat.com>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 39797-done <at> debbugs.gnu.org
Subject: Re: bug#39797: Emacs crashes when using Noto Color Emoji font
Date: Wed, 26 Feb 2020 18:14:53 +0100
Robert Pluim <rpluim <at> gmail.com> さんはかきました:

>     Mike> As can be seen in the attached screenshot, Emacs can display colour
>     Mike> emoji in the buffer. The screenshot uses the “Joypixels” font (Version
>     Mike> 5.5), but it works with “Noto Color Emoji” as well. I just tested wrong.
>
>     Mike> Some sequences like
>
>     Mike> 👩‍🦰 U+1F469 U+200D U+1F9B0 woman: red hair
>     Mike> 🧑‍🦰 U+1F9D1 U+200D U+1F9B0 person: red hair
>
>     Mike> don’t render correctly in the screenshot, although they work
>     Mike> using the same (“Joypixels”) font in gedit. But that is a different
>     Mike> problem …
>
> Is this with a cairo build or an XFT one? Gedit will almost certainly
> be using cairo.

With a cairo build, I think with an XFT build it could not display these
color emoji fonts at all.

> (Iʼd test it myself, but downloading joypixels
> requires signing up, and Iʼm feeling ornery today).

Joypixels is not needed, the problem can also be seen with Noto Color
Emoji.

I reported a new bug for the emoji sequence display problem here:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=39799

In gedit, both “Noto Color Emoji” *and* “Joypixels” can display most
emoji sequences correctly. The latest version of “Joypixels” seems to be
slightly more up-to-date and can display a few sequences correctly which
cannot yet be displayed correctly using the latest “Noto Color Emoji”
(build from current git master) but this affects only a handful of
sequences.

Most sequences display correctly in gedit and I think none of the emoji
sequences displays correctly in Emacs.

-- 
Mike FABIAN <mfabian <at> redhat.com>
睡眠不足はいい仕事の敵だ。





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 26 Mar 2020 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 164 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.