From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LRoyB-0005Ki-ED for qemu-devel@nongnu.org; Tue, 27 Jan 2009 09:31:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LRoy9-0005KC-KV for qemu-devel@nongnu.org; Tue, 27 Jan 2009 09:31:15 -0500 Received: from [199.232.76.173] (port=51223 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LRoy9-0005K6-Gh for qemu-devel@nongnu.org; Tue, 27 Jan 2009 09:31:13 -0500 Received: from smtp.eu.citrix.com ([62.200.22.115]:53727) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LRoy9-00080j-3n for qemu-devel@nongnu.org; Tue, 27 Jan 2009 09:31:13 -0500 Message-ID: <497F18D0.2060409@eu.citrix.com> Date: Tue, 27 Jan 2009 14:23:12 +0000 From: Stefano Stabellini MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: More displaystate fallout? References: <20090118231436.GA9565@saturn.kn-bremen.de> <20090120231248.GA13951@saturn.kn-bremen.de> <437083beafc472e92354fb05f211b149@iem.pw.edu.pl> <497714E4.5050206@eu.citrix.com> <49775F63.9020009@mail.berlios.de> <49776647.4090502@eu.citrix.com> <497794DA.1090405@mail.berlios.de> <49787EAC.5040904@eu.citrix.com> In-Reply-To: <49787EAC.5040904@eu.citrix.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 Any update on this? Stefano Stabellini wrote: > Stefan Weil wrote: > >> To reproduce it, the 1st console window must be larger than 640 x 480 >> (or the surface of dumb terminal smaller than this). >> >> Systems without VGA start with the monitor console which is larger. >> Qemu (SDL or VNC) will crash when switching from 1st to 2nd console >> and then back to 1st (which will never show again). >> >> See stack trace below. Maybe you must add a simple assertion to console.c >> to see the access violation. >> >> A simple (but crude) fix is to increase the size of the surface. >> > > > > I am still unable to get a crash but I was able to get few rendering > problems. > However I think I understand the issue: if the is no graphic card and > the first console has a fixed size, the size of the display surface may > be wrong. > > Does this patch fixes the problem for you? > > --- > > diff --git a/console.c b/console.c > index dbb3b70..e02cf63 100644 > --- a/console.c > +++ b/console.c > @@ -1419,13 +1419,22 @@ CharDriverState *text_console_init(const char *p) > void text_consoles_set_display(DisplayState *ds) > { > int i; > + TextConsole *s; > > for (i = 0; i < n_text_consoles; i++) { > text_console_do_init(text_consoles[i], ds, text_console_strs[i]); > qemu_free(text_console_strs[i]); > } > - > n_text_consoles = 0; > + > + /* If there are no graphic cards and the first console has a fixed > + * size we need to resize the screen surface according to the size > + * of the first console */ > + s = consoles[0]; > + if (s && s->console_type == TEXT_CONSOLE_FIXED_SIZE) { > + ds->surface = qemu_resize_displaysurface(ds->surface, s->g_width, s->g_height, 32, 4 * s->g_width); > + dpy_resize(ds); > + } > } > > void qemu_console_resize(DisplayState *ds, int width, int height) > > >