I faced with problem while running tkinter program on manjaro. Here the minimal reproducable example:
#test.py
from tkinter import *
win=Tk()
lbl=Label(win)
win.mainloop()
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?
It seems like a number of different scenarios all point back to that roughly:
Also maybe check that libxft is installed … and possibly try AUR (en) - libxft-bgra
Though I thought that was more for ‘suckless’ type things needing a patch.
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.