[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    BitBlt(): FALSE
From:       Andreas Mohr <amohr () codeweavers ! com>
Date:       2000-12-30 0:53:15
[Download RAW message or body]

Hello all,

today I got a report about Starcraft install failing on 20001222 with
the message "ScreenStack :: build(): BitBlt".

Call gdi32.115: BitBlt(00000478,00000000,00000000,00000258,000001b8,00000470,00000000,00000000,00cc0020) \
ret=0040c990 fs=008f trace:gdi:GDI_GetObjPtr (0470): enter 1
trace:gdi:GDI_ReleaseObj (0470): leave 1
trace:gdi:GDI_GetObjPtr (0478): enter 1
trace:gdi:GDI_GetObjPtr (0470): enter 2
trace:bitblt:BitBlt hdcSrc=0470 0,0 24 bpp->hdcDest=0478 0,0 600x440x24 rop=cc0020
trace:gdi:GDI_GetObjPtr (104e): enter 3
trace:gdi:GDI_ReleaseObj (104e): leave 3
trace:gdi:GDI_GetObjPtr (1042): enter 3
trace:gdi:GDI_ReleaseObj (1042): leave 3
trace:gdi:GDI_GetObjPtr (104a): enter 3
trace:gdi:GDI_ReleaseObj (104a): leave 3
trace:gdi:GDI_GetObjPtr (104e): enter 3
trace:gdi:GDI_ReleaseObj (104e): leave 3
trace:gdi:GDI_GetObjPtr (1042): enter 3
trace:gdi:GDI_GetObjPtr (ffef): enter 4
trace:gdi:GDI_ReleaseObj (ffef): leave 4
trace:gdi:GDI_GetObjPtr (ffef): enter 4
trace:gdi:GDI_ReleaseObj (ffef): leave 4
trace:gdi:GDI_GetObjPtr (ffef): enter 4
trace:gdi:GDI_ReleaseObj (ffef): leave 4
trace:gdi:GDI_GetObjPtr (ffef): enter 4
.
. [tons of 'em]
.
trace:gdi:GDI_ReleaseObj (1042): leave 3
trace:gdi:GDI_GetObjPtr (1042): enter 3
trace:gdi:GDI_ReleaseObj (1042): leave 3
trace:gdi:GDI_GetObjPtr (104e): enter 3
trace:gdi:GDI_ReleaseObj (104e): leave 3
trace:gdi:GDI_ReleaseObj (0470): leave 2
trace:gdi:GDI_ReleaseObj (0478): leave 1
Ret  gdi32.115: BitBlt() retval=00000000 ret=0040c990 fs=008f
Call user32.648: wvsprintfA(405c5bfc,00435dc4 "ScreenStack :: build(): \
BitBlt",405c5d04) ret=004010f2 fs=008f Ret  user32.648: wvsprintfA() retval=0000001e \
ret=004010f2 fs=008f Call user32.422: MessageBoxA(00000138,405c5bfc "ScreenStack :: \
build(): BitBlt",004350a8 "ERROR",00002010) ret=0040110e fs=008f

I tracked this down (without any additional TRACEs !) to X11DRV_BitBlt():
    BOOL result = FALSE;
.
.
.
    if ((sSrc == DIB_Status_AppMod) && (rop == SRCCOPY)) {
      /* do everything ourselves; map coordinates */
      xSrc = dcSrc->DCOrgX + XLPTODP( dcSrc, xSrc );
      ySrc = dcSrc->DCOrgY + YLPTODP( dcSrc, ySrc );
      xDst = dcDst->DCOrgX + XLPTODP( dcDst, xDst );
      yDst = dcDst->DCOrgY + YLPTODP( dcDst, yDst );
      width  = MulDiv(width, dcDst->vportExtX, dcDst->wndExtX);
      height = MulDiv(height, dcDst->vportExtY, dcDst->wndExtY);

      /* Perform basic clipping */
      if (!BITBLT_GetVisRectangles( dcDst, xDst, yDst, width, height,
                                      dcSrc, xSrc, ySrc, width, height,
                                      &visRectSrc, &visRectDst ))
        goto END;

      xSrc = visRectSrc.left;
      ySrc = visRectSrc.top;
      xDst = visRectDst.left;
      yDst = visRectDst.top;
      width = visRectDst.right - visRectDst.left;
      height = visRectDst.bottom - visRectDst.top;

      if (sDst == DIB_Status_AppMod) {
        FIXME("potential optimization - client-side DIB copy\n");
      }
      X11DRV_CoerceDIBSection( dcDst, DIB_Status_GdiMod, FALSE );

      X11DRV_DIB_CopyDIBSection( dcSrc, dcDst, xSrc, ySrc, xDst, yDst, width, height \
); +      result = TRUE;
      goto END;
    }
.
.
.
END:
    X11DRV_UnlockDIBSection( dcSrc, FALSE );
    X11DRV_UnlockDIBSection( dcDst, TRUE );

    return result;
}

Adding result = TRUE; as shown above fixed it.
The code seems to suggest that TRUE is expected here.
But on the other hand this guy still had an uninitialized background
of about that size.
I'm not 150% sure whether this is related, though.

Is that fix valid ?

Andreas Mohr


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic