bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

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

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Mats Lidell-3
Hi,

Getting the error message 'char-displayable-p: Invalid hash table rehash
size: 1.0' when starting emacs -Q.

If started with no window system ' emacs -nw' the problems does not
occure. (This email is prepared from that state.)

Older version of emacs ie 26.0.50 shows the same behavior on the same
system. Problem occured after upgrade of the OS and not after rebuild of
emacs. The problems remains when rebuilding emacs.

In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
of 2018-03-11 built on barnacle
Repository revision: 0965d94ca426765382f366bf48f88ba5f9500afd
System Description: Gentoo/Linux

Configured using:
'configure --prefix=/home/matsl --without-pop --with-mailutils'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS
LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 THREADS
LIBSYSTEMD LCMS2

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

Major mode: Dired by name

Minor modes in effect:
treemacs-git-mode: extended
global-company-mode: t
company-mode: t
helm-mode: t
helm-autoresize-mode: t
desktop-save-mode: t
dired-omit-mode: t
diff-auto-refine-mode: t
magit-auto-revert-mode: t
global-git-commit-mode: t
savehist-mode: t
global-undo-tree-mode: t
delete-selection-mode: t
show-paren-mode: t
save-place-mode: t
display-time-mode: t
async-bytecomp-package-mode: t
shell-dirtrack-mode: t
cl-old-struct-compat-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-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
buffer-read-only: t
size-indication-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t

Load-path shadows:
/home/matsl/src/hyperbole/hyrolo hides ~/.emacs.d/elisp/etc/hyrolo

Features:
(shadow sort bbdb-message mailalias hsmail mail-extr emacsbug winner
eieio-opt speedbar sb-image ezimage dframe help-fns radix-tree thingatpt
helm-command helm-elisp helm-eval edebug helm-info term/xterm xterm
treemacs-mode treemacs-persist treemacs-interface
treemacs-mouse-interface treemacs-tag-follow-mode treemacs-follow-mode
treemacs-filewatch-mode treemacs-tags treemacs-faces
treemacs-branch-creation treemacs-async treemacs-visuals imenu
treemacs-structure treemacs-impl treemacs-macros treemacs-customization
pfuture ace-window avy ht f magit-bookmark bookmark pp hl-line hydra lv
s vc-dispatcher elec-pair vc-git autoinsert python tramp-sh dired-aux
company-oddmuse company-keywords company-etags etags xref project
company-gtags company-dabbrev-code company-dabbrev company-files
company-capf company-cmake company-xcode company-clang company-semantic
company-eclim company-template company-bbdb company pcase helm-mode
helm-files helm-buffers helm-tags helm-locate helm-grep helm-regexp
helm-utils helm-help helm-types helm-config helm-easymenu helm
helm-source eieio-compat helm-multi-match helm-lib site-gentoo
hib-ashell ashell desktop frameset dmacro bbdb-mua bbdb-com smtpmail
sendmail dired-x solar cal-dst holidays hol-loaddefs vc-hg appt
diary-lib diary-loaddefs org-agenda org-install calendar-swe
magit-obsolete magit-blame magit-stash magit-bisect magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-tag
magit-merge magit-branch magit-reset magit-collab ghub let-alist
magit-files magit-refs magit-status magit magit-repos magit-apply
magit-wip magit-log magit-diff smerge-mode diff-mode magit-core
magit-autorevert autorevert filenotify magit-process magit-margin
magit-mode git-commit magit-git magit-section magit-utils crm
magit-popup log-edit message rfc822 mml mml-sec epa derived gnus-util
rmail rmail-loaddefs mm-decode mm-bodies mm-encode mailabbrev mail-utils
gmm-utils mailheader pcvs-util add-log with-editor cl-extra help-mode
server dash savehist hyperbole hinit hibtypes hib-doc-id hsys-www klink
subr-x hib-kbd hib-social hib-debbugs hsys-org org-element avl-tree
generator org org-macro org-footnote org-pcomplete org-list org-faces
org-entities org-version ob-emacs-lisp ob ob-tangle org-src ob-ref
ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat
org-macs org-loaddefs find-func hactypes hui-mini hui hui-menu
hyrolo-menu hyrolo google-contacts xml url-cache google-oauth oauth2
warnings url-http tls gnutls url url-proxy url-privacy url-expand
url-methods url-history mailcap url-auth mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr url-cookie url-domsuf url-util
url-gw nsm rmc puny plstore epg bbdb bbdb-site timezone hmail hui-jmenu
noutline outline easy-mmode hmouse-sh hui-mouse hui-window pulse
hycontrol hmouse-key hargs hypb locate dired dired-loaddefs hmouse-drv
hsettings hui-em-but hbut hact hpath hhist hbdata htz cal-julian
cal-menu calendar cal-loaddefs hbmap hmoccur browse-url hui-select hvar
set hversion hload-path hyperbole-autoloads kotl-autoloads undo-tree
diff edmacro kmacro iso-transl delsel time-date matsl-theme paren
saveplace time async-bytecomp async cus-start cus-load tramp trampver
tramp-compat tramp-loaddefs ucs-normalize shell pcomplete comint
ansi-color ring parse-time format-spec advice mule-util finder-inf info
package easymenu epg-config url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json 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 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 charprop 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 lcms2 dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 478110 44903)
(symbols 48 45447 2)
(miscs 40 237 624)
(strings 32 120967 5885)
(string-bytes 1 3976593)
(vectors 16 71645)
(vector-slots 8 1092043 22456)
(floats 8 606 665)
(intervals 56 4699 408)
(buffers 992 34))


signature.asc (879 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Eli Zaretskii
> From: Mats Lidell <[hidden email]>
> Date: Mon, 12 Mar 2018 23:12:18 +0100
>
> Getting the error message 'char-displayable-p: Invalid hash table rehash
> size: 1.0' when starting emacs -Q.

Can you show a full recipe, including the character, and a Lisp
backtrace?  FWIW, I cannot reproduce this on my system.

Thanks.



Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Ulrich Mueller-2
In reply to this post by Mats Lidell-3
Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Eli Zaretskii
> Date: Tue, 13 Mar 2018 11:14:18 +0100
> From: Ulrich Mueller <[hidden email]>
>
> Downstream bug: https://bugs.gentoo.org/650332

Can someone who can reproduce this please post a backtrace?



Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Mats Lidell-3
> Eli Zaretskii writes:
> > Date: Tue, 13 Mar 2018 11:14:18 +0100
> > From: Ulrich Mueller <[hidden email]>
> >
> > Downstream bug: https://bugs.gentoo.org/650332
>
> Can someone who can reproduce this please post a backtrace?

I'm sorry Eli, I'm afraid I can't do that! (Or setting the pun aside lack the
skills or have a too broken emacs ...) Please advice what I should do.

What I have tried:

 - On starting emacs -Q I immediately get the message in the minibuffer.

 - If I then try M-x debug-on-entry RET I don't get the chance to enter what
   function to debug. In the message buffer I get: 'autoload-do-load: Invalid
   hash table rehash size: 1.0'

 - If I enter '(list-packages)' in *scratch* buffer and evaluate it I get:
   'debug: Invalid hash table rehash size: 1.0'

 - Starting with emacs --debug-init makes no difference. Same message. Nothing else.

The reason I try with list-packages above is that I first thought it could be
related to some bad package so I found that that command could trigger the
problem as well.

Good news though. Down grading to fontconfig version fontconfig-2.12.6 clears
the issue.






Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Eli Zaretskii
> From: Mats Lidell <[hidden email]>
> Cc: Ulrich Mueller <[hidden email]>,  <[hidden email]>
> Date: Tue, 13 Mar 2018 18:42:27 +0100
>
> > Eli Zaretskii writes:
> > > Date: Tue, 13 Mar 2018 11:14:18 +0100
> > > From: Ulrich Mueller <[hidden email]>
> > >
> > > Downstream bug: https://bugs.gentoo.org/650332
> >
> > Can someone who can reproduce this please post a backtrace?
>
> I'm sorry Eli, I'm afraid I can't do that! (Or setting the pun aside lack the
> skills or have a too broken emacs ...) Please advice what I should do.

Start Emacs under GDB, put a breakpoint in Fmake_hash_table, where it
signals this error (line 4530 of fns.c in today's master), then run
Emacs with "run -Q", and when the breakpoint breaks, type "xbacktrace"
at the GDB prompt, and post the results here.

(If "xbacktrace" doesn't work, type "source /path/to/src/.gdbinit" and
try again.)

TIA



Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Ulrich Mueller-2
>>>>> On Tue, 13 Mar 2018, Eli Zaretskii wrote:

> Start Emacs under GDB, put a breakpoint in Fmake_hash_table, where it
> signals this error (line 4530 of fns.c in today's master), then run
> Emacs with "run -Q", and when the breakpoint breaks, type "xbacktrace"
> at the GDB prompt, and post the results here.

This is what I get with this recipe for the current tip of the master
branch (commit 06911714ef):

Thread 1 "emacs-27-vcs" hit Breakpoint 3, Fmake_hash_table (
    nargs=nargs@entry=10, args=args@entry=0x7ffffffe3670) at
    fns.c:4530
4530        signal_error ("Invalid hash table rehash size", args[i]);
(gdb) xbacktrace
"read" (0xffffc188)
"char-displayable-p" (0xffffc508)
"startup--setup-quote-display" (0xffffc820)
"command-line" (0xffffd0b8)
"normal-top-level" (0xffffd460)

Note that the error occurs with LC_ALL=de_DE.UTF-8, whereas with
LC_ALL=C or even LC_ALL=en_US.UTF-8 all seems to be fine.


With Emacs 25.3 I get the following, after typing (list-packages) C-j
in the scratch buffer (again, with de_DE.UTF-8 locale):

Debugger entered--Lisp error: (error "Invalid hash table rehash size" 1.0)
  read(#<buffer  *load*>)
  eval-buffer(#<buffer  *load*> nil "/usr/share/emacs/25.3/lisp/finder-inf.el" nil t)  ; Reading at buffer position 39098
  load-with-code-conversion("/usr/share/emacs/25.3/lisp/finder-inf.el" "/usr/share/emacs/25.3/lisp/finder-inf.el" t t)
  require(finder-inf nil t)
  list-packages()
  eval((list-packages) nil)
  elisp--eval-last-sexp(t)
  eval-last-sexp(t)
  eval-print-last-sexp(nil)
  funcall-interactively(eval-print-last-sexp nil)
  call-interactively(eval-print-last-sexp nil nil)
  command-execute(eval-print-last-sexp)



Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Ulrich Mueller-2
> Note that the error occurs with LC_ALL=de_DE.UTF-8, whereas with
> LC_ALL=C or even LC_ALL=en_US.UTF-8 all seems to be fine.

More specifically, the problem seems to be triggered by the LC_NUMERIC
setting.



Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Eli Zaretskii
> Date: Tue, 13 Mar 2018 20:07:20 +0100
> Cc: Eli Zaretskii <[hidden email]>,
>     Mats Lidell <[hidden email]>
> From: Ulrich Mueller <[hidden email]>
>
> > Note that the error occurs with LC_ALL=de_DE.UTF-8, whereas with
> > LC_ALL=C or even LC_ALL=en_US.UTF-8 all seems to be fine.
>
> More specifically, the problem seems to be triggered by the LC_NUMERIC
> setting.

So you are saying that the problems happen when LC_NUMERIC sets a
locale whose decimal dot is not a period?  Is this relevant to 25.3 or
27 (or both)?

Anyway, what does that have to do with fontconfig?  Emacs arranges for
LC_NUMERIC to be "C" at startup (see fixup_locale); does this new
versio0n of fontconfig somehow countermands that?



Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Ulrich Mueller-2
>>>>> On Tue, 13 Mar 2018, Eli Zaretskii wrote:

> So you are saying that the problems happen when LC_NUMERIC sets a
> locale whose decimal dot is not a period?

I cannot say that this is the reason, only that the problem occurs
with de_DE.UTF-8 (and fr_FR.UTF-8 too) but not with en_US.UTF-8.

> Is this relevant to 25.3 or 27 (or both)?

Both.

> Anyway, what does that have to do with fontconfig?  Emacs arranges
> for LC_NUMERIC to be "C" at startup (see fixup_locale); does this
> new versio0n of fontconfig somehow countermands that?

I believe that this line in function FcConfigEnsure is the culprit
(present in 2.13.0 but not in 2.12.6):
https://cgit.freedesktop.org/fontconfig/tree/src/fccfg.c?h=2.13.0#n52

        setlocale (LC_ALL, "");

Patching that code out fixes the problem here.



Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Ulrich Mueller-2
In reply to this post by Mats Lidell-3
Reported to fontconfig upstream:
https://bugs.freedesktop.org/show_bug.cgi?id=105492



Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Eli Zaretskii
In reply to this post by Ulrich Mueller-2
> Date: Tue, 13 Mar 2018 21:06:40 +0100
> Cc: [hidden email],
>     [hidden email]
> From: Ulrich Mueller <[hidden email]>
>
> > Anyway, what does that have to do with fontconfig?  Emacs arranges
> > for LC_NUMERIC to be "C" at startup (see fixup_locale); does this
> > new versio0n of fontconfig somehow countermands that?
>
> I believe that this line in function FcConfigEnsure is the culprit
> (present in 2.13.0 but not in 2.12.6):
> https://cgit.freedesktop.org/fontconfig/tree/src/fccfg.c?h=2.13.0#n52
>
>         setlocale (LC_ALL, "");
>
> Patching that code out fixes the problem here.

OK, thanks.  Can you tell when this code is called from Emacs?  I
don't see any direct calls to FcConfigEnsure in the sources.



Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Ulrich Mueller-2
>>>>> On Wed, 14 Mar 2018, Eli Zaretskii wrote:

> OK, thanks.  Can you tell when this code is called from Emacs?
> I don't see any direct calls to FcConfigEnsure in the sources.

(gdb) bt
#0  FcConfigEnsure ()
    at /var/tmp/portage/media-libs/fontconfig-2.13.0/work/fontconfig-2.13.0/src/fccfg.c:40
#1  0x00007fffeeb2a849 in FcConfigInit ()
    at /var/tmp/portage/media-libs/fontconfig-2.13.0/work/fontconfig-2.13.0/src/fccfg.c:71
#2  0x00007fffeeb37c95 in IA__FcInit ()
    at /var/tmp/portage/media-libs/fontconfig-2.13.0/work/fontconfig-2.13.0/src/fcinit.c:192
#3  0x00007ffff44854b3 in XftInit (config=config@entry=0x0)
    at /var/tmp/portage/x11-libs/libXft-2.3.2/work/libXft-2.3.2/src/xftinit.c:33
#4  0x00000000004ea92b in xg_initialize () at gtkutil.c:5272
#5  0x00000000004d0a13 in x_term_init (
    display_name=display_name@entry=0x2c61b24,
    xrm_option=xrm_option@entry=0x0, resource_name=0x2c676a8 "emacs-27-vcs")
    at xterm.c:12429
#6  0x00000000004d3797 in Fx_open_connection (display=0x2c61b24,
    xrm_string=<optimized out>, must_succeed=0xc180) at xfns.c:5654
[...]



Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Eli Zaretskii
> Date: Wed, 14 Mar 2018 07:48:51 +0100
> Cc: [hidden email],
>     [hidden email]
> From: Ulrich Mueller <[hidden email]>
>
> >>>>> On Wed, 14 Mar 2018, Eli Zaretskii wrote:
>
> > OK, thanks.  Can you tell when this code is called from Emacs?
> > I don't see any direct calls to FcConfigEnsure in the sources.
>
> (gdb) bt
> #0  FcConfigEnsure ()
>     at /var/tmp/portage/media-libs/fontconfig-2.13.0/work/fontconfig-2.13.0/src/fccfg.c:40
> #1  0x00007fffeeb2a849 in FcConfigInit ()
>     at /var/tmp/portage/media-libs/fontconfig-2.13.0/work/fontconfig-2.13.0/src/fccfg.c:71
> #2  0x00007fffeeb37c95 in IA__FcInit ()
>     at /var/tmp/portage/media-libs/fontconfig-2.13.0/work/fontconfig-2.13.0/src/fcinit.c:192
> #3  0x00007ffff44854b3 in XftInit (config=config@entry=0x0)
>     at /var/tmp/portage/x11-libs/libXft-2.3.2/work/libXft-2.3.2/src/xftinit.c:33
> #4  0x00000000004ea92b in xg_initialize () at gtkutil.c:5272
> #5  0x00000000004d0a13 in x_term_init (
>     display_name=display_name@entry=0x2c61b24,
>     xrm_option=xrm_option@entry=0x0, resource_name=0x2c676a8 "emacs-27-vcs")
>     at xterm.c:12429

Thanks.  So the patch below should fix the problem, I think.  Can you
test it?

diff --git a/src/xterm.c b/src/xterm.c
index c5163aa..7b445e5 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -12411,12 +12411,16 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
         unrequest_sigio (); /* See comment in x_display_ok.  */
         gtk_init (&argc, &argv2);
         request_sigio ();
-        fixup_locale ();
 
         g_log_remove_handler ("GLib", id);
 
         xg_initialize ();
 
+ /* Do this after the call to xg_initialize, because when
+   Fontconfig is used, xg_initialize calls its initialization
+   function which in some versions of Fontconfig calls setlocale.  */
+ fixup_locale ();
+
         dpy = DEFAULT_GDK_DISPLAY ();
 
 #if ! GTK_CHECK_VERSION (2, 90, 0)



Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Ulrich Mueller-2
>>>>> On Wed, 14 Mar 2018, Eli Zaretskii wrote:

> Thanks.  So the patch below should fix the problem, I think.  Can you
> test it?

> diff --git a/src/xterm.c b/src/xterm.c
> index c5163aa..7b445e5 100644
> --- a/src/xterm.c
> +++ b/src/xterm.c
> @@ -12411,12 +12411,16 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
>          unrequest_sigio (); /* See comment in x_display_ok.  */
>          gtk_init (&argc, &argv2);
>          request_sigio ();
> -        fixup_locale ();
>
>          g_log_remove_handler ("GLib", id);
>
>          xg_initialize ();
>
> + /* Do this after the call to xg_initialize, because when
> +   Fontconfig is used, xg_initialize calls its initialization
> +   function which in some versions of Fontconfig calls setlocale.  */
> + fixup_locale ();
> +
>          dpy = DEFAULT_GDK_DISPLAY ();
>
>  #if ! GTK_CHECK_VERSION (2, 90, 0)

This fixes the problem (tested with fontconfig-2.13.0).

Note that it has also been fixed in the fontconfig git repository:
https://cgit.freedesktop.org/fontconfig/commit/?id=923b5be626a6e03fbaeee0b5cd6d0246c2f8f36f



Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Eli Zaretskii
> Date: Wed, 14 Mar 2018 18:57:28 +0100
> Cc: [hidden email],
>     [hidden email]
> From: Ulrich Mueller <[hidden email]>
>
> > + /* Do this after the call to xg_initialize, because when
> > +   Fontconfig is used, xg_initialize calls its initialization
> > +   function which in some versions of Fontconfig calls setlocale.  */
> > + fixup_locale ();
> > +
> >          dpy = DEFAULT_GDK_DISPLAY ();
> >
> >  #if ! GTK_CHECK_VERSION (2, 90, 0)
>
> This fixes the problem (tested with fontconfig-2.13.0).

Thanks, pushed to the release branch.

> Note that it has also been fixed in the fontconfig git repository:
> https://cgit.freedesktop.org/fontconfig/commit/?id=923b5be626a6e03fbaeee0b5cd6d0246c2f8f36f

I've seen that.  Does it really fix the problem?  What happens if you
run Emacs like so:

  $ LC_ALL=C emacs -Q

(If this works with the fixed version of fontconfig, then I guess I
completely misunderstand the issue.)

In any case, I think it's good for Emacs to be immune to buggy
versions of fontconfig, especially since we already needed to clean up
after similar problems in gtk_init.

Thanks.



Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Ulrich Mueller-2
>>>>> On Wed, 14 Mar 2018, Eli Zaretskii wrote:

>> Note that it has also been fixed in the fontconfig git repository:
>> https://cgit.freedesktop.org/fontconfig/commit/?id=923b5be626a6e03fbaeee0b5cd6d0246c2f8f36f

> I've seen that.  Does it really fix the problem?  What happens if you
> run Emacs like so:

>   $ LC_ALL=C emacs -Q

> (If this works with the fixed version of fontconfig, then I guess I
> completely misunderstand the issue.)

Indeed, the commit in fontconfig doesn't entirely fix it. While the
above command works (regardless of any other LANG and LC_* settings),
the following combination still fails:

   $ unset LANG LC_ALL
   $ LC_NUMERIC=de_DE.UTF-8 emacs -Q

> In any case, I think it's good for Emacs to be immune to buggy
> versions of fontconfig, especially since we already needed to clean up
> after similar problems in gtk_init.

I agree, especially when the fix comes at no cost.



Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Noam Postavsky
In reply to this post by Eli Zaretskii
tags 30788 fixed
close 30788 26.1
quit

Eli Zaretskii <[hidden email]> writes:

>> Date: Wed, 14 Mar 2018 18:57:28 +0100
>> Cc: [hidden email],
>>     [hidden email]
>> From: Ulrich Mueller <[hidden email]>
>>
>> > + /* Do this after the call to xg_initialize, because when
>> > +   Fontconfig is used, xg_initialize calls its initialization
>> > +   function which in some versions of Fontconfig calls setlocale.  */
>> > + fixup_locale ();
>> > +
>> >          dpy = DEFAULT_GDK_DISPLAY ();
>> >
>> >  #if ! GTK_CHECK_VERSION (2, 90, 0)
>>
>> This fixes the problem (tested with fontconfig-2.13.0).
>
> Thanks, pushed to the release branch.
>
>> Note that it has also been fixed in the fontconfig git repository:
>> https://cgit.freedesktop.org/fontconfig/commit/?id=923b5be626a6e03fbaeee0b5cd6d0246c2f8f36f

Now the setlocale has been removed from the library completely:

https://cgit.freedesktop.org/fontconfig/commit/?id=98eaef69af1350e459bf9c175476d3b772968874



Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Eli Zaretskii
> From: Noam Postavsky <[hidden email]>
> Cc: Ulrich Mueller <[hidden email]>,  [hidden email],  [hidden email]
> Date: Thu, 15 Mar 2018 22:45:09 -0400
>
> > Thanks, pushed to the release branch.
> >
> >> Note that it has also been fixed in the fontconfig git repository:
> >> https://cgit.freedesktop.org/fontconfig/commit/?id=923b5be626a6e03fbaeee0b5cd6d0246c2f8f36f
>
> Now the setlocale has been removed from the library completely:
>
> https://cgit.freedesktop.org/fontconfig/commit/?id=98eaef69af1350e459bf9c175476d3b772968874

As it should have been in the first place.

But we need that call to fixup_locale anyway, the change just moved it
to after xg_initialize.



Reply | Threaded
Open this post in threaded view
|

bug#30788: 27.0.50; Getting 'char-displayable-p: Invalid hash table rehash size: 1.0' when starting emacs -Q

Peter Dyballa
In reply to this post by Mats Lidell-3
Hello!

I am getting the same error after restarting my Mac. Reason was a set of updates for macOS High Sierra, Version 10.13.4. Only the X variant is hit, the NS variant has no problems at all.

Another change that happened recently is an upgrade of fontconfig to version 2.13.0.

The GNU Emacs 27.0.50 source is fetched with command "/usr/bin/git checkout -q 0bddbbc5aae621d5875880ac3e63f68d481df7c3" (whatever this means, the MacPorts package manager associates it with 20170918). The error remains even when re-compiling under the recent situation.

The GNU Emacs 27.0.50 launched weeks before the two updates worked OK with LANG=de_DE.UTF-8 LC_CTYPE=de_DE.UTF-8.


Configured using:
'configure --prefix=/opt/local --without-ns --without-dbus
--without-gconf --without-libotf --without-m17n-flt --without-gpm
--without-gnutls --with-xml2 --with-modules
'--enable-locallisppath=/Library/Application
Support/Emacs/calendar27:/Library/Application Support/Emacs' --infodir
/opt/local/share/info/emacs --with-ns CC=/usr/bin/clang 'CFLAGS=-pipe
-Os -arch x86_64' 'LDFLAGS=-L/opt/local/lib
-Wl,-headerpad_max_install_names -Wl,-no_pie -arch x86_64'
CPPFLAGS=-I/opt/local/include OBJC=/usr/bin/clang 'OBJCFLAGS=-pipe -Os
-arch x86_64''

Configured features:
JPEG RSVG IMAGEMAGICK NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS
MODULES LCMS2

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


--
Greetings

 Pete

"If I can't dance to it, it's not my revolution.“
                                – A t-shirt designed by Jack Frager




12