Re: [dev] [st] BadLength

From: Markus Wichmann <nullplan_AT_gmx.net>
Date: Wed, 20 May 2020 13:18:19 +0200

On Wed, May 20, 2020 at 12:24:00PM +1000, Александр Рянин wrote:
> I use Arch Linux, dwm and st. Got st through the git clone. Got it without patches. Just make && sudo make install. When trying to run mutt st falls with an error output:
>
> $ st
> erresc: unknown csi ESC[22;0;0t
> erresc: unknown csi ESC[23;0;0t
> erresc: unknown csi ESC[22;0;0t
> erresc: unknown csi ESC[23;0;0t
> erresc: unknown csi ESC[22;0;0t
> erresc: unknown csi ESC[23;0;0t
> erresc: unknown csi ESC[22;0;0t
> X Error of failed request: BadLength (poly request too large or internal Xlib length error)
> Major opcode of failed request: 139 (RENDER)
> Minor opcode of failed request: 20 (RenderAddGlyphs)
> Serial number of failed request: 9282
> Current serial number in output stream: 9354
>
> What's that supposed to mean and how do we fix it to make st work steadily?
>

That would be the well-known Xft bug in conjunction with color emoji.
Only known bug fix is to prevent Xft from seeing fonts with color emoji.
This can be done by uninstalling the relevant fonts. Or else you might
wish to research fontconfig.

I wanted to do neither, and since tilix was installed on this machine by
default, I simply switched to using it for mutt, though I keep st for
most other things requiring a terminal emulator. BTW, don't use tilix,
it is an ungodly mess written in D of all languages, basically using the
backend of gnome-terminal, but dynamically loading it, so the source
code doesn't even contain the core logic.

It appears to me that on Linux, only ca. three ways to render fonts
remain: One is to use xlib and its fonts, but this does not work very
well with Unicode. Then there is Xft and fontconfig, requiring XML
config files, and while it does work well in many cases, Xft has had
this particular bug open for ages and they fail to do anything about it.
And finally, you can use Pango, Cairo, Pangocairo, GDK, and whatever
else you need to keep this stack stable. And all of that stuff is
basically C++ without the compiler support, thus managing to be worse
than C++. But at least it's fully featured, and more to the point,
doesn't crash on arbitrary inputs. At least I think it doesn't.

All software sucks.

Ciao,
Markus
Received on Wed May 20 2020 - 13:18:19 CEST

This archive was generated by hypermail 2.3.0 : Wed May 20 2020 - 13:24:11 CEST