GNU bug report logs - #44113
28.0.50; crash with cairo and Noto Sans Javanese font

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Wed, 21 Oct 2020 10:13:02 UTC

Severity: normal

Found in version 28.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

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 44113 in the body.
You can then email your comments to 44113 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#44113; Package emacs. (Wed, 21 Oct 2020 10:13:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephen Berman <stephen.berman <at> gmx.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 21 Oct 2020 10:13:02 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; crash with cairo and Noto Sans Javanese font
Date: Wed, 21 Oct 2020 12:12:00 +0200
[Message part 1 (text/plain, inline)]
I installed NotoSansJavanese-Regular.ttf and when I type `C-h h' to view
the Javanese script, Emacs immediately crashes.  It also crashes when I
just try to insert a character from that script, e.g. `C-x 8 RET #xa9b2
RET'.  I've attached the backtrace from gdb produced from the latter.
Emacs also crashes when trying to display a character from the Balinese
script with NotoSansBalinese-Regular.ttf installed.  The crashes do not
happen in emacs-27 built without cairo, but characters from the Javanese
and Balinese scripts are displayed there as tofu, as they are in Firefox
(e.g. https://en.wikipedia.org/wiki/Javanese_script), so maybe the fonts
are buggy; and indeed, when I uninstall them Emacs built with cairo does
not crash and the characters are displayed as tofu.  But it would be
better for Emacs with cairo not to crash with a buggy font, if possible.
If desired, I can send the fonts.

In GNU Emacs 28.0.50 (build 37, x86_64-pc-linux-gnu, GTK+ Version 3.24.17, cairo version 1.17.3)
 of 2020-10-20 built on strobe-jhalfs
Repository revision: 39271ed108380494667ab680fc71b800f9ea5097
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Linux From Scratch SVN-20200401

Configured using:
 'configure --with-xwidgets 'CFLAGS=-Og -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS LIBSYSTEMD PDUMPER LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

[backtrace.gz (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44113; Package emacs. (Wed, 21 Oct 2020 12:23:02 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: 44113 <at> debbugs.gnu.org
Subject: Re: bug#44113: 28.0.50; crash with cairo and Noto Sans Javanese font
Date: Wed, 21 Oct 2020 14:22:13 +0200
On Wed, 21 Oct 2020 12:12:00 +0200 Stephen Berman <stephen.berman <at> gmx.net> wrote:

> I installed NotoSansJavanese-Regular.ttf and when I type `C-h h' to view
> the Javanese script, Emacs immediately crashes.  It also crashes when I
> just try to insert a character from that script, e.g. `C-x 8 RET #xa9b2
> RET'.  I've attached the backtrace from gdb produced from the latter.
> Emacs also crashes when trying to display a character from the Balinese
> script with NotoSansBalinese-Regular.ttf installed.  The crashes do not
> happen in emacs-27 built without cairo, but characters from the Javanese
> and Balinese scripts are displayed there as tofu, as they are in Firefox
> (e.g. https://en.wikipedia.org/wiki/Javanese_script), so maybe the fonts
> are buggy; and indeed, when I uninstall them Emacs built with cairo does
> not crash and the characters are displayed as tofu.

It seems those fonts are indeed buggy: I just installed
NotoSansJavanese-Regular.ttf from
https://github.com/googlefonts/noto-fonts and with it the Javanese
script sample in etc/HELLO displays fine both in Emacs from master built
with cairo and in emacs-27 with xft (and the Javanese script Wikipedia
page also displays fine in Firefox; the googlefonts repository does not
contain NotoSansBalinese-Regular.ttf but instead
NotoSerifBalinese-Regular.ttf, which I also installed and with it the
Balinese characters in the Wikipedia page also display fine).

>                                                      But it would be
> better for Emacs with cairo not to crash with a buggy font, if possible.

That would still be good, but if it's not practically feasible, I guess
this bug should just be closed.

Steve Berman




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

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

From: Robert Pluim <rpluim <at> gmail.com>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 44113 <at> debbugs.gnu.org
Subject: Re: bug#44113: 28.0.50; crash with cairo and Noto Sans Javanese font
Date: Wed, 21 Oct 2020 15:00:45 +0200
>>>>> On Wed, 21 Oct 2020 14:22:13 +0200, Stephen Berman <stephen.berman <at> gmx.net> said:

    Stephen> On Wed, 21 Oct 2020 12:12:00 +0200 Stephen Berman <stephen.berman <at> gmx.net> wrote:
    >> I installed NotoSansJavanese-Regular.ttf and when I type `C-h h' to view
    >> the Javanese script, Emacs immediately crashes.  It also crashes when I
    >> just try to insert a character from that script, e.g. `C-x 8 RET #xa9b2
    >> RET'.  I've attached the backtrace from gdb produced from the latter.
    >> Emacs also crashes when trying to display a character from the Balinese
    >> script with NotoSansBalinese-Regular.ttf installed.  The crashes do not
    >> happen in emacs-27 built without cairo, but characters from the Javanese
    >> and Balinese scripts are displayed there as tofu, as they are in Firefox
    >> (e.g. https://en.wikipedia.org/wiki/Javanese_script), so maybe the fonts
    >> are buggy; and indeed, when I uninstall them Emacs built with cairo does
    >> not crash and the characters are displayed as tofu.

    Stephen> It seems those fonts are indeed buggy: I just installed
    Stephen> NotoSansJavanese-Regular.ttf from
    Stephen> https://github.com/googlefonts/noto-fonts and with it the Javanese
    Stephen> script sample in etc/HELLO displays fine both in Emacs from master built
    Stephen> with cairo and in emacs-27 with xft (and the Javanese script Wikipedia
    Stephen> page also displays fine in Firefox; the googlefonts repository does not
    Stephen> contain NotoSansBalinese-Regular.ttf but instead
    Stephen> NotoSerifBalinese-Regular.ttf, which I also installed and with it the
    Stephen> Balinese characters in the Wikipedia page also display fine).

    >> But it would be
    >> better for Emacs with cairo not to crash with a buggy font, if possible.

    Stephen> That would still be good, but if it's not practically feasible, I guess
    Stephen> this bug should just be closed.

    Stephen> Steve Berman

Looking at the backtrace, this could be another manifestation of
bug#41627. That bug has a patch, would it be possible to try it?

Thanks

Robert
-- 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44113; Package emacs. (Wed, 21 Oct 2020 13:26:02 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: 44113 <at> debbugs.gnu.org
Subject: Re: bug#44113: 28.0.50; crash with cairo and Noto Sans Javanese font
Date: Wed, 21 Oct 2020 15:25:13 +0200
On Wed, 21 Oct 2020 15:00:45 +0200 Robert Pluim <rpluim <at> gmail.com> wrote:

>>>>>> On Wed, 21 Oct 2020 14:22:13 +0200, Stephen Berman
> <stephen.berman <at> gmx.net> said:
>
>     Stephen> On Wed, 21 Oct 2020 12:12:00 +0200 Stephen Berman
>     Stephen> <stephen.berman <at> gmx.net> wrote:
>     >> I installed NotoSansJavanese-Regular.ttf and when I type `C-h h' to view
>     >> the Javanese script, Emacs immediately crashes.  It also crashes when I
>     >> just try to insert a character from that script, e.g. `C-x 8 RET #xa9b2
>     >> RET'.  I've attached the backtrace from gdb produced from the latter.
>     >> Emacs also crashes when trying to display a character from the Balinese
>     >> script with NotoSansBalinese-Regular.ttf installed.  The crashes do not
>     >> happen in emacs-27 built without cairo, but characters from the Javanese
>     >> and Balinese scripts are displayed there as tofu, as they are in Firefox
>     >> (e.g. https://en.wikipedia.org/wiki/Javanese_script), so maybe the fonts
>     >> are buggy; and indeed, when I uninstall them Emacs built with cairo does
>     >> not crash and the characters are displayed as tofu.
>
>     Stephen> It seems those fonts are indeed buggy: I just installed
>     Stephen> NotoSansJavanese-Regular.ttf from
>     Stephen> https://github.com/googlefonts/noto-fonts and with it the Javanese
>     Stephen> script sample in etc/HELLO displays fine both in Emacs from master built
>     Stephen> with cairo and in emacs-27 with xft (and the Javanese script Wikipedia
>     Stephen> page also displays fine in Firefox; the googlefonts repository does not
>     Stephen> contain NotoSansBalinese-Regular.ttf but instead
>     Stephen> NotoSerifBalinese-Regular.ttf, which I also installed and with it the
>     Stephen> Balinese characters in the Wikipedia page also display fine).
>
>     >> But it would be
>     >> better for Emacs with cairo not to crash with a buggy font, if possible.
>
>     Stephen> That would still be good, but if it's not practically feasible, I guess
>     Stephen> this bug should just be closed.
>
>     Stephen> Steve Berman
>
> Looking at the backtrace, this could be another manifestation of
> bug#41627. That bug has a patch, would it be possible to try it?

I assume you mean Pip Cet's second patch, in
<CAOqdjBc+x65eSjsvgKv=KcNyR8yWhguJyabvqfwDmPo3UvumoA <at> mail.gmail.com>?  I
applied that and rebuilt from master, and reinstalled the problematic
NotoSansJavanese-Regular.ttf font, and now with it displaying etc/HELLO
does not crash Emacs, and the Javanese characters are displayed as tofu.
So this is another datapoint in favor of installing that patch.  Thanks
for the pointer.

Steve Berman




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44113; Package emacs. (Wed, 21 Oct 2020 15:38:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: rpluim <at> gmail.com, 44113 <at> debbugs.gnu.org
Subject: Re: bug#44113: 28.0.50; crash with cairo and Noto Sans Javanese font
Date: Wed, 21 Oct 2020 18:37:58 +0300
> From: Stephen Berman <stephen.berman <at> gmx.net>
> Date: Wed, 21 Oct 2020 15:25:13 +0200
> Cc: 44113 <at> debbugs.gnu.org
> 
> > Looking at the backtrace, this could be another manifestation of
> > bug#41627. That bug has a patch, would it be possible to try it?
> 
> I assume you mean Pip Cet's second patch, in
> <CAOqdjBc+x65eSjsvgKv=KcNyR8yWhguJyabvqfwDmPo3UvumoA <at> mail.gmail.com>?  I
> applied that and rebuilt from master, and reinstalled the problematic
> NotoSansJavanese-Regular.ttf font, and now with it displaying etc/HELLO
> does not crash Emacs, and the Javanese characters are displayed as tofu.
> So this is another datapoint in favor of installing that patch.  Thanks
> for the pointer.

Yes, let's install that patch (I guess on the emacs-27 branch?).

However, there are more places in that function where we call APIs
which could return NULL, and then dereference their return values
without checking.  Could someone who can build with Cairo please
install similar changes in those other places?

TIA




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44113; Package emacs. (Thu, 22 Oct 2020 12:39:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rpluim <at> gmail.com, Stephen Berman <stephen.berman <at> gmx.net>,
 44113 <at> debbugs.gnu.org
Subject: Re: bug#44113: 28.0.50; crash with cairo and Noto Sans Javanese font
Date: Thu, 22 Oct 2020 14:38:12 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> Yes, let's install that patch (I guess on the emacs-27 branch?).

I installed it on master, but we should cherry-pick it for emacs-27 in a
couple of days (if there's no problems with it).

> However, there are more places in that function where we call APIs
> which could return NULL, and then dereference their return values
> without checking.  Could someone who can build with Cairo please
> install similar changes in those other places?

Robert said:

> All the other calls to cairo_ft_scaled_font_lock_face use the
> cr_scaled_font member of the font_info passed in, which I think means
> thatʼs only done for fonts which were opened successfully.

So I didn't check any further.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 07 Nov 2020 08:16:02 GMT) Full text and rfc822 format available.

Notification sent to Stephen Berman <stephen.berman <at> gmx.net>:
bug acknowledged by developer. (Sat, 07 Nov 2020 08:16:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: rpluim <at> gmail.com, stephen.berman <at> gmx.net, 44113-done <at> debbugs.gnu.org
Subject: Re: bug#44113: 28.0.50; crash with cairo and Noto Sans Javanese font
Date: Sat, 07 Nov 2020 10:15:05 +0200
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: Stephen Berman <stephen.berman <at> gmx.net>,  rpluim <at> gmail.com,
>   44113 <at> debbugs.gnu.org
> Date: Thu, 22 Oct 2020 14:38:12 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > Yes, let's install that patch (I guess on the emacs-27 branch?).
> 
> I installed it on master, but we should cherry-pick it for emacs-27 in a
> couple of days (if there's no problems with it).

Thanks, I've now done that.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 05 Dec 2020 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 141 days ago.

Previous Next


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