ch11ng/exwm

Fail to start or exit exwm guix: wrong-type-argument: (integer-or-marker-p nil))

WorldsEndless opened this issue · 2 comments

I am using guix. I have tried the built-in exwm in guix,, as well as custom ones, as well as just plain old running it from gnome. I seem to get errors like this no matter what, be it exwm-start, exwm-exit, or exwm-workspace-switch:

wrong-type-argument: (integer-or-marker-p nil))

System: Guix
Emacs version 28.1

xrandr --version
xrandr program version 1.5.1
Server reports RandR version 1.6

Note that I have three monitors, which are reported as seen by xrandr, and work fine in gnome and before guix in exwm.

Here is a full stack trace on the error after attempting exwm-exit:

Debugger entered--Lisp error: (cl-no-applicable-method xcb:-+request nil #<xcb:SetInputFocus xcb:SetInputFocus-24cb8c8>)
  signal(cl-no-applicable-method (xcb:-+request nil #<xcb:SetInputFocus xcb:SetInputFocus-24cb8c8>))
  cl-no-applicable-method(#s(cl--generic :name xcb:-+request :dispatches ((1 #s(cl--generic-generalizer :name cl--generic-t-generalizer :priority 0 :tagcode-function #f(compiled-function (name &rest _) #<bytecode -0x1cba9713a96764e4>) :specializers-function #f(compiled-function (tag &rest _) #<bytecode -0x2b7bed08469105e>))) (0 #s(cl--generic-generalizer :name eieio--generic-generalizer :priority 50 :tagcode-function cl--generic-struct-tag :specializers-function #f(compiled-function (tag &rest _) #<bytecode 0x8e9ab25330e636a>)) #s(cl--generic-generalizer :name cl--generic-t-generalizer :priority 0 :tagcode-function #f(compiled-function (name &rest _) #<bytecode -0x1cba9713a96764e4>) :specializers-function #f(compiled-function (tag &rest _) #<bytecode -0x2b7bed08469105e>)))) :method-table (#s(cl--generic-method :specializers (xcb:connection t) :qualifiers nil :uses-cnm nil :function #f(compiled-function (obj request) #<bytecode -0x1d924a81b0d67bda>))) :options nil) nil #<xcb:SetInputFocus xcb:SetInputFocus-24cb8c8>)
  apply(cl-no-applicable-method #s(cl--generic :name xcb:-+request :dispatches ((1 #s(cl--generic-generalizer :name cl--generic-t-generalizer :priority 0 :tagcode-function #f(compiled-function (name &rest _) #<bytecode -0x1cba9713a96764e4>) :specializers-function #f(compiled-function (tag &rest _) #<bytecode -0x2b7bed08469105e>))) (0 #s(cl--generic-generalizer :name eieio--generic-generalizer :priority 50 :tagcode-function cl--generic-struct-tag :specializers-function #f(compiled-function (tag &rest _) #<bytecode 0x8e9ab25330e636a>)) #s(cl--generic-generalizer :name cl--generic-t-generalizer :priority 0 :tagcode-function #f(compiled-function (name &rest _) #<bytecode -0x1cba9713a96764e4>) :specializers-function #f(compiled-function (tag &rest _) #<bytecode -0x2b7bed08469105e>)))) :method-table (#s(cl--generic-method :specializers (xcb:connection t) :qualifiers nil :uses-cnm nil :function #f(compiled-function (obj request) #<bytecode -0x1d924a81b0d67bda>))) :options nil) (nil #<xcb:SetInputFocus xcb:SetInputFocus-24cb8c8>))
  #f(compiled-function (&rest args) #<bytecode -0x134c9b40942ed8e1>)(nil #<xcb:SetInputFocus xcb:SetInputFocus-24cb8c8>)
  apply(#f(compiled-function (&rest args) #<bytecode -0x134c9b40942ed8e1>) nil #<xcb:SetInputFocus xcb:SetInputFocus-24cb8c8>)
  xcb:-+request(nil #<xcb:SetInputFocus xcb:SetInputFocus-24cb8c8>)
  exwm-input--exit()
  exwm-exit()
  funcall-interactively(exwm-exit)
  call-interactively(exwm-exit record nil)
  command-execute(exwm-exit record)
  execute-extended-command(nil "exwm-exit" nil)
  funcall-interactively(execute-extended-command nil "exwm-exit" nil)
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)

I have tracked this down through the stack trace to be exwm-workspace--prompt-for-workspace since there are no exwm workspaces, even after I try exwm-add-workspace.

SOLVED! I continued to C-x e my way through the stack trace until I found the problem line:

(exwm-floating--init) gives the error, because:

    exwm-floating--cursor-bottom-right
    `(xcb:cursor:load-cursor exwm--connection "bottom_right_corner")` ;; nil

Then I tracked it down. I use a custom theme for my cursors, which I had almost forgotten about, but then investigated my cursor theme location at `/home/userme/.icons/Scraft/cursors/bottom_right_corner , which the cursor theme I'm using did not have, and the fill-in patch link I had made was broken when I did system recoveries to get to guix, the correction softlink was lost and that broke my exwm! Fix: copy another of the icon files over (doesn't matter which) -- and the error is gone!

The take-away for readers is to step through the stack-trace of failures like exwm-exit and follow them with C-. and C-,until locating exactly which line is giving the error from above, changing necessary let scaffolding to (setq ...) so that you can follow the trace.