Re: [STUMP] Bug: Stumpwm crashes when raising a VirtualBox VM window

Ernesto Alfonso <[email protected]>
Newsgroups gmane.comp.window-managers.stumpwm.devel
Message-ID <CAOckuXA_SFT_R+S6VzQQeYM26YLN7oM_CRp5Q+OU1prBC=4_PA@mail.gmail.com>
After digging into this further, I discovered that my VirtualBox "host key"
(normally right Ctrl) was also mapped into my stumpwm's *top-map*, so I
guess that both VirtualBox and stumpwm were trying to gain exclusive
acccess, causing the "xlib:access-error".

I worked around this by one or more of the following:
1) Comment out the '(throw :top-level :quit)' in the error-handler function
of stumpwm.lisp. Without further workarounds, this will cause VirtualBox to
completely steal the keyboard, requiring it to be killed through another
tty to regain control of stumpwm.
2) Change VirtualBox Host key to something not mapped in my *top-map* (in
this case, I used leftshift+rightshit).
3) Disable the Auto Capture Keyboard option in the same menu




On Sun, Oct 26, 2014 at 9:59 AM, Ernesto Alfonso <[email protected]> wrote:

> Stumpwm crashes when raising VirtualBox VM
>
> Stumpwm always crashes when raising a VirtualBox VM via a key shortcut,
> logging:
> "Another window manager is running."
>
> After redefining 'error-handler' to log the 'error-key', 'key-vals' as
> follows:
>
> (defun error-handler (display error-key &rest key-vals &key asynchronous
> &allow-other-keys)
>   "Handle X errors"
>   (cond
>     ;; 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))
>      (throw :top-level :quit))
>      ;; all other asynchronous errors are printed.
>      (asynchronous
>       (message "Caught Asynchronous X Error: ~s ~s" error-key key-vals))
>      (t
>       (apply 'error error-key :display display :error-key error-key
> key-vals))))
>
> I can see the X error that is being generated:
>
> Another window manager is running.
> XLIB:ACCESS-ERROR
> (:ASYNCHRONOUS T :CURRENT-SEQUENCE 28975 :MAJOR 33 :MINOR 0 :SEQUENCE
> 27255)
> xinit: connection to X server lost
>
>
> Steps to reproduce:
>
> 1) Using Debian Wheezy 7.6
> 2) Using VirtualBox 4.1.18_Debian_r78361
> 3) Start any virtual machine
> 4) Start firefox
> 5) Raise the VM while firefox is raised
> 6) Enjoy the crash
>
> Curiously, this doesn't seem to happen when switching from certain other
> windows to the VM, eg terminal->VM, or emacs->VM. It only seems to happen
> when switching from firefox->VM.
>
> Of course, there may be many more ways to reproduce this, but this is one.
>

_______________________________________________
Stumpwm-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.