I faced with problem while running tkinter program on manjaro. Here the minimal reproducable example:
from tkinter import *
After running the next error occurs:
$ python3 test.py
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: 38
Current serial number in output stream: 47
Running the same code without label creation works fine and shows tkinter window. The same error occurs with creating Button, Entry ets.
While googling I found several similar issues, but I still dont understand, how to fix that.
Any ideas, what can be cause this error?
Thanks a lot! Due to your answer i have found the solution.
Firstly I have installed libxft. This post from your second link said that the problem is in the colored-emoji fonts. I remembered, that one time I did steps from some tutorial to enable emoji in terminal. I go to the /etc/fonts/ and found file local.conf with the next content:
After deleting it and rebooting, tkinter works fine. Also this fixed the problem with font of numbers – with such local.conf they showed as emoji.
For correct emoji settings above post also proposes this tutorial, which works for me.