I need help debugging COM

Mehmet YASAR myasar at free.fr
Fri Dec 20 05:02:12 CST 2002


Hi,

I'm working on enhancing Wine's Ddraw surface code. I have not enough
experience of COM (and very small knowledge asm) to understand why I
have a crash on the following line in my test app test.exe :

lpov->Lock(NULL, &SurfaceDesc, DDLOCK_WAIT, NULL);

Here is more info on the crash :

Wine-dbg>c
First chance exception: page fault on read access to 0x00000064 in
32-bit code (0x00401a7b).
Register dump:
   CS:0023 SS:002b DS:002b ES:002b FS:008f GS:0007
   EIP:00401a7b ESP:406d28e8 EBP:406d2c68 EFLAGS:00010206(  R- 00  I   -
-P1 )
   EAX:403c670c EBX:4086b8bc ECX:403c670c EDX:00000000
   ESI:406d2bec EDI:406d2c64
Stack dump:
0x406d28e8 (NTDLL.DLL.memcpy+0x4287b8):  403c670c 00000000 406d2bfc 00000001
0x406d28f8 (NTDLL.DLL.memcpy+0x4287c8):  00000000 00020022 00000000 40098c19
0x406d2908 (NTDLL.DLL.memcpy+0x4287d8):  4086b478 400fa444 406d2934 400be095
0x406d2918 (NTDLL.DLL.memcpy+0x4287e8):  4086b478 00000002 400fa25f 40110360
0x406d2928 (NTDLL.DLL.memcpy+0x4287f8):  4086b8bc 00000000 406d29f0 406d2944
0x406d2938 (NTDLL.DLL.memcpy+0x428808):  408116fc 4086b478 4086b8bc 406d29d8
0x406d2948 (NTDLL.DLL.memcpy+0x428818):

0011: sel=008f base=40110360 limit=00000fff 32-bit rw-
Backtrace:
=>0 0x00401a7b (test.exe..text+0xa7b in Y:\devel\test.exe) (ebp=406d2c68)
    1 0x004028ee (test.exe..text+0x18ee in Y:\devel\test.exe)
(ebp=406d2d0c)
    2 0x4081a3c3 (WINPROC_wrapper+0x17 in user32.dll.so) (ebp=406d2d30)
    3 0x4081a45d (WINPROC_CallWndProc+0x8d(proc=0x402860, hwnd=0x20022,
msg=0x708, wParam=0x0, lParam=0x0) [winproc.c:183] in user32.dll.so)
(ebp=406d2d60)
ll.so) (ebp=406d2d60)
    4 0x40820e52 (CallWindowProcA+0xb2(func=0x40e80458, hwnd=0x20022,
msg=0x708, wParam=0x0, lParam=0x0) [winproc.c:2789] in user32.dll.so)
(ebp=406d2d94)
l.so) (ebp=406d2d94)
    5 0x40802114 (DispatchMessageA+0x134(msg=0x406d2de8) [message.c:1094]
in user32.dll.so) (ebp=406d2dd8)
    6 0x00402747 (test.exe..text+0x1747 in Y:\devel\test.exe) (ebp=406d2e04)
    7 0x00402fe5 (test.exe.EntryPoint+0xce in Y:\devel\test.exe)
(ebp=406d2e90)
    8 0x400b92bf (start_process+0x24f [process.c:564] in libntdll.dll.so)
(ebp=406d2f38)
    9 0x400bda27 (call_on_thread_stack+0x27(func=0x400b9070)
[sysdeps.c:112] in libntdll.dll.so) (ebp=406d2ff4)
    10 0x400bdbe0 (SYSDEPS_CallOnStack+0x14 in libntdll.dll.so)
(ebp=00000000)

0x00401a7b (test.exe..text+0xa7b in Y:\devel\test.exe): call    *0x64(%edx)
Wine-dbg>disas
0x00401a7b (test.exe..text+0xa7b in Y:\devel\test.exe): call    *0x64(%edx)
0x00401a7e (test.exe..text+0xa7e in Y:\devel\test.exe): movl
%eax,0xffffff5c(%ebp)
0x00401a84 (test.exe..text+0xa84 in Y:\devel\test.exe): movl
0xffffff5c(%ebp),%ecx
0x00401a8a (test.exe..text+0xa8a in Y:\devel\test.exe): pushl   %ecx
0x00401a8b (test.exe..text+0xa8b in Y:\devel\test.exe): pushl   $0x40a164
0x00401a90 (test.exe..text+0xa90 in Y:\devel\test.exe): pushl   $0x1
0x00401a92 (test.exe..text+0xa92 in Y:\devel\test.exe): call
0x00402510 (test.exe..text+0x1510 in Y:\devel\test.exe)
0x00401a97 (test.exe..text+0xa97 in Y:\devel\test.exe): addl    $12,%esp
0x00401a9a (test.exe..text+0xa9a in Y:\devel\test.exe): cmpl
$0x88760104,0xffffff5c(%ebp)
0x00401aa4 (test.exe..text+0xaa4 in Y:\devel\test.exe): jz
0x00401ab2 (test.exe..text+0xab2 in Y:\devel\test.exe)

I have certainly introduced bugs in ddraw code, but where should I look ?

Mehmet






More information about the wine-devel mailing list