Subject: bug#39797: closed (Re: bug#39797: Emacs crashes when using Noto Color Emoji font)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 26 Feb 2020 15:21:02 +0000

Your bug report

#39797: Emacs crashes when using Noto Color Emoji font

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
39797: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=39797
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#39797: Emacs crashes when using Noto Color Emoji font
From: Robert Pluim <[email-masked]>
To: Mike FABIAN <[email-masked]>
Cc: [email-masked]
Date: Wed, 26 Feb 2020 16:20:47 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

>>>>> On Wed, 26 Feb 2020 14:35:20 +0100, Mike FABIAN <[email-masked]> said:

    Mike> Mike FABIAN <[email-masked]> さんはかきました:
    >> 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

Subject: Emacs crashes when using Noto Color Emoji font
From: Mike FABIAN <[email-masked]>
To: [email-masked]
Date: Wed, 26 Feb 2020 10:13:09 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

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 <[email-masked]>

(set-fontset-font t '(#x10000 . #x1FFFF) '("Noto Color Emoji" . "unicode-bmp") nil 'append) (insert "🥰")