Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: [XELB: ICCCM] Unsupported encoding #915

Open
meditans opened this issue Jul 16, 2023 · 1 comment
Open

error: [XELB: ICCCM] Unsupported encoding #915

meditans opened this issue Jul 16, 2023 · 1 comment
Labels

Comments

@meditans
Copy link

Hey, I get this error when launching a pygame script in vterm (using exwm), doom emacs 29. The expected behavior is that a window is opened, the actual behavior is that the shell freezes and I get this in *XELB-DEBUG*:

  backtrace()
  #f(compiled-function (&rest _) #<bytecode 0x1e985ddf5bf1e026>)(error (error "[XELB:ICCCM] Unsupported encoding: 1268"))
  error("[XELB:ICCCM] Unsupported encoding: %d" 1268)
  #f(compiled-function (cl--cnm obj byte-array) #<bytecode 0x12514d627156687a>)(#f(compiled-function (&rest args) #<bytecode 0x11d903307a75c564>) #<xcb:icccm:get-WM_NAME~reply xcb:icccm:get-WM_NAME~reply-c9bef12> [1 8 26 106 4 0 0 0 244 4 0 0 0 0 0 0 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 112 121 103 97 109 101 32 119 105 110 100 111 119 0 0 0])
  apply(#f(compiled-function (cl--cnm obj byte-array) #<bytecode 0x12514d627156687a>) #f(compiled-function (&rest args) #<bytecode 0x11d903307a75c564>) (#<xcb:icccm:get-WM_NAME~reply xcb:icccm:get-WM_NAME~reply-c9bef12> [1 8 26 106 4 0 0 0 244 4 0 0 0 0 0 0 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 112 121 103 97 109 101 32 119 105 110 100 111 119 0 0 0]))
  #f(compiled-function (obj byte-array) "Fill in the fields in the reply of ICCCM GetProperty (text) request OBJ\naccording to BYTE-ARRAY.\n\nThis method automatically decodes the value (as string)." #<bytecode -0x148b66b4697bfb79>)(#<xcb:icccm:get-WM_NAME~reply xcb:icccm:get-WM_NAME~reply-c9bef12> [1 8 26 106 4 0 0 0 244 4 0 0 0 0 0 0 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 112 121 103 97 109 101 32 119 105 110 100 111 119 0 0 0])
  apply(#f(compiled-function (obj byte-array) "Fill in the fields in the reply of ICCCM GetProperty (text) request OBJ\naccording to BYTE-ARRAY.\n\nThis method automatically decodes the value (as string)." #<bytecode -0x148b66b4697bfb79>) #<xcb:icccm:get-WM_NAME~reply xcb:icccm:get-WM_NAME~reply-c9bef12> [1 8 26 106 4 0 0 0 244 4 0 0 0 0 0 0 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 112 121 103 97 109 101 32 119 105 110 100 111 119 0 0 0])
  xcb:unmarshal(#<xcb:icccm:get-WM_NAME~reply xcb:icccm:get-WM_NAME~reply-c9bef12> [1 8 26 106 4 0 0 0 244 4 0 0 0 0 0 0 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 112 121 103 97 109 101 32 119 105 110 100 111 119 0 0 0])
  #f(compiled-function (obj sequence &optional multiple) #<bytecode 0x18805905b7bdb8c1>)(#<xcb:connection xcb:connection-1a3119e> 27162 nil)
  apply(#f(compiled-function (obj sequence &optional multiple) #<bytecode 0x18805905b7bdb8c1>) #<xcb:connection xcb:connection-1a3119e> (27162 nil))
  xcb:-+reply(#<xcb:connection xcb:connection-1a3119e> 27162 nil)
  exwm--update-ctext-title(27262980)
  exwm--update-title(27262980)
  exwm-manage--manage-window(27262980)
  exwm-manage--on-MapRequest([20 0 14 106 157 7 0 0 4 0 160 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] nil)
  #f(compiled-function (conn) "Process cached events." #<bytecode -0x18e9b50b7f3927ba>)(#<xcb:connection xcb:connection-1a3119e>)
  apply(#f(compiled-function (conn) "Process cached events." #<bytecode -0x18e9b50b7f3927ba>) #<xcb:connection xcb:connection-1a3119e> nil)
  xcb:-process-events(#<xcb:connection xcb:connection-1a3119e>)
  xcb:-connection-filter(#<process XELB> "\27\0\16j\235\7\0\0\4\0\240\1\0\0\0\0\f\3,\1h\1\340\1\0\0@\0\0\0\0\0\24\0\16j\235\7\0\0\4\0\240\1\0\0\0\0\0\0...")

I'm unsure how to debug this further. Any idea?

@medranocalvo
Copy link
Collaborator

Thank you for taking the time to report this failure.

The backtrace is quite helpful: we see that we ask for the WM_NAME property and we get back a reply with an "unknown encoding". Looking at xcb-icccm.el ((cl-defmethod xcb:unmarshal ((obj xcb:icccm:-GetProperty-text~reply)), we see that xcb:Atom:UTF8_STRING, xcb:Atom:STRING, xcb:Atom:COMPOUND_TEXT, xcb:Atom:TEXT and xcb:Atom:C_STRING are recognized.

What's atom 1268!? Is EXWM not doing something expected, or is the program doing something unexpected? See https://tronche.com/gui/x/icccm/sec-4.html#s-4.1.2.1 which leads us to https://tronche.com/gui/x/icccm/sec-2.html#s-2.7.1. XELB requests does not request the property in any particular encoding, so the owner gets to choose.

Please, launch this program in in Xephyr and use xprop to see what's in this property:

Xephyr :123 &
DISPLAY=:123 ./myapp &
xprop 

Then click on your app's X window and post the output here (remove sensitive information, we are mainly interested in WM_NAME).

I'm expecting https://stackoverflow.com/questions/7296302/x11-xm-name-type-is-utf-8-rather-than-string-utf8, but let's see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants