XLIB:ACCESS-ERROR, Virtualbox "auto-capture keyboard" option crashes stumpwm

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

XLIB:ACCESS-ERROR, Virtualbox "auto-capture keyboard" option crashes stumpwm

Ernesto Alfonso

Virtualbox "auto-capture keyboard" option in the enabled state crashes stumpwm. The message "another window manager is running" is printed by the stumpwm process and stumpwm attempts a restart.

;;previous and current window
(NIL #S(TILE-WINDOW "my-virtualbox-vm [Running] - Oracle VM VirtualBox" #x1400002))
Another window manager is running.

I've successfully worked around the issue by:

1. Disabling "auto-caputre keyboard" option in Virtualbox
2. Redefining the "error-handler" function as below to both comment out the (throw :top-level :quit) to prevent crash, and to print some more debugging info:

(defun error-handler (display error-key &rest key-vals &key asynchronous &allow-other-keys)
  "Handle X errors"
    ;; ignore asynchronous window errors
    ((and asynchronous
          (find error-key '(xlib:window-error xlib:drawable-error xlib:match-error)))
     (dformat 4 "Ignoring error: ~s~%" error-key))
    ((eq error-key 'xlib:access-error)
     (write-line "Another window manager is running.")
     (write-line (prin1-to-string error-key) )
     (write-line (prin1-to-string key-vals))
     (and (boundp 'ab) (write-line (prin1-to-string ab)))
     ;(throw :top-level :quit)
     ;; all other asynchronous errors are printed.
      (message "Caught Asynchronous X Error: ~s ~s" error-key key-vals))
      (apply 'error error-key :display display :error-key error-key key-vals))))

I'm not familiar enough with the X protocol or whatever Virtualbox might be doing with it to understand what is causing this problem, but I'm pretty sure stumpwm shouldn't crash in this case. It doesn't seem like it's Virtualbox' fault since other window managers don't crash with virtualbox (eg gnome).

Does anyone have an idea of what is going on?



Stumpwm-devel mailing list
[hidden email]