GNU bug report logs -
#30874
Displaying char \x274C with Dejavu Sans Mono gives "X protocol error: BadLength (poly request too large or internal Xlib length error) on protocol request 138"
Previous Next
Reported by: Jan Synacek <jsynacek <at> redhat.com>
Date: Tue, 20 Mar 2018 10:26:01 UTC
Severity: important
Tags: fixed
Merged with 30045,
31547,
31758,
31801,
31936
Found in versions 26.1, 27.0.50, 25.3
Fixed in version 26.2
Done: Robert Pluim <rpluim <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #94 received at 30874 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> Yes, it's called gc_in_progress.
Iʼm testing the following, which fixes the 20890 crash for me when
using Cairo.
diff --git i/src/ftfont.c w/src/ftfont.c
index c2e093e633..89c07e1f21 100644
--- i/src/ftfont.c
+++ w/src/ftfont.c
@@ -1242,6 +1242,11 @@ ftfont_close (struct font *font)
struct ftfont_info *ftfont_info = (struct ftfont_info *) font;
Lisp_Object val, cache;
+#ifdef USE_CAIRO
+ /* Bug#20890 workaround. */
+ if (gc_in_progress)
+ return;
+#endif
val = Fcons (font->props[FONT_FILE_INDEX], make_number (ftfont_info->index));
cache = ftfont_lookup_cache (val, FTFONT_CACHE_FOR_FACE);
eassert (CONSP (cache));
> I'm not sure it's about the font, it could be about some glyphs of the
> font. You are probably right, but IME leaving a variable to get back
> previous behavior is good policy; at the very least, it makes it easy
> to ask users who complain about related problems to see if this
> particular change is the culprit without having to rebuild Emacs.
>
>> > Also, we should probably condition this by HAVE_XFT, since AFAIU the
>> > problem is only relevant to that build?
This is what Iʼm using at the moment. I can put the variable in
syms_of_xftfont if you prefer.
diff --git i/src/ftfont.c w/src/ftfont.c
index c2e093e633..2190186940 100644
--- i/src/ftfont.c
+++ w/src/ftfont.c
@@ -764,6 +764,13 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots
if (scalable >= 0
&& ! FcPatternAddBool (pattern, FC_SCALABLE, scalable ? FcTrue : FcFalse))
goto err;
+#ifdef HAVE_XFT
+ /* We really don't like color fonts, they cause Xft crashes. See
+ bug#30874. */
+ if (Vxft_ignore_color_fonts
+ && ! FcPatternAddBool(pattern, FC_COLOR, FcFalse))
+ goto err;
+#endif
goto finish;
@@ -2735,6 +2742,14 @@ syms_of_ftfont (void)
DEFSYM (Qsans, "sans");
DEFSYM (Qsans__serif, "sans serif");
+#ifdef HAVE_XFT
+ DEFVAR_BOOL ("xft-ignore-color-fonts",
+ Vxft_ignore_color_fonts,
+ doc: /* Non-nil means don't query fontconfig for color fonts,
+since they often cause Xft crashes. bug#30874. */);
+ Vxft_ignore_color_fonts = 1;
+#endif
+
staticpro (&freetype_font_cache);
freetype_font_cache = list1 (Qt);
This bug report was last modified 6 years and 164 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.