This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients epaine, ezio.melotti, ned.deily, ronaldoussoren, serhiy.storchaka, terry.reedy, vstinner
Date 2020-11-03.17:00:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1604422822.37.0.525813424132.issue42225@roundup.psfhosted.org>
In-reply-to
Content
The following program fails with:
---
X Error of failed request:  BadLength (poly request too large or internal Xlib length error)
  Major opcode of failed request:  138 (RENDER)
  Minor opcode of failed request:  20 (RenderAddGlyphs)
  Serial number of failed request:  4248
  Current serial number in output stream:  4956
---

Python program:
---
from tkinter import Tk
from tkinter.scrolledtext import ScrolledText
root = Tk()
text = ScrolledText(root, width=80, height=40)
text.pack()

for i in range(0x10000, 0x40000, 32):
    chars = ''.join(chr(i+j) for j in range(32))
    text.insert('insert', f"{hex(i)} {chars}\n")

input("Press enter to exit")
---

It seems like the first character which triggers this RenderAddGlyphs BadLength issue is: U+1f6c2. See attached emoji.png screenshot. As you can see, some emojis are rendered in color in Gnome Terminal. I guess that it uses the Gtk 3 pango library to render these characters.
History
Date User Action Args
2020-11-03 17:00:22vstinnersetrecipients: + vstinner, terry.reedy, ronaldoussoren, ned.deily, ezio.melotti, serhiy.storchaka, epaine
2020-11-03 17:00:22vstinnersetmessageid: <1604422822.37.0.525813424132.issue42225@roundup.psfhosted.org>
2020-11-03 17:00:22vstinnerlinkissue42225 messages
2020-11-03 17:00:22vstinnercreate