<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.28.1">
</HEAD>
<BODY>
Hi,<BR>
<BR>
I build the spice from git, and do some test. I find one issue when I playing video in windows xp(sp2), here's the steps to reproduce:<BR>
1.use KMPlayer to play a video,wait for some time,the spice server will be stuck;<BR>
2.use "top" command to watch qemu process, find the process's cpu usage rate is 100%;<BR>
<BR>
So, I use gdb to see what happened, I found why it stucks,<BR>
<BR>
static void fill_cursor(CursorChannel *cursor_channel, SpiceCursor *red_cursor, CursorItem *cursor)<BR>
{<BR>
RedChannel *channel = &cursor_channel->base;<BR>
<BR>
if (!cursor) {<BR>
red_cursor->flags = SPICE_CURSOR_FLAGS_NONE;<BR>
return;<BR>
}<BR>
<BR>
if (cursor->type == CURSOR_TYPE_DEV) {<BR>
QXLCursorCmd *cursor_cmd;<BR>
QXLCursor *qxl_cursor;<BR>
<BR>
cursor_cmd = cursor->qxl_cursor;<BR>
qxl_cursor = (QXLCursor *)get_virt(&channel->worker->mem_slots, cursor_cmd->u.set.shape,<BR>
sizeof(QXLCursor), cursor->group_id);<BR>
red_cursor->flags = 0;<BR>
red_cursor->header = qxl_cursor->header;<BR>
<BR>
if (red_cursor->header.unique) {<BR>
if (red_cursor_cache_find(cursor_channel, red_cursor->header.unique)) {<BR>
red_cursor->flags |= SPICE_CURSOR_FLAGS_FROM_CACHE;<BR>
return;<BR>
}<BR>
if (red_cursor_cache_add(cursor_channel, red_cursor->header.unique, 1)) {<BR>
red_cursor->flags |= SPICE_CURSOR_FLAGS_CACHE_ME;<BR>
}<BR>
}<BR>
<BR>
if (qxl_cursor->data_size) {<BR>
<FONT COLOR="#ff0000">// QXLDataChunk *chunk = (QXLDataChunk *)&qxl_cursor->chunk;</FONT><BR>
<FONT COLOR="#ff0000"> // chunk->data_size is different from qxl_cursor->data_size, here is why spice server stuck,</FONT><BR>
<FONT COLOR="#ff0000"> // in my case,qxl_cursor->data_size is 4224, chunk->data_size is 128, so in red_send_data() function, it enters infinite loop.</FONT><BR>
add_buf(channel, BUF_TYPE_CHUNK, &qxl_cursor->chunk, qxl_cursor->data_size,<BR>
get_memslot_id(&channel->worker->mem_slots, cursor_cmd->u.set.shape), cursor->group_id);<BR>
}<BR>
} else {<BR>
LocalCursor *local_cursor;<BR>
ASSERT(cursor->type == CURSOR_TYPE_LOCAL);<BR>
local_cursor = (LocalCursor *)cursor;<BR>
*red_cursor = local_cursor->red_cursor;<BR>
add_buf(channel, BUF_TYPE_RAW, local_cursor->red_cursor.data, local_cursor->data_size, 0,<BR>
0);<BR>
}<BR>
}<BR>
<BR>
Welcome for giving some comments.<BR>
<BR>
Best Regards,<BR>
Coolper
</BODY>
</HTML>