[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: Another VNC crash, qemu-kvm-0.12.3
From: |
Chris Webb |
Subject: |
Re: [Qemu-devel] Re: Another VNC crash, qemu-kvm-0.12.3 |
Date: |
Sat, 6 Mar 2010 08:53:32 +0000 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Alexander Graf <address@hidden> writes:
> On 05.03.2010, at 17:52, Chris Webb wrote:
>
> > Of course, if the screen width or height is 1, it doesn't really matter what
> > the value of the mouse position for the click is, so something as simple as
> >
> > diff --git a/vnc.c b/vnc.c
> > --- a/vnc.c
> > +++ b/vnc.c
> > @@ -1421,8 +1421,10 @@
> > dz = 1;
> >
> > if (vs->absolute) {
> > - kbd_mouse_event(x * 0x7FFF / (ds_get_width(vs->ds) - 1),
> > - y * 0x7FFF / (ds_get_height(vs->ds) - 1),
> > + kbd_mouse_event(ds_get_width(vs->ds) > 1 ?
> > + x * 0x7FFF / (ds_get_width(vs->ds) - 1) : 0x4000,
> > + ds_get_height(vs->ds) > 1 ?
> > + y * 0x7FFF / (ds_get_height(vs->ds) - 1) :
> > 0x4000,
> > dz, buttons);
> > } else if (vnc_has_feature(vs, VNC_FEATURE_POINTER_TYPE_CHANGE)) {
> > x -= 0x7FFF;
> >
> > will fix the symptom: the division by zero. The underlying cause of a 9x1
> > display surface is a bit mysterious though.
>
> Is it? When booting the screen gets resized to something like 9x1 for a
> few ms. Try putting debug code in the resize callback - you'll see it.
Ah, okay. In that case, this patch could well be the correct fix rather than
just a work-around. I'll have a look for any other places in vnc.c that
might do a similar division-by-zero for small screen sizes at the same
point.
Best wishes,
Chris.
- [Qemu-devel] Another VNC crash, qemu-kvm-0.12.3, Chris Webb, 2010/03/01
- [Qemu-devel] Re: Another VNC crash, qemu-kvm-0.12.3, Anthony Liguori, 2010/03/03
- [Qemu-devel] Re: Another VNC crash, qemu-kvm-0.12.3, Chris Webb, 2010/03/05
- Re: [Qemu-devel] Re: Another VNC crash, qemu-kvm-0.12.3, Alexander Graf, 2010/03/05
- Re: [Qemu-devel] Re: Another VNC crash, qemu-kvm-0.12.3,
Chris Webb <=
- [Qemu-devel] [PATCH] Fix SIGFPE for vnc display of width/height = 1, Chris Webb, 2010/03/08
- Re: [Qemu-devel] [PATCH] Fix SIGFPE for vnc display of width/height = 1, Chris Webb, 2010/03/08
- Re: [Qemu-devel] [PATCH] Fix SIGFPE for vnc display of width/height = 1, Anthony Liguori, 2010/03/17
- Re: [Qemu-devel] [PATCH] Fix SIGFPE for vnc display of width/height = 1, Alexander Graf, 2010/03/17