bug#46508: 27.1; Emacs doesn't like ⿰

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#46508: 27.1; Emacs doesn't like ⿰

Ben Bullock-2
To reproduce this bug,

cat ⿰ > file
emacs -Q file

In XWindows, Emacs seems to hang up when opening a file with this
character in it. However, it is working inside the gnome-terminal (I am
using emacs -nw to write this).

In GNU Emacs 27.1 (build 1, i386-portbld-freebsd12.1, GTK+ Version 3.24.24, cairo version 1.16.0)
System Description: 12.2-RELEASE-p3

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set
Making completion list... [2 times]
scroll-up-command: End of buffer

Configured using:
 'configure --disable-build-details --localstatedir=/var --with-x
 --enable-acl --with-cairo --with-dbus --without-gconf --with-gif
 --with-gnutls --with-gsettings --with-x-toolkit=gtk3 --with-harfbuzz
 --with-jpeg --with-json --with-file-notification=kqueue --with-lcms2
 --with-m17n-flt --without-imagemagick --with-mailutils --with-modules
 --with-sound=oss --with-libotf --with-png --with-toolkit-scroll-bars
 --with-rsvg --with-threads --with-tiff --with-xft --with-xim
 --with-xml2 --with-xpm --without-xwidgets --x-libraries=/usr/local/lib
 --x-includes=/usr/local/include --prefix=/usr/local
 --mandir=/usr/local/man --disable-silent-rules
 --infodir=/usr/local/share/emacs/info/ --build=i386-portbld-freebsd12.1
 'CFLAGS=-O2 -pipe -fstack-protector-strong -isystem /usr/local/include
 -fno-strict-aliasing ' 'CPPFLAGS=-isystem /usr/local/include' 'LDFLAGS=
 -fstack-protector-strong -L/usr/local/lib ''

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY KQUEUE
ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS JSON PDUMPER LCMS2
GMP

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  savehist-mode: t
  show-paren-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/usr/home/ben/config/emacs/ruby-mode hides /usr/local/share/emacs/27.1/lisp/progmodes/ruby-mode
/usr/home/ben/config/emacs/cperl-mode hides /usr/local/share/emacs/27.1/lisp/progmodes/cperl-mode

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec epa epg epg-config gnus-util rmail
rmail-loaddefs text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils term/xterm
xterm savehist japan-util ff-mode table-readable-mode derived advice
edmacro kmacro paren server finder-inf package easymenu browse-url
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib 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 tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer 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 charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray 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 threads dbusbind kqueue lcms2 dynamic-setting
system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit
x multi-tty make-network-process emacs)

Memory information:
((conses 8 75173 5699)
 (symbols 24 8518 1)
 (strings 16 23859 3294)
 (string-bytes 1 747583)
 (vectors 8 12429)
 (vector-slots 4 207547 5958)
 (floats 8 29 19)
 (intervals 28 272 1)
 (buffers 568 13))



--
 <ben@mikan>
Reply | Threaded
Open this post in threaded view
|

bug#46508: 27.1; Emacs doesn't like ⿰

Andreas Schwab-2
On Feb 14 2021, Ben Bullock wrote:

> To reproduce this bug,
>
> cat ⿰ > file
> emacs -Q file
>
> In XWindows, Emacs seems to hang up when opening a file with this
> character in it.

Does it really hang forever, or just take a lot of time trying to look
up a font for the character?

Andreas.

--
Andreas Schwab, [hidden email]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



Reply | Threaded
Open this post in threaded view
|

bug#46508: 27.1; Emacs doesn't like ⿰

Ben Bullock-2


On Sun, 14 Feb 2021 at 20:56, Andreas Schwab <[hidden email]> wrote:
On Feb 14 2021, Ben Bullock wrote:

> To reproduce this bug,
>
> cat ⿰ > file
> emacs -Q file
>
> In XWindows, Emacs seems to hang up when opening a file with this
> character in it.

Does it really hang forever, or just take a lot of time trying to look
up a font for the character?

It just takes a lot of time, several minutes.

Further information about this:

I installed Google Fonts and Noto using

pkg install google-fonts
pkg install noto

(freebsd)

The problem happened after that. gnome-terminal continued to operate.

I found that if I waited several minutes, something would appear.

After uninstalling google-fonts and noto again, Emacs was behaving normally.

Thank you.
 
Andreas.

--
Andreas Schwab, [hidden email]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."
Reply | Threaded
Open this post in threaded view
|

bug#46508: 27.1; Emacs doesn't like ⿰

Andreas Schwab-2
What is the value of (frame-parameter nil 'font-backend)?
Does it help to run (set-frame-parameter nil 'font-backend (remove 'x
(frame-parameter nil 'font-backend)))?

Andreas.

--
Andreas Schwab, [hidden email]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



Reply | Threaded
Open this post in threaded view
|

bug#46508: 27.1; Emacs doesn't like ⿰

Ben Bullock-2
On Mon, 15 Feb 2021 at 17:23, Andreas Schwab <[hidden email]> wrote:
What is the value of (frame-parameter nil 'font-backend)?

I ran this in *scratch*:

(message "%s" (frame-parameter nil 'font-backend))

and it says

(ftcrhb x)
 
Does it help to run (set-frame-parameter nil 'font-backend (remove 'x
(frame-parameter nil 'font-backend)))?

I reinstalled google-fonts using

pkg install google-fonts

as su (root) followed by 

xset fp rehash

This caused the problem to occur again and emacs -Q stalled completely. I then restarted emacs with emacs -Q without opening the problem file (which contains a single ⿰). In the new Emacs window I copy-pasted the above code and ran 'eval-buffer' then I used C-x C-f to load the file containing the ⿰ single character. I then started typing this email, and it is still unable to load the file containing the ⿰ even as I am typing now. It finally loaded after several minutes, but the ⿰ character is not displayed, instead there is a box with 2FF0 in it.

Here is a screenshot if it helps:





Reply | Threaded
Open this post in threaded view
|

bug#46508: 27.1; Emacs doesn't like ⿰

Robert Pluim
>>>>> On Tue, 16 Feb 2021 16:14:00 +0900, Ben Bullock <[hidden email]> said:

    Ben> This caused the problem to occur again and emacs -Q stalled completely. I
    Ben> then restarted emacs with emacs -Q without opening the problem file (which
    Ben> contains a single ⿰). In the new Emacs window I copy-pasted the above code
    Ben> and ran 'eval-buffer' then I used C-x C-f to load the file containing the ⿰
    Ben> single character. I then started typing this email, and it is still unable
    Ben> to load the file containing the ⿰ even as I am typing now. It finally
    Ben> loaded after several minutes, but the ⿰ character is not displayed, instead
    Ben> there is a box with 2FF0 in it.

I have no problems displaying that codepoint, because I have a
scalable font installed that can display the character, whereas you
only have a bitmap font. 'C-u C-x =' on the problematic character
shows:

    ftcrhb:-GOOG-Noto Serif CJK TC-normal-normal-normal-*-27-*-*-*-*-0-iso10646-1 (#x568)

so perhaps thereʼs a google-noto package you can install.

Robert



Reply | Threaded
Open this post in threaded view
|

bug#46508: 27.1; Emacs doesn't like ⿰

Werner LEMBERG

> Ben> This caused the problem to occur again and emacs -Q stalled
> Ben> completely. I then restarted emacs with emacs -Q without
> Ben> opening the problem file (which contains a single ⿰). In the
> Ben> new Emacs window I copy-pasted the above code and ran
> Ben> 'eval-buffer' then I used C-x C-f to load the file containing
> Ben> the ⿰ single character. I then started typing this email, and
> Ben> it is still unable to load the file containing the ⿰ even as I
> Ben> am typing now. It finally loaded after several minutes, but the
> Ben> ⿰ character is not displayed, instead there is a box with 2FF0
> Ben> in it.
>
> I have no problems displaying that codepoint, because I have a
> scalable font installed that can display the character, [...]

Exactly.  However, this is not always the case, and the freeze of
Emacs is very, very annoying.  Other applications like my KDE terminal
is stalled only for approx. a second in similar situations.

Is there something that could be done on the Emacs side to improve its
behaviour?  For example, putting the font retrieving process into a
separate thread, providing a dummy glyph until the real one is
available?  Or maybe something else?  What does the terminal do to be
so much faster?


    Werner