unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#44113: 28.0.50; crash with cairo and Noto Sans Javanese font
@ 2020-10-21 10:12 Stephen Berman
  2020-10-21 12:22 ` Stephen Berman
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Berman @ 2020-10-21 10:12 UTC (permalink / raw)
  To: 44113

[-- Attachment #1: Type: text/plain, Size: 1628 bytes --]

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


[-- Attachment #2: backtrace.gz --]
[-- Type: application/octet-stream, Size: 12132 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#44113: 28.0.50; crash with cairo and Noto Sans Javanese font
  2020-10-21 10:12 bug#44113: 28.0.50; crash with cairo and Noto Sans Javanese font Stephen Berman
@ 2020-10-21 12:22 ` Stephen Berman
  2020-10-21 13:00   ` Robert Pluim
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Berman @ 2020-10-21 12:22 UTC (permalink / raw)
  To: 44113

On Wed, 21 Oct 2020 12:12:00 +0200 Stephen Berman <stephen.berman@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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#44113: 28.0.50; crash with cairo and Noto Sans Javanese font
  2020-10-21 12:22 ` Stephen Berman
@ 2020-10-21 13:00   ` Robert Pluim
  2020-10-21 13:25     ` Stephen Berman
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Pluim @ 2020-10-21 13:00 UTC (permalink / raw)
  To: Stephen Berman; +Cc: 44113

>>>>> On Wed, 21 Oct 2020 14:22:13 +0200, Stephen Berman <stephen.berman@gmx.net> said:

    Stephen> On Wed, 21 Oct 2020 12:12:00 +0200 Stephen Berman <stephen.berman@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
-- 





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#44113: 28.0.50; crash with cairo and Noto Sans Javanese font
  2020-10-21 13:00   ` Robert Pluim
@ 2020-10-21 13:25     ` Stephen Berman
  2020-10-21 15:37       ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Berman @ 2020-10-21 13:25 UTC (permalink / raw)
  To: Robert Pluim; +Cc: 44113

On Wed, 21 Oct 2020 15:00:45 +0200 Robert Pluim <rpluim@gmail.com> wrote:

>>>>>> On Wed, 21 Oct 2020 14:22:13 +0200, Stephen Berman
> <stephen.berman@gmx.net> said:
>
>     Stephen> On Wed, 21 Oct 2020 12:12:00 +0200 Stephen Berman
>     Stephen> <stephen.berman@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@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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#44113: 28.0.50; crash with cairo and Noto Sans Javanese font
  2020-10-21 13:25     ` Stephen Berman
@ 2020-10-21 15:37       ` Eli Zaretskii
  2020-10-22 12:38         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2020-10-21 15:37 UTC (permalink / raw)
  To: Stephen Berman; +Cc: rpluim, 44113

> From: Stephen Berman <stephen.berman@gmx.net>
> Date: Wed, 21 Oct 2020 15:25:13 +0200
> Cc: 44113@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@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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#44113: 28.0.50; crash with cairo and Noto Sans Javanese font
  2020-10-21 15:37       ` Eli Zaretskii
@ 2020-10-22 12:38         ` Lars Ingebrigtsen
  2020-11-07  8:15           ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-22 12:38 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: rpluim, Stephen Berman, 44113

Eli Zaretskii <eliz@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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#44113: 28.0.50; crash with cairo and Noto Sans Javanese font
  2020-10-22 12:38         ` Lars Ingebrigtsen
@ 2020-11-07  8:15           ` Eli Zaretskii
  0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2020-11-07  8:15 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: rpluim, stephen.berman, 44113-done

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Stephen Berman <stephen.berman@gmx.net>,  rpluim@gmail.com,
>   44113@debbugs.gnu.org
> Date: Thu, 22 Oct 2020 14:38:12 +0200
> 
> Eli Zaretskii <eliz@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.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-11-07  8:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-21 10:12 bug#44113: 28.0.50; crash with cairo and Noto Sans Javanese font Stephen Berman
2020-10-21 12:22 ` Stephen Berman
2020-10-21 13:00   ` Robert Pluim
2020-10-21 13:25     ` Stephen Berman
2020-10-21 15:37       ` Eli Zaretskii
2020-10-22 12:38         ` Lars Ingebrigtsen
2020-11-07  8:15           ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).