Bug 1154719 - copy/paste images does not work when building spice-gtk from upstream
Summary: copy/paste images does not work when building spice-gtk from upstream
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: spice-gtk
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Christophe Fergeau
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1161081
TreeView+ depends on / blocked
 
Reported: 2014-10-20 15:27 UTC by Swapna Krishnan
Modified: 2014-11-06 11:02 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
: 1161081 (view as bug list)
Environment:
Last Closed: 2014-10-29 13:37:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Swapna Krishnan 2014-10-20 15:27:16 UTC
Description of problem:
When I build spice-gtk from upstream and use it in smoketest, copy/paste of images from client to guest fail with being unable to copy the images. 

The same tests pass from guest to client.

Version-Release number of selected component (if applicable):
Built spice-gtk from latest upstream => spice-gtk 0.25.48-af73-dirty
spice-gtk-python-0.22-7.el6.x86_64
spice-vdagent-0.14.0-4.el6.x86_64
spice-server-0.12.4-11.el6.x86_64
spice-glib-0.22-7.el6.x86_64
qemu-kvm-0.12.1.2-2.445.el6.x86_64
xorg-x11-drv-qxl-0.1.1-15.el6.x86_64
spice-vdagent-0.14.0-4.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Open guest with virt-viewer and spice-gtk (built from upstream) by LD_LIBRARY_PATH=/usr/local/lib virt-viewer spice://localhost?port=5901
2. Copy any image from client
3. Open http://ie.microsoft.com/testdrive/browser/Editing_Paste_Image/
4. Try pasting image using <Ctrl+v>
5. Image will not get copied
6. Try copying any image from guest
7. Open same webpage in client
8. Try pasting image using <Ctrl+v>. Image will get pasted. 


Actual results:
Images gets copied from guest to client but not client to guest. 

Expected results:
Image should get copied in both directions.

Additional info:

Comment 1 Swapna Krishnan 2014-10-27 18:26:55 UTC
I checked the commits and narrowed the failure to this commit. Copy-Paste images from client to guest fails after this commit and passes before this commit. 

commit a8f2e2d9906f9908ab6cae0b9c36d99e5b49d05d
Author: Christophe Fergeau <cfergeau>
Date:   Tue Aug 12 16:17:16 2014 +0200

    Ensure '\0' is not part of text clipboard data
    
    On Windows, with some versions of gtk+, GtkSelectionData::length
    will include the final '\0'.
    When a string with this trailing '\0' is pasted in some linux
    applications, it will be pasted as <NIL> or as an invisible character,
    which is unwanted.
    
    This commit ensures the length we send to the agent does not
    include any trailing '\0'.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1090122

Comment 2 Christophe Fergeau 2014-10-28 10:44:46 UTC
(In reply to Swapna Krishnan from comment #0)
> When I build spice-gtk from upstream

Just a note for future bugs, bugs in the upstream codebase should be filed on https://bugs.freedesktop.org/
Bugs in the Fedora component are for bugs you hit when using the fedora packages.

Thanks a lot for bisecting it down to the faulty commit, this is really helpful in fixing it!

Comment 3 Christophe Fergeau 2014-10-29 13:37:53 UTC
Fixed upstream in http://cgit.freedesktop.org/spice/spice-gtk/commit/?id=43e3f6ea012236b1c3759a48b24026bdeff5d7e0 (and previous commit), will be in upcoming 0.26 release.


Note You need to log in before you can comment on or make changes to this bug.