regolith-linux / regolith-st

Suckless simple terminal (st) for Regolith Linux
6 stars 2 forks source link

terminal crashes when rendering emoji #14

Open crclark96 opened 4 years ago

crclark96 commented 4 years ago

I encountered this bug when rendering the :whale: emoji. The following error is displayed in the parent process - the child process exits completely.

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:  868

  Current serial number in output stream:  1177

Here is my package information:

Package: regolith-st
Version: 0.8.2-1ubuntu20ppa5
Priority: optional
Section: x11
Maintainer: Paride Legovini <pl@ninthfloor.org>
Installed-Size: 115 kB
Provides: x-terminal-emulator
Depends: libc6 (>= 2.17), libfontconfig1 (>= 2.12.6), libx11-6, libxft2 (>> 2.1.1), ncurses-term, fonts-noto-color-emoji
Download-Size: 37.5 kB
APT-Manual-Installed: yes
APT-Sources: http://ppa.launchpad.net/regolith-linux/release/ubuntu bionic/main amd64 Packages
Description: simple terminal emulator for X
 st is a terminal emulator from the suckless project with a focus on
 simplicity, clarity and frugality. The project's philosophy is about
 keeping things simple, minimal and usable.
 .
 st supports most VT10X escape sequences, serial lines, XIM, utmp via
 utmp(1), clipboard handling, mouse and keyboard shortcuts, UTF-8, wide
 characters, resize, 256 colors, true colors, antialiased fonts (using
 fontconfig), fallback fonts, and line drawing. It does *not* provide
 a scrollback buffer: users are encouraged to use a terminal multiplexter.
 .
 This Debian package is called 'stterm' for historical reasons.

I am using ubuntu-18.04. This error does not occur with vanilla st, who merely does not render the emoji, but does not close the terminal window. I believe this error may be caused by one of the regolith-specific patches. This is different than issue #6 - I have fonts-noto-color-emoji listed as a dependency and installed.

kgilmer commented 4 years ago

Hi @crclark96 , thanks for the detailed report. I am unable to reproduce the crash. I created a file w/ a non terminal editor and pasted the emoji character from https://emojipedia.org/whale/ into it, saved, and then ran cat test.txt w/ the character. The terminal does not print the whale but also does not crash. I am also on 18.04 /w the same version of st. Can you provide any details that may help me reproduce?

crclark96 commented 4 years ago

Here's my version numbers:

➜ xdpyinfo | grep version
version number:    11.0
X.Org version: 1.20.4

If you run the terminal executable from within another terminal window does it also give the same error message?

rtfeldman commented 4 years ago

I'm also seeing this crash!

➜  ~ xdpyinfo | grep version
version number:    11.0
X.Org version: 1.20.5

According to https://github.com/LukeSmithxyz/voidrice/issues/284 this is a longstanding recurring issue with st.

kgilmer commented 4 years ago

thanks for the link @rtfeldman , that's very helpful. It seems that we can also resolve this in Regolith by depending on a mono emoji font and and specifying that as the fallback font via the font2 patch. Can anyone provide a file w/ the characters that are producing crashes for testing?

hiddeco commented 4 years ago

curl https://gist.githubusercontent.com/hiddeco/05deff0fa5e9278ee2e394883154492e/raw/c3407fdae665d878493c4b5726ca824bee4b13a3/emoji-crash should do.

kgilmer commented 4 years ago

Thanks @hiddeco . Verified that you STR works in Regolith 1.4.1 w/ gnome-terminal (new default xterm).

acaloiaro commented 4 years ago

FYI for anyone seeking a brief workaround, you can sudo apt install fonts-symbola, which will act as a fallback for missing emoji fonts.

frikiluser commented 4 years ago

FYI for anyone seeking a brief workaround, you can sudo apt install fonts-symbola, which will act as a fallback for missing emoji fonts.

Reproduced same problem on Debian. Works again after installing fonts-symbola :bell: