79489: gdiplus: Include an alpha channel in HBITMAPs created from Bitmaps.

buildbot at kegel.com buildbot at kegel.com
Mon Oct 3 09:37:59 CDT 2011


This is an experimental automated build and test service.
Please feel free to ignore this email while we work the kinks out.

For more info about this message, see http://wiki.winehq.org/BuildBot

The Buildbot has detected a failed build on builder runtests-default-x86_64 while building Wine.
Full details are available at: http://buildbot.kegel.com/builders/runtests-default-x86_64/builds/173 (though maybe not for long, as I'm still reinstalling the buildbot periodically while experimenting)
BUILD FAILED: failed shell_3

Errors:
alarum: failed command was ../../../wine gdiplus_test.exe.so image.c 
fixme:gdiplus:GdipCreateBitmapFromGdiDib ((nil), 0x22f8c0, 0x22f478) - partially implemented
fixme:gdiplus:GdipCreateBitmapFromGdiDib (0x22f490, (nil), 0x22f478) - partially implemented
fixme:gdiplus:GdipCreateBitmapFromGdiDib (0x22f490, 0x22f8c0, (nil)) - partially implemented
fixme:gdiplus:GdipCreateBitmapFromGdiDib (0x22f490, 0x22f8c0, 0x22f478) - partially implemented
fixme:gdiplus:GdipCreateBitmapFromGdiDib (0x22f490, 0x22f8c0, 0x22f478) - partially implemented
fixme:gdiplus:GdipCreateBitmapFromGdiDib (0x22f490, 0x22f8c0, 0x22f478) - partially implemented
fixme:gdiplus:GdipCreateBitmapFromGdiDib (0x22f490, 0x22f8c0, 0x22f478) - partially implemented
fixme:gdiplus:GdipCreateBitmapFromGdiDib (0x22f490, 0x22f8c0, 0x22f478) - partially implemented
fixme:gdiplus:GdipCreateBitmapFromGdiDib (0x22f490, 0x22f8c0, 0x22f478) - partially implemented
fixme:gdiplus:GdipCreateBitmapFromGdiDib (0x22f490, 0x22f8c0, 0x22f478) - partially implemented
fixme:gdiplus:GdipCreateBitmapFromGdiDib don't know how to handle 0 bpp
fixme:gdiplus:GdipImageGetFrameCount returning frame count of 1
fixme:gdiplus:GdipImageSelectActiveFrame not implemented
fixme:wincodecs:JpegDecoder_Frame_GetResolution (0x33da8,0x22f838,0x22f830): stub
fixme:gdiplus:GdipGetMetafileHeaderFromMetafile not implemented
wine: Unhandled page fault on write access to 0xffffffff002302f8 at address 0x2b1a24f0d92a (thread 002f), starting debugger...
Unhandled exception: page fault on write access to 0xffffffff002302f8 in 64-bit code (0x00002b1a24f0d92a).
Register dump:
 rip:00002b1a24f0d92a rsp:000000000022f340 rbp:000000000022f340 eflags:00010282 (  R- --  I S - - - )
 rax:00000000ff686868 rbx:0000000000000020 rcx:00000000ff686800 rdx:ffffffff002302f8
 rsi:0000000000000068 rdi:0000000000000068  r8:ffffffff002302f8  r9:0000000000000000 r10:0000000000000014
 r11:00000000000e200b r12:000000007bf00c00 r13:00007fff4f4dd130 r14:0000000000000000 r15:0000000000000000
Stack dump:
0x000000000022f340:  000000000022f470 00002b1a24f12244
0x000000000022f350:  000e200b00000020 ffffffff002302f8
0x000000000022f360:  ffffffd80022f440 0000000a00000014
0x000000000022f370:  00000000000004f8 000000000002af40
0x000000000022f380:  000000000000007c 00007fffffbef000
0x000000000022f390:  5b5b5b5b5b5b5b5b 5b5b5b5b5b5b5b5b
0x000000000022f3a0:  2020202020202020 2020202020202020
0x000000000022f3b0:  0000000000202020 0000000000000000
0x000000000022f3c0:  ffff00ffffffffff ffffffff00ffffff
0x000000000022f3d0:  0000000000202020 0000000000000000
0x000000000022f3e0:  000000ffffffffff 0000ff00ff000000
0x000000000022f3f0:  0000000000000000 0000000000000000
Backtrace:
=>0 0x00002b1a24f0d92a setpixel_32bppPARGB+0xd0(r='h', g='h', b='h', a=-1, row=*** invalid address 0xffffffff002302f8 ***, x=0) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/gdiplus/image.c:403] in gdiplus (0x000000000022f340)
  1 0x00002b1a24f12244 convert_pixels+0x40c3(width=0xa, height=0x14, dst_stride=0xffffffd8, dst_bits=*** invalid address 0xffffffff002302f8 ***, dst_format=0xe200b, src_stride=0x20, src_bits="hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh", src_format=0x21808, src_palette=0x0(nil)) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/gdiplus/image.c:737] in gdiplus (0x000000000022f470)
  2 0x00002b1a24f15549 GdipBitmapLockBits+0x6b6(bitmap=0x2a870, rect=(nil), flags=0x5, format=0xe200b, lockeddata=0x22f630) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/gdiplus/image.c:1010] in gdiplus (0x000000000022f5c0)
  3 0x00002b1a24f1708f GdipCreateHBITMAPFromBitmap+0x245(bitmap=0x2a870, hbmReturn=0x22f798, background=0) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/gdiplus/image.c:1409] in gdiplus (0x000000000022f730)
  4 0x00002b1a24c7fb1b test_createhbitmap+0x181() [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/gdiplus/tests/image.c:1501] in gdiplus_test (0x000000000022fa60)
  5 0x00002b1a24c8656d func_image+0x99() [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/gdiplus/tests/image.c:2587] in gdiplus_test (0x000000000022fab0)
  6 0x00002b1a24ca0d6f run_test+0x9c(name="image.c") [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/gdiplus/tests/../../../include/wine/test.h:556] in gdiplus_test (0x000000000022fb00)
  7 0x00002b1a24ca11e4 main+0x21d(argc=0x2, argv=0x10640) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/gdiplus/tests/../../../include/wine/test.h:624] in gdiplus_test (0x000000000022fbd0)
  8 0x00002b1a24ca12ad __wine_spec_exe_entry+0xb0(peb=0x7fffffbef000) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/winecrt0/exe_entry.c:36] in gdiplus_test (0x000000000022fcc0)
  9 0x000000007b87c8a7 call_process_entry+0x1c(peb=0x7fffffbef000, entry=0x2b1a24ca11fc) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/kernel32/process.c:1060] in kernel32 (0x000000000022fd00)
  10 0x000000007b87ca6a start_process+0x1c0(peb=0x7fffffbef000) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/kernel32/process.c:1091] in kernel32 (0x000000000022fe20)
  11 0x00002b1a2364bd64 call_thread_func+0x4e(entry=0x7b87c8a9, arg=0x7fffffbef000, frame=0x22ff80) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/ntdll/signal_x86_64.c:3189] in ntdll (0x000000000022ff70)
  12 0x00002b1a2364be1a call_thread_entry_point+0x29() in ntdll (0x000000000022fff0)
  13 0x00002b1a2361044b start_process+0x30(kernel_start=0x7b87c8a9) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/ntdll/loader.c:2612] in ntdll (0x000000000022fff0)
  14 0x00002b1a22aa55f7 wine_call_on_stack+0x12() in libwine.so.1 (0x00007fff4f4db9c0)
  15 0x00002b1a22aa55dd wine_switch_to_stack+0x2a(func=0x2b1a2361041a, arg=0x7b87c8a9, stack=0x230000) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/libs/wine/port.c:59] in libwine.so.1 (0x00007fff4f4db9f0)
  16 0x00002b1a23610913 LdrInitializeThunk+0x4c7(kernel_start=0x7b87c8a9, unknown2=0, unknown3=0, unknown4=0) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/ntdll/loader.c:2668] in ntdll (0x00007fff4f4dbb80)
  17 0x000000007b87d3f6 __wine_kernel_init+0x74d() [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/kernel32/process.c:1261] in kernel32 (0x00007fff4f4dcb40)
  18 0x00002b1a2361137a __wine_process_init+0x126() [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/ntdll/loader.c:2877] in ntdll (0x00007fff4f4dcba0)
  19 0x00002b1a22aa3db0 wine_init+0x144(argc=0x3, argv=0x7fff4f4dd138, error="", error_size=0x400) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/libs/wine/loader.c:831] in libwine.so.1 (0x00007fff4f4dcc10)
  20 0x000000007bf00f14 main+0x15d(argc=0x3, argv=0x7fff4f4dd138) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/loader/main.c:228] in <wine-loader> (0x00007fff4f4dd050)
  21 0x00002b1a2302eeff __libc_start_main+0xfe() in libc.so.6 (0x0000000000000000)
  22 0x000000007bf00c29 _start+0x28() in <wine-loader> (0x0000000000000000)
0x00002b1a24f0d92a setpixel_32bppPARGB+0xd0 [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/gdiplus/image.c:403] in gdiplus: movl	%eax,(%rdx)
403	    *((DWORD*)(row)+x) = (a<<24)|(r<<16)|(g<<8)|b;
Modules:
Module	Address					Debug info	Name (66 modules)
ELF	        7b800000-        7bbec000	Dwarf           kernel32<elf>
  \-PE	        7b820000-        7bbec000	\               kernel32
ELF	        7be00000-        7c103000	Dwarf           <wine-loader>
ELF	    2b1a22876000-    2b1a22a99000	Deferred        ld-linux-x86-64.so.2
ELF	    2b1a22a9b000-    2b1a22dce000	Dwarf           libwine.so.1
ELF	    2b1a22df1000-    2b1a2300f000	Deferred        libpthread.so.0
ELF	    2b1a23010000-    2b1a233a4000	Dwarf           libc.so.6
ELF	    2b1a233a4000-    2b1a235a8000	Deferred        libdl.so.2
ELF	    2b1a235ab000-    2b1a238bc000	Dwarf           ntdll<elf>
  \-PE	    2b1a235c0000-    2b1a238bc000	\               ntdll
ELF	    2b1a238df000-    2b1a23b64000	Deferred        libm.so.6
ELF	    2b1a23b64000-    2b1a23d7a000	Deferred        libgcc_s.so.1
ELF	    2b1a23d7a000-    2b1a23f83000	Deferred        libnss_compat.so.2
ELF	    2b1a23f83000-    2b1a2419d000	Deferred        libnsl.so.1
ELF	    2b1a2419d000-    2b1a243a9000	Deferred        libnss_nis.so.2
ELF	    2b1a243a9000-    2b1a245b6000	Deferred        libnss_files.so.2
ELF	    2b1a24c40000-    2b1a24eb1000	Dwarf           gdiplus_test<elf>
  \-PE	    2b1a24c50000-    2b1a24eb1000	\               gdiplus_test
ELF	    2b1a24eb1000-    2b1a2515b000	Dwarf           gdiplus<elf>
  \-PE	    2b1a24ec0000-    2b1a2515b000	\               gdiplus
ELF	    2b1a2515b000-    2b1a253f3000	Deferred        shlwapi<elf>
  \-PE	    2b1a25170000-    2b1a253f3000	\               shlwapi
ELF	    2b1a253f3000-    2b1a257ba000	Deferred        user32<elf>
  \-PE	    2b1a25410000-    2b1a257ba000	\               user32
ELF	    2b1a257ba000-    2b1a25ab7000	Deferred        gdi32<elf>
  \-PE	    2b1a257d0000-    2b1a25ab7000	\               gdi32
ELF	    2b1a25ab7000-    2b1a25d46000	Deferred        advapi32<elf>
  \-PE	    2b1a25ad0000-    2b1a25d46000	\               advapi32
ELF	    2b1a25d46000-    2b1a25f61000	Deferred        version<elf>
  \-PE	    2b1a25d50000-    2b1a25f61000	\               version
ELF	    2b1a25f61000-    2b1a262fe000	Deferred        oleaut32<elf>
  \-PE	    2b1a25f80000-    2b1a262fe000	\               oleaut32
ELF	    2b1a262fe000-    2b1a266cd000	Deferred        ole32<elf>
  \-PE	    2b1a26320000-    2b1a266cd000	\               ole32
ELF	    2b1a266cd000-    2b1a26973000	Deferred        rpcrt4<elf>
  \-PE	    2b1a266e0000-    2b1a26973000	\               rpcrt4
ELF	    2b1a26996000-    2b1a26c2f000	Deferred        libfreetype.so.6
ELF	    2b1a26c2f000-    2b1a26e47000	Deferred        libz.so.1
ELF	    2b1a26e6a000-    2b1a270a0000	Deferred        libfontconfig.so.1
ELF	    2b1a270a0000-    2b1a272ca000	Deferred        libexpat.so.1
ELF	    2b1a27334000-    2b1a27611000	Deferred        winex11<elf>
  \-PE	    2b1a27340000-    2b1a27611000	\               winex11
ELF	    2b1a27634000-    2b1a2783c000	Deferred        libsm.so.6
ELF	    2b1a2783c000-    2b1a27a57000	Deferred        libice.so.6
ELF	    2b1a27a57000-    2b1a27c69000	Deferred        libxext.so.6
ELF	    2b1a27c69000-    2b1a27fa3000	Deferred        libx11.so.6
ELF	    2b1a27fa3000-    2b1a281a8000	Deferred        libuuid.so.1
ELF	    2b1a281a8000-    2b1a283c4000	Deferred        libxcb.so.1
ELF	    2b1a283c4000-    2b1a285c7000	Deferred        libxau.so.6
ELF	    2b1a285c7000-    2b1a287cd000	Deferred        libxdmcp.so.6
ELF	    2b1a287cd000-    2b1a289f5000	Deferred        imm32<elf>
  \-PE	    2b1a287d0000-    2b1a289f5000	\               imm32
ELF	    2b1a289f5000-    2b1a28bf8000	Deferred        libxinerama.so.1
ELF	    2b1a28bf8000-    2b1a28dfe000	Deferred        libxxf86vm.so.1
ELF	    2b1a28dfe000-    2b1a29009000	Deferred        libxrender.so.1
ELF	    2b1a29009000-    2b1a29212000	Deferred        libxrandr.so.2
ELF	    2b1a29212000-    2b1a29415000	Deferred        libxcomposite.so.1
ELF	    2b1a29415000-    2b1a29625000	Deferred        libxi.so.6
ELF	    2b1a29625000-    2b1a2982f000	Deferred        libxcursor.so.1
ELF	    2b1a2982f000-    2b1a29a35000	Deferred        libxfixes.so.3
ELF	    2b1a29a4b000-    2b1a29d2d000	Deferred        windowscodecs<elf>
  \-PE	    2b1a29a60000-    2b1a29d2d000	\               windowscodecs
ELF	    2b1a29d50000-    2b1a29f77000	Deferred        libpng12.so.0
ELF	    2b1a29f77000-    2b1a2a19b000	Deferred        libjpeg.so.62
ELF	    2b1a2a19b000-    2b1a2a3fe000	Deferred        libtiff.so.4
ELF	    7fff4f5b2000-    7fff4f5b3000	Deferred        [vdso].so
Threads:
process  tid      prio (all id:s are in hex)
0000000e services.exe
	0000001f    0
	0000001e    0
	00000015    0
	00000010    0
	0000000f    0
00000012 winedevice.exe
	0000001a    0
	00000019    0
	00000014    0
	00000013    0
0000001b plugplay.exe
	00000020    0
	0000001d    0
	0000001c    0
00000021 explorer.exe
	00000022    0
0000002d (D) Z:\home\bob\wineslave.dir\sandbox\slave\runtests-default-x86_64\build\dlls\gdiplus\tests\gdiplus_test.exe
	0000002f    0 <==
Backtrace:
=>0 0x00002b1a24f0d92a setpixel_32bppPARGB+0xd0(r='h', g='h', b='h', a=-1, row=*** invalid address 0xffffffff002302f8 ***, x=0) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/gdiplus/image.c:403] in gdiplus (0x000000000022f340)
  1 0x00002b1a24f12244 convert_pixels+0x40c3(width=0xa, height=0x14, dst_stride=0xffffffd8, dst_bits=*** invalid address 0xffffffff002302f8 ***, dst_format=0xe200b, src_stride=0x20, src_bits="hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh", src_format=0x21808, src_palette=0x0(nil)) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/gdiplus/image.c:737] in gdiplus (0x000000000022f470)
  2 0x00002b1a24f15549 GdipBitmapLockBits+0x6b6(bitmap=0x2a870, rect=(nil), flags=0x5, format=0xe200b, lockeddata=0x22f630) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/gdiplus/image.c:1010] in gdiplus (0x000000000022f5c0)
  3 0x00002b1a24f1708f GdipCreateHBITMAPFromBitmap+0x245(bitmap=0x2a870, hbmReturn=0x22f798, background=0) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/gdiplus/image.c:1409] in gdiplus (0x000000000022f730)
  4 0x00002b1a24c7fb1b test_createhbitmap+0x181() [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/gdiplus/tests/image.c:1501] in gdiplus_test (0x000000000022fa60)
  5 0x00002b1a24c8656d func_image+0x99() [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/gdiplus/tests/image.c:2587] in gdiplus_test (0x000000000022fab0)
  6 0x00002b1a24ca0d6f run_test+0x9c(name="image.c") [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/gdiplus/tests/../../../include/wine/test.h:556] in gdiplus_test (0x000000000022fb00)
  7 0x00002b1a24ca11e4 main+0x21d(argc=0x2, argv=0x10640) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/gdiplus/tests/../../../include/wine/test.h:624] in gdiplus_test (0x000000000022fbd0)
  8 0x00002b1a24ca12ad __wine_spec_exe_entry+0xb0(peb=0x7fffffbef000) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/winecrt0/exe_entry.c:36] in gdiplus_test (0x000000000022fcc0)
  9 0x000000007b87c8a7 call_process_entry+0x1c(peb=0x7fffffbef000, entry=0x2b1a24ca11fc) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/kernel32/process.c:1060] in kernel32 (0x000000000022fd00)
  10 0x000000007b87ca6a start_process+0x1c0(peb=0x7fffffbef000) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/kernel32/process.c:1091] in kernel32 (0x000000000022fe20)
  11 0x00002b1a2364bd64 call_thread_func+0x4e(entry=0x7b87c8a9, arg=0x7fffffbef000, frame=0x22ff80) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/ntdll/signal_x86_64.c:3189] in ntdll (0x000000000022ff70)
  12 0x00002b1a2364be1a call_thread_entry_point+0x29() in ntdll (0x000000000022fff0)
  13 0x00002b1a2361044b start_process+0x30(kernel_start=0x7b87c8a9) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/ntdll/loader.c:2612] in ntdll (0x000000000022fff0)
  14 0x00002b1a22aa55f7 wine_call_on_stack+0x12() in libwine.so.1 (0x00007fff4f4db9c0)
  15 0x00002b1a22aa55dd wine_switch_to_stack+0x2a(func=0x2b1a2361041a, arg=0x7b87c8a9, stack=0x230000) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/libs/wine/port.c:59] in libwine.so.1 (0x00007fff4f4db9f0)
  16 0x00002b1a23610913 LdrInitializeThunk+0x4c7(kernel_start=0x7b87c8a9, unknown2=0, unknown3=0, unknown4=0) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/ntdll/loader.c:2668] in ntdll (0x00007fff4f4dbb80)
  17 0x000000007b87d3f6 __wine_kernel_init+0x74d() [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/kernel32/process.c:1261] in kernel32 (0x00007fff4f4dcb40)
  18 0x00002b1a2361137a __wine_process_init+0x126() [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/dlls/ntdll/loader.c:2877] in ntdll (0x00007fff4f4dcba0)
  19 0x00002b1a22aa3db0 wine_init+0x144(argc=0x3, argv=0x7fff4f4dd138, error="", error_size=0x400) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/libs/wine/loader.c:831] in libwine.so.1 (0x00007fff4f4dcc10)
  20 0x000000007bf00f14 main+0x15d(argc=0x3, argv=0x7fff4f4dd138) [/home/bob/wineslave.dir/sandbox/slave/runtests-default-x86_64/build/loader/main.c:228] in <wine-loader> (0x00007fff4f4dd050)
  21 0x00002b1a2302eeff __libc_start_main+0xfe() in libc.so.6 (0x0000000000000000)
  22 0x000000007bf00c29 _start+0x28() in <wine-loader> (0x0000000000000000)
make: *** [image.ok] Error 5

-------------- next part --------------
From: Vincent Povirk <vincent at codeweavers.com>
Subject: gdiplus: Include an alpha channel in HBITMAPs created from Bitmaps.
Message-Id: <CAG_NDKriXdZdjd-_tdg3E0BobOz8gXoWEeCprmiPxFB2NqwCHQ at mail.gmail.com>
Date: Mon, 3 Oct 2011 09:22:23 -0500

For bug 25549.

From e1fcb02c48ae2bd397da1ed60319eda8eb1ff445 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Thu, 29 Sep 2011 11:58:17 -0500
Subject: [PATCH] gdiplus: Include an alpha channel in HBITMAPs created from Bitmaps.

---
 dlls/gdiplus/image.c       |   26 +++++++++--------------
 dlls/gdiplus/tests/image.c |   49 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 16 deletions(-)

diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index fe1656f..4ae1d64 100644
--- a/dlls/gdiplus/image.c
+++ b/dlls/gdiplus/image.c
@@ -1370,12 +1370,12 @@ GpStatus WINGDIPAPI GdipCreateHBITMAPFromBitmap(GpBitmap* bitmap,
     HBITMAP* hbmReturn, ARGB background)
 {
     GpStatus stat;
-    HBITMAP result, oldbitmap;
+    HBITMAP result;
     UINT width, height;
     HDC hdc;
-    GpGraphics *graphics;
     BITMAPINFOHEADER bih;
-    void *bits;
+    LPBYTE bits;
+    BitmapData lockeddata;
     TRACE("(%p,%p,%x)\n", bitmap, hbmReturn, background);
 
     if (!bitmap || !hbmReturn) return InvalidParameter;
@@ -1398,25 +1398,19 @@ GpStatus WINGDIPAPI GdipCreateHBITMAPFromBitmap(GpBitmap* bitmap,
     hdc = CreateCompatibleDC(NULL);
     if (!hdc) return GenericError;
 
-    result = CreateDIBSection(hdc, (BITMAPINFO*)&bih, DIB_RGB_COLORS, &bits,
+    result = CreateDIBSection(hdc, (BITMAPINFO*)&bih, DIB_RGB_COLORS, (void**)&bits,
         NULL, 0);
 
     if (result)
     {
-        oldbitmap = SelectObject(hdc, result);
-
-        stat = GdipCreateFromHDC(hdc, &graphics);
-        if (stat == Ok)
-        {
-            stat = GdipGraphicsClear(graphics, background);
+        lockeddata.Stride = -width * 4;
+        lockeddata.Scan0 = bits - (lockeddata.Stride * (height - 1));
 
-            if (stat == Ok)
-                stat = GdipDrawImage(graphics, (GpImage*)bitmap, 0, 0);
+        stat = GdipBitmapLockBits(bitmap, NULL, ImageLockModeRead|ImageLockModeUserInputBuf,
+            PixelFormat32bppPARGB, &lockeddata);
 
-            GdipDeleteGraphics(graphics);
-        }
-
-        SelectObject(hdc, oldbitmap);
+        if (stat == Ok)
+            stat = GdipBitmapUnlockBits(bitmap, &lockeddata);
     }
     else
         stat = GenericError;
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c
index 77aec93..44554a5 100644
--- a/dlls/gdiplus/tests/image.c
+++ b/dlls/gdiplus/tests/image.c
@@ -1514,6 +1514,12 @@ static void test_createhbitmap(void)
         expect(32, bm.bmBitsPixel);
         ok(bm.bmBits != NULL, "got DDB, expected DIB\n");
 
+        if (bm.bmBits)
+        {
+            DWORD val = *(DWORD*)bm.bmBits;
+            ok(val == 0xff686868, "got %x, expected 0xff686868\n", val);
+        }
+
         hdc = CreateCompatibleDC(NULL);
 
         oldhbitmap = SelectObject(hdc, hbitmap);
@@ -1529,6 +1535,49 @@ static void test_createhbitmap(void)
 
     stat = GdipDisposeImage((GpImage*)bitmap);
     expect(Ok, stat);
+
+    /* create alpha Bitmap */
+    stat = GdipCreateBitmapFromScan0(8, 20, 32, PixelFormat32bppARGB, bits, &bitmap);
+    expect(Ok, stat);
+
+    /* create HBITMAP */
+    stat = GdipCreateHBITMAPFromBitmap(bitmap, &hbitmap, 0);
+    expect(Ok, stat);
+
+    if (stat == Ok)
+    {
+        ret = GetObjectA(hbitmap, sizeof(BITMAP), &bm);
+        expect(sizeof(BITMAP), ret);
+
+        expect(0, bm.bmType);
+        expect(8, bm.bmWidth);
+        expect(20, bm.bmHeight);
+        expect(32, bm.bmWidthBytes);
+        expect(1, bm.bmPlanes);
+        expect(32, bm.bmBitsPixel);
+        ok(bm.bmBits != NULL, "got DDB, expected DIB\n");
+
+        if (bm.bmBits)
+        {
+            DWORD val = *(DWORD*)bm.bmBits;
+            ok(val == 0x682a2a2a, "got %x, expected 0x682a2a2a\n", val);
+        }
+
+        hdc = CreateCompatibleDC(NULL);
+
+        oldhbitmap = SelectObject(hdc, hbitmap);
+        pixel = GetPixel(hdc, 5, 5);
+        SelectObject(hdc, oldhbitmap);
+
+        DeleteDC(hdc);
+
+        expect(0x2a2a2a, pixel);
+
+        DeleteObject(hbitmap);
+    }
+
+    stat = GdipDisposeImage((GpImage*)bitmap);
+    expect(Ok, stat);
 }
 
 static void test_getthumbnail(void)
-- 
1.7.4.1



More information about the wine-tests-results mailing list