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