Bug 36601 - spice-client crashes in fluxbox
Summary: spice-client crashes in fluxbox
Status: RESOLVED WONTFIX
Alias: None
Product: Spice
Classification: Unclassified
Component: spicec (deprecated) (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium major
Assignee: Spice Bug List
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-26 00:44 UTC by mhasko
Modified: 2015-06-19 17:39 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description mhasko 2011-04-26 00:44:33 UTC
Description of problem:
spice-client crashes in fluxbox window manager (from EPEL)

Version-Release number of selected component (if applicable):
$ rpm -q spice-client fluxbox xorg-x11-server-Xorg xorg-x11-xdm
spice-client-0.8.0-2.el6.x86_64
fluxbox-1.1.1-5.el6.x86_64
xorg-x11-server-Xorg-1.7.7-28.el6.x86_64
xorg-x11-xdm-1.1.6-14.1.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
$ spicec -h <hostname> -p <port>

Actual results:
Error: x error on display :0.0 error BadMatch (invalid parameter attributes)
minor 0 request X_SetInputFocus

Expected results:
spice client should work
Comment 1 Peter Rabbitson 2012-11-09 18:00:05 UTC
This bug still persists on a freshly compiled spicec from current master (4e7d25a7ac). Please let me know how can I asist in getting to the bottom of this. Changing a WM is not a course I'd like to pursue.

Cheers

$ ./client/spicec --host 192.168.58.165 --port 5900
Error: x error on display :0.0 error BadMatch (invalid parameter attributes) minor 0 request X_SetInputFocus

$ ldd client/spicec 
	linux-gate.so.1 =>  (0xf773f000)
	libasound.so.2 => /usr/lib/i386-linux-gnu/libasound.so.2 (0xf762e000)
	libcelt051.so.0 => /usr/local/lib/libcelt051.so.0 (0xf761f000)
	libjpeg.so.8 => /usr/lib/i386-linux-gnu/libjpeg.so.8 (0xf75e5000)
	libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xf75d3000)
	libXrender.so.1 => /usr/lib/i386-linux-gnu/libXrender.so.1 (0xf75ca000)
	libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf7492000)
	libpixman-1.so.0 => /usr/lib/i386-linux-gnu/libpixman-1.so.0 (0xf73fb000)
	librt.so.1 => /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xf73f1000)
	libssl.so.1.0.0 => /usr/lib/i386-linux-gnu/i686/cmov/libssl.so.1.0.0 (0xf739a000)
	libcrypto.so.1.0.0 => /usr/lib/i386-linux-gnu/i686/cmov/libcrypto.so.1.0.0 (0xf71db000)
	libXfixes.so.3 => /usr/lib/i386-linux-gnu/libXfixes.so.3 (0xf71d5000)
	libXrandr.so.2 => /usr/lib/i386-linux-gnu/libXrandr.so.2 (0xf71cd000)
	libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xf71b3000)
	libXinerama.so.1 => /usr/lib/i386-linux-gnu/libXinerama.so.1 (0xf71b0000)
	libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf70c4000)
	libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xf709e000)
	libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf7081000)
	libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xf7067000)
	libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xf6f0a000)
	libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xf6f06000)
	libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf6ee3000)
	/lib/ld-linux.so.2 (0xf7740000)
	libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf6edf000)
	libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf6ed9000)
Comment 2 Christophe Fergeau 2012-11-12 15:46:27 UTC
I'd recommend to switch to remote-viewer (from the virt-viewer package) as this is the client we support.
Comment 3 Alon Levy 2012-11-13 11:00:40 UTC
I second that recommendation. If you want to try to fix this, this seems to be the only place where we do a XSetInputFocus: (client/x11/red_window.cpp)

void RedWindow::activate()
{
    //todo: use _NET_ACTIVE_WINDOW
    XSetInputFocus(x_display, _win, RevertToParent, CurrentTime);
    /* kwin won't raise on focus */
    XRaiseWindow(x_display, _win);
}
Comment 4 Alex Efros 2012-12-23 16:28:55 UTC
Just hit same bug. Looks like it works ok when executed under strace. Maybe it just doing something "too fast"? :-/
Comment 5 Alex Efros 2012-12-23 16:48:04 UTC
(In reply to comment #4)
> Just hit same bug. Looks like it works ok when executed under strace. Maybe
> it just doing something "too fast"? :-/

From http://lxpanel.sourcearchive.com/documentation/0.5.5-1/taskbar_8c-source.html

      /* There is a race condition between the X server actually executing the XMapRaised and this code executing XSetInputFocus.
       * If the window is not viewable, the XSetInputFocus will fail with BadMatch. */

Actually, looks like commenting this line fix this issue. It's a VM window, we anyway many times enter/leave it, having to click before use isn't a big deal.
Comment 6 Victor Toso 2015-06-19 17:39:45 UTC
spicec is deprecated.

If you hit this bug, we highly recommended virt-viewer

http://virt-manager.org/download/
http://www.spice-space.org/download.html


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.