SDL window Resize Crash
Working with qemu from the stable-0.11 branch, I have seen a crash when trying to resize the SDL qemu window smaller.
Resizing the window larger "just" causes video corruption.
This is with qemu-system-arm using the versatilepb board. However I suspect the bug is in the common SDL code.
I haven't been able to track down the issue yet since I have been busy with other things, so thought I should report the bug at least and hope that someone else will have time to try and track it down.
pl110_draw_line16_lblp_rgb32 (opaque=<value optimized out>, d=0x7f6019218000 <Address 0x7f6019218000 out of bounds>, src=0x7f6029978000 "",
width=<value optimized out>, deststep=<value optimized out>)
at /home/stephend/src/git/qemu/hw/pl110_template.h:257
257 COPY_PIXEL(d, glue(rgb_to_pixel,BITS)(r, g, b));
(gdb) bt
#0 pl110_draw_line16_lblp_rgb32 (opaque=<value optimized out>, d=0x7f6019218000 <Address 0x7f6019218000 out of bounds>, src=0x7f6029978000 "",
width=<value optimized out>, deststep=<value optimized out>)
at /home/stephend/src/git/qemu/hw/pl110_template.h:257
#1 0x000000000048d215 in framebuffer_update_display (ds=0x33e0ee0, base=<value optimized out>, cols=640, rows=480,
src_width=<value optimized out>, dest_row_pitch=2560, dest_col_pitch=0,
invalidate=1, fn=0x438f10 <pl110_draw_line16_lblp_rgb32>,
opaque=0x3490318, first_row=0x7fff44331f14, last_row=0x7fff44331f10) at /home/stephend/src/git/qemu/hw/framebuffer.c:99
#2 0x0000000000439fae in pl110_update_display (opaque=<value optimized out>) at /home/stephend/src/git/qemu/hw/pl110.c:156
#3 0x00000000004eec8b in sdl_refresh (ds=0x33e0ee0) at sdl.c:724 #4 0x000000000040a3de in gui_update (opaque=<value optimized out>) at /home/stephend/src/git/qemu/console.h:217
#5 0x000000000040b574 in main_loop_wait (timeout=<value optimized out>) at /home/stephend/src/git/qemu/vl.c:1022
#6 0x000000000040f1f2 in main (argc=11, argv=0x7fff44333698, envp=<value optimized out>) at /home/stephend/src/git/qemu/vl.c:4346
Signature · 2 lines
Stephen Depooter <[email protected]>
Quoted 8 lines · Stephen Depooter
Working with qemu from the stable-0.11 branch, I have seen a crash when trying to resize the SDL qemu window smaller.
Resizing the window larger "just" causes video corruption.
This is with qemu-system-arm using the versatilepb board. However I suspect the bug is in the common SDL code.
Looks like it's the same problem I fixed with Sparc32 TCX. Would this patch fix the bug?
From 36f1d7b8f8228684bc0447b7edd538df28766faf Mon Sep 17 00:00:00 2001
From: Blue Swirl <[email protected]>
Date: Tue, 28 Jul 2009 06:34:58 +0000
Subject: [PATCH] Fix SDL zooming with pl110 (cf. d3ffcafe25b5966b351ea6100160c2156688f22f)
--- hw/pl110.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
hw/pl110.c +3 -0
@@ -169,6 +169,9 @@ static void pl110_invalidate_display(void * opaque) {pl110_state *s = (pl110_state *)opaque; s->invalidate =1 ; +if (pl110_enabled (s)) { +qemu_console_resize (s->ds, s->cols, s->rows); + } }static void pl110_update_pallette (pl110_state *s,int n)
Signature · 1 line
1.5.6.5
Quoted 5 lines · On Tue, 28 Jul 2009 09:39:14 +0300 Blue Swirl <[email protected]> wrote:
Quoted 4 lines · Stephen Depooter
Working with qemu from the stable-0.11 branch, I have seen a crash when trying to resize the SDL qemu window smaller.
Quoted 7 lines
Quoted 4 lines
Resizing the window larger "just" causes video corruption.
This is with qemu-system-arm using the versatilepb board. However I suspect the bug is in the common SDL code.
Looks like it's the same problem I fixed with Sparc32 TCX. Would this patch fix the bug?
I've got a similar problem and reported it on launchpad:
https://bugs.launchpad.net/qemu/+bug/397572
As Stephen says, I also think this is on SDL code. It's very
easy to reproduce btw:
1. Start QEMU in pause mode, for example:
$ qemu-system-x86_64 -hda fedora11.img -boot c -S
2. Switch to the Monitor
Ctrl+Alt+2
3. Type 'help'
(qemu) help
4. Using the mouse, try to resize the screen. QEMU will crash