Random X errors caused by recent cursor patch?

John Smith xixsimplicityxix at gmail.com
Thu Apr 5 03:23:36 CDT 2007


I was able to reproduce the badpixmap bug on peachtree 2006 right after
picking a company from the "open company" dialog.  This patch seemed to fix
this (or atleast hide it from being as reproducible as it was).  I had some
trouble applying it to current gitwine, but I typed it in manually and it
worked fine.

john

On 4/3/07, Huw Davies <huw at codeweavers.com> wrote:
>
> On Tue, Apr 03, 2007 at 08:26:59AM -0700, Dan Kegel wrote:
> > Looks like there's been a regression lately.  I'm
> > getting errors like this
> >
> > X Error of failed request:  BadPixmap (invalid Pixmap parameter)
> >  Major opcode of failed request:  54 (X_FreePixmap)
> >  Resource id in failed request:  0x2a0006a
> >
> > randomly, about every fourth time I run things that used to
> > work.  A user on c.e.m.w.
> >
> http://groups.google.com/group/comp.emulators.ms-windows.wine/msg/1f41dbd21a129f5e
> > speculates that the recent cursors patch
> > introduced the regression.
> >
> > The error doesn't happen often enough to make
> > a regression test easy, and I haven't tried myself yet.
>
> Hi Dan,
>
> Could you see if this helps?  It looks like XRenderFreePicture
> actually destroys the underlying pixmap, so we ended up freeing it
> twice.
>
> Thanks,
> Huw.
> --
> Huw Davies
> huw at codeweavers.com
> >From 8a76cf26395043428c24851d675c219735bcf502 Mon Sep 17 00:00:00 2001
> From: Huw Davies <huw at codeweavers.com>
> Date: Tue, 3 Apr 2007 17:12:32 +0100
> Subject: winex11.drv: XRenderFreePicture destroys the underlying storage,
> so don't free the pixmap.
> To: wine-patches <wine-patches at winehq.org>
>
> ---
> dlls/winex11.drv/xrender.c |   22 +++++++++-------------
> 1 files changed, 9 insertions(+), 13 deletions(-)
>
> diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
> index e03540e..6b86c74 100644
> --- a/dlls/winex11.drv/xrender.c
> +++ b/dlls/winex11.drv/xrender.c
> @@ -85,7 +85,6 @@ struct tagXRENDERINFO
>      int                cache_index;
>      Picture            pict;
>      Picture            tile_pict;
> -    Pixmap             tile_xpm;
>      COLORREF           lastTextColor;
> };
>
> @@ -596,7 +595,6 @@ void X11DRV_XRender_UpdateDrawable(X11DRV_PDEVICE
> *physDev)
>      if(physDev->xrender->pict)
>      {
>          TRACE("freeing pict = %lx dc = %p\n", physDev->xrender->pict,
> physDev->hdc);
> -        XFlush(gdi_display);
>          pXRenderFreePicture(gdi_display, physDev->xrender->pict);
>          physDev->xrender->pict = 0;
>      }
> @@ -605,11 +603,6 @@ void X11DRV_XRender_UpdateDrawable(X11DRV_PDEVICE
> *physDev)
>          pXRenderFreePicture(gdi_display, physDev->xrender->tile_pict);
>          physDev->xrender->tile_pict = 0;
>      }
> -    if(physDev->xrender->tile_xpm)
> -    {
> -        XFreePixmap(gdi_display, physDev->xrender->tile_xpm);
> -        physDev->xrender->tile_xpm = 0;
> -    }
>
>      wine_tsx11_unlock();
>
> @@ -1186,18 +1179,21 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE
> *physDev, INT x, INT y, UINT flag
>
>      if(X11DRV_XRender_Installed) {
>          /* Create a 1x1 pixmap to tile over the font mask */
> -        if(!physDev->xrender->tile_xpm) {
> +        if(!physDev->xrender->tile_pict) {
>             XRenderPictureAttributes pa;
> +            Pixmap xpm;
>
>             XRenderPictFormat *format = (physDev->depth == 1) ?
> mono_format : screen_format;
>             wine_tsx11_lock();
> -           physDev->xrender->tile_xpm = XCreatePixmap(gdi_display,
> -                                                      physDev->drawable,
> -                                                      1, 1,
> -                                                      format->depth);
> +
> +            /* The pixmap will be freed with XRenderFreePicture */
> +            xpm = XCreatePixmap(gdi_display,
> +                                physDev->drawable,
> +                                1, 1,
> +                                format->depth);
>             pa.repeat = True;
>             physDev->xrender->tile_pict =
> pXRenderCreatePicture(gdi_display,
> -
> physDev->xrender->tile_xpm,
> +                                                               xpm,
>                                                                 format,
>                                                                 CPRepeat,
> &pa);
>             wine_tsx11_unlock();
> --
> 1.5.0.5
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-devel/attachments/20070405/ce655c66/attachment.htm


More information about the wine-devel mailing list