From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Id9v4-0001oz-K8 for qemu-devel@nongnu.org; Wed, 03 Oct 2007 15:30:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Id9v2-0001l3-Pp for qemu-devel@nongnu.org; Wed, 03 Oct 2007 15:30:05 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Id9v2-0001kq-IU for qemu-devel@nongnu.org; Wed, 03 Oct 2007 15:30:04 -0400 Received: from wa-out-1112.google.com ([209.85.146.177]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Id9v1-0007gU-4f for qemu-devel@nongnu.org; Wed, 03 Oct 2007 15:30:04 -0400 Received: by wa-out-1112.google.com with SMTP id k22so7925341waf for ; Wed, 03 Oct 2007 12:30:01 -0700 (PDT) Message-ID: <83a4d4ca0710031229u68202e6aub32ba6257dfb0bc0@mail.gmail.com> Date: Wed, 3 Oct 2007 21:29:59 +0200 From: "Eduardo Felipe" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_23215_2640835.1191439799816" Subject: [Qemu-devel] [Patch] VNC: Fix crash with non-resizing clients Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ------=_Part_23215_2640835.1191439799816 Content-Type: multipart/alternative; boundary="----=_Part_23216_17545305.1191439799816" ------=_Part_23216_17545305.1191439799816 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, 2007/9/25, GUERRAZ Francois : > > > About your VNC problems : I have had problems w/ vnc too (see > http://qemu-forum.ipi.fi/viewtopic.php?p=10468) but had no answer as > well... This problem happens when the VNC client doesn't support the DesktopSize pseudo-encoding. Qemu crashes when the guest resizes down its display and the VNC client sends a SetPixelFormat afterwards. Attached patch should fix this. It also forces a full buffer update after resize. Regards, Edu ------=_Part_23216_17545305.1191439799816 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,

2007/9/25, GUERRAZ Francois <francois.guerraz@alyotech.fr>:

About your VNC problems : I have had problems w/ vnc too (see
http://qemu-forum.ipi.fi/viewtopic.php?p=10468) but had no answer as
well...

This problem happens when the VNC client doesn't support the DesktopSize pseudo-encoding. Qemu crashes when the guest resizes down its display and the VNC client sends a SetPixelFormat afterwards.

Attached patch should fix this. It also forces a full buffer update after resize.

Regards,
Edu

------=_Part_23216_17545305.1191439799816-- ------=_Part_23215_2640835.1191439799816 Content-Type: text/x-patch; name="vnc-crash-on-resize.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="vnc-crash-on-resize.patch"; filename="vnc-crash-on-resize.patch"; filename="vnc-crash-on-resize.patch" X-Attachment-Id: f_f7c88ych KioqIHZuYy5jCTMwIFNlcCAyMDA3IDEzOjAxOjE1IC0wMDAwCTEuMjUNCi0tLSB2bmMuYwkzIE9j dCAyMDA3IDE4OjQ0OjE3IC0wMDAwDQpAQCAtMjg5LDE1ICsyODksMTkgQEANCiAgICAgZHMtPndp ZHRoID0gdzsNCiAgICAgZHMtPmhlaWdodCA9IGg7DQogICAgIGRzLT5saW5lc2l6ZSA9IHcgKiB2 cy0+ZGVwdGg7DQotICAgIGlmICh2cy0+Y3NvY2sgIT0gLTEgJiYgdnMtPmhhc19yZXNpemUgJiYg c2l6ZV9jaGFuZ2VkKSB7DQotCXZuY193cml0ZV91OCh2cywgMCk7ICAvKiBtc2cgaWQgKi8NCi0J dm5jX3dyaXRlX3U4KHZzLCAwKTsNCi0Jdm5jX3dyaXRlX3UxNih2cywgMSk7IC8qIG51bWJlciBv ZiByZWN0cyAqLw0KLQl2bmNfZnJhbWVidWZmZXJfdXBkYXRlKHZzLCAwLCAwLCBkcy0+d2lkdGgs IGRzLT5oZWlnaHQsIC0yMjMpOw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