[Spice-devel] Welcome to the "Spice-devel" mailing list

Jonathon Jongsma jjongsma at redhat.com
Thu Oct 1 12:13:50 PDT 2015


On Thu, 2015-10-01 at 19:36 +0300, Alex Roithman wrote:
> 
> 
> On 28 September 2015 at 19:31, Jonathon Jongsma <jjongsma at redhat.com>
> wrote:
>         ...
>         > (1)
>         >
>         https://github.com/F1ash/qt-virt-manager/blob/master/src/vm_viewer/qspice_widgets/qspicemainchannel.cpp#L157-L179
>         > after the try to execute this method application crashed...
>         
>         
>         The documentation on this method is not clear, but the
>         'sources'
>         parameter to spice_main_file_copy_async() should be a
>         NULL-terminated
>         array of GFile objects. If your array is not null-terminated,
>         it's
>         possible that you could get the error that you reported.
>         ...
>         
>         > (2)
>         >
>         https://github.com/F1ash/qt-virt-manager/blob/master/src/vm_viewer/qspice_widgets/qspicemainchannel.cpp#L129-L146
>         > after the try to execute this method host clipboard (text)
>         > data not received by guest clipboard. In virt-viewer this
>         > action is successful.
>         
>         
>         I didn't see anything obvious after a quick look at your
>         function source
>         (although I think you could simply pass _data.toUtf8().data()
>         to that
>         function instead of allocating and copying it to a new 'buff'
>         variable).
>         If it's not working, I'm pretty sure the bug must be in your
>         code
>         though, since spice_main_clipboard_selection_notify() works
>         fine for
>         others.
>         
>         Jonathon
>         
>         
> Hi!
> 
> in (1) case NULL-terminated array of GFile* is fixed the problem.
> 
> But with (2) case simplify the code have not good result. More,
> 
> even call method as:
> 
> <code>
>     spice_main_clipboard_selection_notify(
>                 (SpiceMainChannel *) gobject,
>                 VD_AGENT_CLIPBOARD_SELECTION_CLIPBOARD,
>                 VD_AGENT_CLIPBOARD_UTF8_TEXT,
>                 (const guchar*)"1234567890",
>                 10);
> </code>
> 
> not successful. And this is a very strange. Maybe to use this method
> need to do some usage order?


Assuming that your agent is running, and that you have a vm with the
appropriate devices added
(http://people.freedesktop.org/~teuf/spice-doc/html/ch02s05.html), that
should work. You'll probably have to do some debugging to figure out
what's going on. This recent patch that Christophe posted should give
you some pointers for how to debug different parts of the spice system:

http://lists.freedesktop.org/archives/spice-devel/2015-October/022135.html

Good luck.
Jonathon




More information about the Spice-devel mailing list