From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Werner LEMBERG Newsgroups: gmane.emacs.bugs Subject: bug#25945: Emacs aborts while calling FT_Load_Glyph Date: Fri, 03 Mar 2017 08:04:29 +0100 (CET) Message-ID: <20170303.080429.592950574985497052.wl@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1488524715 22603 195.159.176.226 (3 Mar 2017 07:05:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 3 Mar 2017 07:05:15 +0000 (UTC) To: 25945@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 03 08:05:09 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cjhH0-000520-WA for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Mar 2017 08:05:07 +0100 Original-Received: from localhost ([::1]:56493 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjhH6-0003JL-Pp for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Mar 2017 02:05:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53176) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjhH0-0003Hl-CP for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2017 02:05:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cjhGw-00087m-Cv for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2017 02:05:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39102) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cjhGw-00087g-9C for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2017 02:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cjhGw-00016k-1j for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2017 02:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Werner LEMBERG Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Mar 2017 07:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 25945 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14885246944239 (code B ref -1); Fri, 03 Mar 2017 07:05:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Mar 2017 07:04:54 +0000 Original-Received: from localhost ([127.0.0.1]:37301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cjhGn-00016J-Vt for submit@debbugs.gnu.org; Fri, 03 Mar 2017 02:04:54 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33858) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cjhGl-000166-U0 for submit@debbugs.gnu.org; Fri, 03 Mar 2017 02:04:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cjhGf-00084C-Kq for submit@debbugs.gnu.org; Fri, 03 Mar 2017 02:04:46 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:42269) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cjhGf-000848-Hf for submit@debbugs.gnu.org; Fri, 03 Mar 2017 02:04:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjhGe-0003HE-0i for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2017 02:04:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cjhGZ-00081I-VL for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2017 02:04:44 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:51914) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cjhGZ-00080u-KG for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2017 02:04:39 -0500 Original-Received: from gnu.org ([213.208.155.113]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MS5Dm-1cqxcf3M8w-00TH2X for ; Fri, 03 Mar 2017 08:04:36 +0100 X-Mailer: Mew version 6.7 on Emacs 26.0.50 / Mule 6.0 (HANACHIRUSATO) X-Provags-ID: V03:K0:c/pWg7Az3iuxQt8W/L5GjVoj8Vxz6vr/U76zQB8jRS7hcKO3Y2e 9Iwvi4ct5CNMjaKqSKTLXhchgFd8XmChhmiERm6OdXlTHu2P41LAOBvdWjBFdgKiJeQiDsj KE1yQLpvvXqqurwytFxWSKvGCq/yHXZaSQNQ6cEx4urizeXldGKqv8CDgLP45QriGjePJGE 32kGqhfjHlMQodtscnZOg== X-UI-Out-Filterresults: notjunk:1;V01:K0:sX2E15cvBqE=:PmukldmZEQnNrUIWrjnjlQ 4sSuGSviZtKiimclYELsFIh6BPZcLxkq+KBw/PSIA5NVlcB5NdtyUc1tpyvk1vD1Gz5eAFD4e lSO+e5zTjAY4GoRD4DcwDK7USGXfZJNv6N2fbSL8W/h5YZJzDGSLiia2toSd4mm947HYmWRoW UrLraIsjC2nyd0knq84gTAmoagl1IT4Px5MMoVgj0fY/LzhumsHVyLqmpYRBg7YtsYzG+7TDK oRCR9akyMJlebrKwsPSpIxKHXRqfS8TQsRCmmY+XCwsypCnoN3KoHO2IsKFEDiHpAkTybWAZi i4YNon+YPN3EC50UP0eqtZXhHdXyR77+ztyB19ddF687HHUTL68XYytGXt3TeR/SY1AdJHN73 TvyApzroXJ3VsqfQnzFdMrd5KCTQrH1YIE+FpxdqbNRi44z0Cl2ilxGUAQMAZhAIYaeL6pdjJ 7PnSg0CBGovXCj4psZeGUw8ZP7K/g4tkI7wGPqFbAupX0J1JoFiTfX8B7JzQtsC6o+9X9ZUHQ jmqUS504xqfBh4iLTksNqq9X4JGSrjb8pz3iwH9m4VYwVfT86QwNRCUS5RSVyOfwi/1y4e4sn gPtnOXx1S1j0KAknqscsEMFeA+GW4qBG6tv8Lbb67Skg9t1CdrT8xtu/cbekQCG02RRE/ccGe huY1xPOPbPB1Qr701NVg86sqF0RfMpZ2jB6VU9RvSmZkWbPJunjrl+gGLxyJtHjFABzDMRExK drMME1OkMcy+e3JPKmiuwRpIJC98pSMYHQOaAX3MSFmlasppknnJ3lRI3dfNL90YUy26FLAh X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:130085 Archived-At: [f5388ba8a7f3970afd0e2bcc52c834ae56178442, 2017-Mar-03] For me, Emacs aborts at ftfont.c:1550 while `mew' tries to display an e-mail. 1549 if (FT_Load_Glyph (ft_face, g->g.code, FT_LOAD_DEFAULT) != 0) 1550 emacs_abort (); Examining `ft_face' and `g->g.code' I see that the font in question is `Padauk Book Bold' (PadaukBook-Bold.ttf), glyph 376. Examining this font further with `ftview' I see that bytecode of this font is broken, and that the font can only be displayed successfully without bytecode. [This is version 3.002 of the font, taken from the current TeXLive repository.] I think there is no reason that Emacs aborts for such broken fonts. Instead I suggest that (a) Emacs tries to load the glyph again without hinting, and (b) if that fails, it should display a missing glyph, using the standard rectangle with hex digits in it. New code for (a) is quite simple: if (FT_Load_Glyph (ft_face, g->g.code, FT_LOAD_DEFAULT) != 0) if (FT_Load_Glyph (ft_face, g->g.code, FT_LOAD_NO_HINTING) != 0) ... [The code might be further improved by implementing a per-font glyph load mode, to be initialized with `FT_LOAD_DEFAULT'. If, say, 100 calls using `FT_LOAD_DEFAULT' for a given font fails, and `FT_LOAD_NO_HINTING' is successful, the default loading behaviour for this font could be switched to `FT_LOAD_NO_HINTING'. Given that such broken fonts are rare my suggestion is probably overkill, however.] My knowledge of Emacs internals is too small to provide an implementation for (b). Werner ====================================================================== In GNU Emacs 26.0.50 (build 1, x86_64-unknown-linux-gnu, GTK+ Version 3.16.7) of 2017-03-03 built on linux.suse Repository revision: f5388ba8a7f3970afd0e2bcc52c834ae56178442 Windowing system distributor 'The X.Org Foundation', version 11.0.11702000 System Description: openSUSE Leap 42.1 (x86_64) Recent messages: Auto-saving...done Auto-saving...done next-line: End of buffer [4 times] Mark set Making completion list... Quit Type C-x 1 to remove help window. Mark set scroll-up-command: End of buffer Making completion list... Configured using: 'configure MAKEINFO=/usr/bin/makeinfo --with-x-toolkit=gtk --enable-checking=yes,glyphs --enable-check-lisp-object-type 'CFLAGS=-O0 -g3 -gdwarf-4'' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LC_MONETARY: de_AT.UTF-8 value of $LC_TIME: de_AT.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=none locale-coding-system: utf-8-unix Major mode: Summary Minor modes in effect: TeX-PDF-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t transient-mark-mode: (only . t) Load-path shadows: /usr/local/share/emacs/site-lisp/thai-word hides /usr/local/share/emacs/26.0.50/lisp/language/thai-word Features: (shadow emacsbug message puny dired dired-loaddefs format-spec rfc822 mml mml-sec epa derived epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils apropos pp mew-varsx mew-unix cal-menu calendar cal-loaddefs mew-auth mew-config mew-imap2 mew-imap mew-nntp2 mew-nntp mew-pop mew-smtp mew-ssl mew-ssh mew-net mew-highlight mew-sort mew-fib mew-ext mew-refile mew-demo mew-attach mew-draft mew-message mew-thread mew-virtual mew-summary4 mew-summary3 mew-summary2 mew-summary mew-search mew-pick mew-passwd mew-scan mew-syntax mew-bq mew-smime mew-pgp mew-header mew-exec mew-mark mew-mime mew-edit mew-decode mew-encode mew-cache mew-minibuf mew-complete mew-addrbook mew-local mew-vars3 mew-vars2 mew-vars mew-env mew-mule3 mew-mule mew-gemacs mew-key mew-func mew-blvs mew-const mew tex dbus xml crm advice tex-site auto-loads quail cjktilde mm-util mail-prsvr disp-table finder-inf package epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt subr-x gv bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 237202 13045) (symbols 48 31618 2) (miscs 40 316 279) (strings 32 66908 9104) (string-bytes 1 1731569) (vectors 16 27986) (vector-slots 8 753851 6763) (floats 8 78 291) (intervals 56 1837 147) (buffers 976 14) (heap 1024 44161 1292))