X Error of failed request: BadLength (poly request too large or internal Xlib length error)

Bug #1852985 reported by S. W.
108
This bug affects 23 people
Affects Status Importance Assigned to Milestone
dwm (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

crashed once in a new branch with some changes plus some .gitignored changes
worked uppon next try
✗ gitk --all
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: 8263
  Current serial number in output stream: 8336

worked before and after these updates between last reboot
Aptitude 0.8.11: log report
Fri, Nov 15 2019 19:58:22 +0100

  IMPORTANT: this log only lists intended actions; actions which fail
  due to dpkg problems may not be completed.

Will install 8 packages, and remove 0 packages.
77.8 kB of disk space will be used
========================================
[UPGRADE] ghostscript:amd64 9.27~dfsg+0-0ubuntu3 -> 9.27~dfsg+0-0ubuntu3.1
[UPGRADE] ghostscript-x:amd64 9.27~dfsg+0-0ubuntu3 -> 9.27~dfsg+0-0ubuntu3.1
[UPGRADE] gnome-terminal:amd64 3.34.0-1ubuntu2 -> 3.34.2-1ubuntu1
[UPGRADE] gnome-terminal-data:amd64 3.34.0-1ubuntu2 -> 3.34.2-1ubuntu1
[UPGRADE] libgs9:amd64 9.27~dfsg+0-0ubuntu3 -> 9.27~dfsg+0-0ubuntu3.1
[UPGRADE] libgs9-common:amd64 9.27~dfsg+0-0ubuntu3 -> 9.27~dfsg+0-0ubuntu3.1
[UPGRADE] linux-firmware:amd64 1.183.1 -> 1.183.2
[UPGRADE] nautilus-extension-gnome-terminal:amd64 3.34.0-1ubuntu2 -> 3.34.2-1ubuntu1
========================================

Log complete.

ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: gitk 1:2.20.1-2ubuntu1
ProcVersionSignature: Ubuntu 5.3.0-23.25-generic 5.3.7
Uname: Linux 5.3.0-23-generic x86_64
ApportVersion: 2.20.11-0ubuntu8.2
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Mon Nov 18 11:27:06 2019
InstallationDate: Installed on 2019-04-02 (230 days ago)
InstallationMedia: Ubuntu 19.04 "Disco Dingo" - Alpha amd64 (20190326.2)
PackageArchitecture: all
SourcePackage: git
UpgradeStatus: Upgraded to eoan on 2019-11-11 (7 days ago)

Revision history for this message
S. W. (sw-diva-e) wrote :
Revision history for this message
S. W. (sw-diva-e) wrote :

when installing fonts-symbola:amd64 2.60-1 according to
https://github.com/LukeSmithxyz/voidrice/issues/242#issuecomment-478303013
it doesn't crash anymore.

Revision history for this message
Pas (pasthelod) wrote :

even with fonts-symbola on ubuntu focal (just full-upgrade-ed), gitk --all crashes on a specific commit (gitk 2.25.1-1ubuntu1)

Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

it looks like there was an icon in a git commit message

Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

I had this same error
gitk crashes
heather@hypothetical-lemon:~/work/maas-ui$ gitk
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: 3048
  Current serial number in output stream: 3118
 sudo apt-get install fonts-symbola
gitk works again

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in git (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel Pirch (dpirch) wrote :

Installing fonts-symbola (2.60-1 on focal) does not fix the problem for me.

Can be be reproduced by running:

git init testrepo
cd testrepo
git commit --allow-empty -m 💎
gitk

Revision history for this message
Jaromir Obr (jaromir-obr) wrote :

Confirmed. If I click to commit 41edf4dfb10586d405eee363daf04814342c955c in master branch in repo https://github.com/codeceptjs/CodeceptJS, I'm getting:
------------
$ 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: 5700
  Current serial number in output stream: 5743

Used SW:
* Ubuntu 20.04.1
* gitk 1:2.25.1-1ubuntu3

Revision history for this message
Maciek Sakrejda (m-sakrejda) wrote :

I'm seeing a very similar issue, but

 * crashes when I select one specific commit in gitk or if I open gitk while that commit is checked out as HEAD (thereby opening to that commit)
 * commit message does *not* have any non-ascii characters

Error message is:

---
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: 5475
  Current serial number in output stream: 5477
---

Versions:
 - Ubuntu 20.04.1
 - gitk 1:2.25.1-1ubuntu3

Revision history for this message
ALU (c-launchpadmail) wrote :

I get this in gitk if a commit has "unprintable" characters like this symbol 🔥 (\xd83d , \xdd25)

Revision history for this message
ALU (c-launchpadmail) wrote :

I got gitk to not crash by installing unifont package. E.g.

sudo apt install unifont

the font isn't displayed in gitk properly (shows up as an empty square) but at least gitk no longer crashes

-----------------
Details of System
VERSION="20.04.1 LTS (Focal Fossa)"

$ dpkg --list gitk
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-=================-============-==============================================================================
ii gitk 1:2.25.1-1ubuntu3 all fast, scalable, distributed revision control system (revision tree visualizer)

Revision history for this message
ALU (c-launchpadmail) wrote :

Unfortunately, gitk is crashing again when it tries to display the symbol "🔥". I don't know why it worked after installing the unifont only to stop working shortly afterwards again.

Revision history for this message
Bernd Kreuss (prof7bit) wrote :

sudo apt purge fonts-noto-color-emoji

Revision history for this message
David (david-in-perth) wrote :

From my research, this appears to be a bug in xorg library "libXft" related to its lack of support for coloured emoji. It's logged as an issue in the libxft project (https://gitlab.freedesktop.org/xorg/lib/libxft/-/issues/6) and has a pending merge request (https://gitlab.freedesktop.org/xorg/lib/libxft/-/merge_requests/1).

Related discussions:
* Bug report on noto-emoji, concluding that it's not a noto-emoji bug: https://github.com/googlefonts/noto-emoji/issues/183
* On the git mailing list: https://www.spinics.net/lists/git/msg379512.html
* On StackExchange: https://unix.stackexchange.com/questions/629281/gitk-crashes-when-viewing-commit-containing-emoji-x-error-of-failed-request-ba/644680#644680

As mentioned by Bernd above, a workaround that seems to work is to uninstall the `fonts-noto-color-emoji` package (`apt remove --purge fonts-noto-color-emoji`).
I can confirm that uninstalling `fonts-noto-color-emoji` resolved the problem for me (on Ubuntu 20.04).

P.S. Since people talked above about emoji in commit messages, it's worth noting that this bug probably triggers from characters anywhere in the commit's diff, even if no such emoji are present in the commit message.

Revision history for this message
Scott Talbert (swt-techie) wrote :

Installing 'unifont' also made the crashes stop for me.

Revision history for this message
PowerKiKi (adrien-crivelli) wrote :

`sudo apt install unifont` and restarting the computer does **not** solve the problem for me, and it can still be reproduced via:

```
git init testrepo
cd testrepo
git commit --allow-empty -m 💎
gitk
```

This might be because I also have manually installed `~/.fonts/NotoColorEmoji.ttf` in order to show color emoji. And the color emoji does show correctly in terminal (see attachment), but it will still crash gitk.

Revision history for this message
Tiago Carreira (tcarreira) wrote :

I confirm `sudo apt purge fonts-noto-color-emoji` did fix this issue for me.
`sudo apt install unifont` did NOT solve it

I'm on Kubuntu 20.04 if that matters

Revision history for this message
Marco Altieri (marco.altieri) wrote :

I can confirm that `sudo apt purge fonts-noto-color-emoji` solved the problem for me too.
I am on Ubuntu 20.04.

Revision history for this message
Marc Schmitt (marc-schmitt) wrote :

I hit this problem today (Ubuntu 20.04.03, fully updated) out of the blue. My Python Tkinter program started crashing at startup immediately with the reported error.

The problem disappeared the moment I ran the `sudo apt purge fonts-noto-color-emoji`. Thanks!

Revision history for this message
Paul Van Besien (paulvb86) wrote :

ubuntu 20.04 solved by doing `sudo apt purge fonts-noto-color-emoji`

Revision history for this message
Saverio Miroddi (64kramsystem) wrote (last edit ):

I've found that this bugs affects applications other than gitk.

I'm developing an FLTK application in Rust, and I get the same problem when my app displays a list of emojis (via hold browser widget).

Regarding the solutions:

- installing `unifonts` had no effect
- installing `fonts-symbola` had no effect
- uninstalling `fonts-noto-color-emoji` solved the problem, although the emojis are printed in black and white, and are very difficult to recognize; additionally, it breaks other apps (e.g. MATE terminal)

I'm on Ubuntu MATE 20.04.4, for reference.

Revision history for this message
Vallabh Kansagara (vrkansagara) wrote :

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: 4696
  Current serial number in output stream: 4699

Having issue with

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal

ii libx11-xcb-dev:amd64 2:1.6.9-2ubuntu1.2 amd64 Xlib/XCB interface library (development headers)
ii libx11-xcb1:amd64 2:1.6.9-2ubuntu1.2 amd64 Xlib/XCB interface library

affects: git (Ubuntu) → dwm (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.