From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LrIKu-00034w-Sk for qemu-devel@nongnu.org; Tue, 07 Apr 2009 16:56:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LrIKu-00034M-CY for qemu-devel@nongnu.org; Tue, 07 Apr 2009 16:56:00 -0400 Received: from [199.232.76.173] (port=49031 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrIKu-00034E-8Q for qemu-devel@nongnu.org; Tue, 07 Apr 2009 16:56:00 -0400 Received: from savannah.gnu.org ([199.232.41.3]:43041 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LrIKt-0003vX-Ox for qemu-devel@nongnu.org; Tue, 07 Apr 2009 16:55:59 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LrIKs-0004II-Oa for qemu-devel@nongnu.org; Tue, 07 Apr 2009 20:55:58 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LrIKs-0004IE-GP for qemu-devel@nongnu.org; Tue, 07 Apr 2009 20:55:58 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Tue, 07 Apr 2009 20:55:58 +0000 Subject: [Qemu-devel] [7026] Fix crash on resolution change -> screen dump -> vga redraw ( Avi Kivity) 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 Revision: 7026 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7026 Author: aliguori Date: 2009-04-07 20:55:58 +0000 (Tue, 07 Apr 2009) Log Message: ----------- Fix crash on resolution change -> screen dump -> vga redraw (Avi Kivity) The vga screen dump function updates last_width and last_height, but does not change the DisplaySurface that these variables describe. A consequent vga_draw_graphic() will therefore fail to resize the surface and crash. Fix by invalidating the display state after a screen dump, forcing vga_draw_graphic() to reallocate the DisplaySurface. Signed-off-by: Avi Kivity Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/hw/vga.c Modified: trunk/hw/vga.c =================================================================== --- trunk/hw/vga.c 2009-04-07 20:55:29 UTC (rev 7025) +++ trunk/hw/vga.c 2009-04-07 20:55:58 UTC (rev 7026) @@ -2678,4 +2678,5 @@ vga_screen_dump_graphic(s, filename); else vga_screen_dump_text(s, filename); + vga_invalidate_display(s); }