Hi all,
while trying to run Halflife (no, it still doesn't work :-\),
I get this:
err:bitmap:X11DRV_DIB_BuildColorMap color #1
err:bitmap:X11DRV_DIB_BuildColorMap has been called with 256 colors !
err:bitmap:X11DRV_DIB_BuildColorMap color 0/256: rgb: 0x4209ffc4
err:bitmap:X11DRV_DIB_BuildColorMap 0 done.
err:bitmap:X11DRV_DIB_BuildColorMap color 1/256: rgb: 0x4209ffc8
err:bitmap:X11DRV_DIB_BuildColorMap 1 done.
err:bitmap:X11DRV_DIB_BuildColorMap color 2/256: rgb: 0x4209ffcc
err:bitmap:X11DRV_DIB_BuildColorMap 2 done.
err:bitmap:X11DRV_DIB_BuildColorMap color 3/256: rgb: 0x4209ffd0
err:bitmap:X11DRV_DIB_BuildColorMap 3 done.
err:bitmap:X11DRV_DIB_BuildColorMap color 4/256: rgb: 0x4209ffd4
err:bitmap:X11DRV_DIB_BuildColorMap 4 done.
err:bitmap:X11DRV_DIB_BuildColorMap color 5/256: rgb: 0x4209ffd8
err:bitmap:X11DRV_DIB_BuildColorMap 5 done.
err:bitmap:X11DRV_DIB_BuildColorMap color 6/256: rgb: 0x4209ffdc
err:bitmap:X11DRV_DIB_BuildColorMap 6 done.
err:bitmap:X11DRV_DIB_BuildColorMap color 7/256: rgb: 0x4209ffe0
err:bitmap:X11DRV_DIB_BuildColorMap 7 done.
err:bitmap:X11DRV_DIB_BuildColorMap color 8/256: rgb: 0x4209ffe4
err:bitmap:X11DRV_DIB_BuildColorMap 8 done.
err:bitmap:X11DRV_DIB_BuildColorMap color 9/256: rgb: 0x4209ffe8
err:bitmap:X11DRV_DIB_BuildColorMap 9 done.
err:bitmap:X11DRV_DIB_BuildColorMap color 10/256: rgb: 0x4209ffec
err:bitmap:X11DRV_DIB_BuildColorMap 10 done.
err:bitmap:X11DRV_DIB_BuildColorMap color 11/256: rgb: 0x4209fff0
err:bitmap:X11DRV_DIB_BuildColorMap 11 done.
err:bitmap:X11DRV_DIB_BuildColorMap color 12/256: rgb: 0x4209fff4
err:bitmap:X11DRV_DIB_BuildColorMap 12 done.
err:bitmap:X11DRV_DIB_BuildColorMap color 13/256: rgb: 0x4209fff8
err:bitmap:X11DRV_DIB_BuildColorMap 13 done.
err:bitmap:X11DRV_DIB_BuildColorMap color 14/256: rgb: 0x4209fffc
err:bitmap:X11DRV_DIB_BuildColorMap 14 done.
err:bitmap:X11DRV_DIB_BuildColorMap color 15/256: rgb: 0x420a0000
And now I get a crash when trying to access the red value of color 15 (i.e.:
0x420a0002):
Unhandled exception: page fault on read access to 0x420a0002
So obviously only colors 0 to 14 are valid. Why ???
Backtrace:
=>0 0x40738f89 (X11DRV_DIB_BuildColorMap+0x201 [dib.c:133]) (ebp=40c45474)
1 0x4073efe6 (X11DRV_DIB_SetDIBits+0x13a(bmp=0x403c8186, dc=0x403c6104,
startscan=0x0, lines=0x64, bits=0x40446fe8, info=0x4209ff9c, coloruse=0x0,
hbitmap=0x250a) [dib.c:2847]) (ebp=40c45514)
2 0x40153041 (SetDIBits+0xa9(hdc=0x910, hbitmap=0x250a, startscan=0x0, lines=0x64,
bits=0x40446fe8, info=0x4209ff9c, coloruse=0x0) [dib.c:215]) (ebp=40c45554) 3
0x40154165 (CreateDIBitmap+0x181(hdc=0x910, header=0x4209ff9c, init=0x4,
bits=0x40446fe8, data=0x4209ff9c, coloruse=0x0) [dib.c:858]) (ebp=40c455a4)
4 0x40152ec8 (StretchDIBits+0x98(hdc=0x910, xDst=0x0, yDst=0x0, widthDst=0x280,
heightDst=0x64, xSrc=0x0, ySrc=0x0, widthSrc=0x280, heightSrc=0x64, bits=0x40446fe8,
info=0x4209ff9c, wUsage=0x0, dwRop=0xcc0020) [dib.c:149]) (ebp=40c455f4)
5 0x40e6b89d (ANIMATE_PaintFrame+0x61(infoPtr=0x4195033c, hDC=0x910)
[animate.c:150]) (ebp=40c45654)
6 0x40e6d349 (ANIMATE_WindowProc+0x231(hWnd=0x124c, uMsg=0xf, wParam=0x0,
lParam=0x0) [animate.c:695]) (ebp=40c456c4)
7 0x401c1220 (WINPROC_CallProc_ProtectRegs+0x24(proc=0x40e6d118, hwnd=0x124c,
msg=0xf, wParam=0x0, lParam=0x0) [winproc.c:131]) (ebp=40c456f4)
8 0x401c12ad (WINPROC_CallWndProc+0x85(proc=0x40e6d118, hwnd=0x124c, msg=0xf,
wParam=0x0, lParam=0x0) [winproc.c:158]) (ebp=40c45734)
9 0x401c6310 (CallWindowProcA+0x9c(func=0x40e6d118, hwnd=0x124c, msg=0xf,
wParam=0x0, lParam=0x0) [winproc.c:2463]) (ebp=40c45774)
X11DRV_DIB_BuildColorMap:
if ((isInfo = (info->bmiHeader.biSize == sizeof(BITMAPINFOHEADER))))
{
colors = info->bmiHeader.biClrUsed;
if (!colors) colors = 1 << info->bmiHeader.biBitCount;
colorPtr = (WORD *)info->bmiColors;
ERR("color #1\n");
}
if (isInfo)
{
RGBQUAD * rgb = (RGBQUAD *)colorPtr;
ERR("has been called with %d colors !\n", colors);
if (depth == 1) /* Monochrome */
for (i = 0; i < colors; i++, rgb++)
colorMapping[i] = (rgb->rgbRed + rgb->rgbGreen +
rgb->rgbBlue > 255*3/2);
else
for (i = 0; i < colors; i++, rgb++)
{
ERR("color %d/%d: rgb: %p\n", i, colors, rgb);
colorMapping[i] = X11DRV_PALETTE_ToPhysical( dc,
RGB(rgb->rgbRed, rgb->rgbGreen, rgb->rgbBlue) );
ERR("%i done.\n", i);
}
Besides, this animation going on before the crash is looking stoned.
(way too many wrong colors there IMHO)
BTW:
/usr/local/src/wine/wine -dll msvideo,msvfw32=n -debugmsg +dll,+module -desktop
640x480 "hl.exe -console -width 640 -height 480 +map c1a0"
In CreateDIBitmap:
ERR("# colors: %d/%d/%d\n", header->biClrUsed, header->biClrImportant,
header->biBitCount);
-->
err:bitmap:CreateDIBitmap # colors: 0/0/8
And I get tons of
fixme:bitmap:X11DRV_DIB_GetImageBits_24 from 16 bit bitmap with mask R,G,B 0,0,0 to 24
bit DIB
Any ideas, anybody ?
Andreas Mohr