-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
today when i run warcraft3 demo, i have a crash in imm32! here are the traces:
- -=(FeniX as fenix@DarkBluE)-(on tty1)-(at 10:00:12)=- -={$:'/usr/src/wine/Program Files/Warcraft III Demo'}=->wine --debugmsg +imm War3Demo.exe trace:imm:DllMain 0x42120000, 1, (nil) trace:imm:DllMain 0x42120000, 2, (nil) trace:imm:DllMain 0x42120000, 2, (nil) fixme:d3d:IDirect3D8Impl_CreateDevice Requested full screen support not implemented, expect windowed operation fixme:d3d:IDirect3D8Impl_CheckDeviceFormat (0x404309b8)->(Adptr:0, DevType: 1, AdptFmt: 23, Use: 0, ResTyp: 3, CheckFmt: 21) trace:imm:DllMain 0x42120000, 2, (nil) trace:imm:DllMain 0x42120000, 2, (nil) trace:imm:DllMain 0x42120000, 2, (nil) trace:imm:DllMain 0x42120000, 2, (nil) fixme:win32:CreateIoCompletionPort (0xffffffff, (nil), 00000000, 00000000): stub. trace:imm:DllMain 0x42120000, 2, (nil) trace:imm:DllMain 0x42120000, 2, (nil) fixme:imm:ImmGetContext (0x10021): stub fixme:imm:ImmGetOpenStatus ((nil)): semi-stub
looking a the code i can see:
/*********************************************************************** * ImmGetContext (IMM32.@) */ HIMC WINAPI ImmGetContext(HWND hWnd) { FIXME("(%p): stub\n", hWnd); return (HIMC)root_context; } /*********************************************************************** * ImmGetOpenStatus (IMM32.@) */ BOOL WINAPI ImmGetOpenStatus(HIMC hIMC) { InputContextData *data = (InputContextData*)hIMC;
FIXME("(%p): semi-stub\n", hIMC);
return data->bOpen; }
with the debugger attached, i can see that data is NULL;
Why ? Because root_context is a static var init to NULL!!!! And it can be only valued by ImmAssociateContext (who isn't called as seen in traces)
Anyone have an idea why its broken today ?
Regards, Raphael
"Raphaël" == Raphaël Junqueira fenix@club-internet.fr writes:
Raphaël> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Raphaël> Hi,
Raphaël> today when i run warcraft3 demo, i have a crash in imm32! Raphaël> here are the traces:
Raphaël> - -=(FeniX as fenix@DarkBluE)-(on tty1)-(at 10:00:12)=- Raphaël> -={$:'/usr/src/wine/Program Files/Warcraft III Demo'}=->wine Raphaël> --debugmsg +imm War3Demo.exe trace:imm:DllMain 0x42120000, 1, Raphaël> (nil) trace:imm:DllMain 0x42120000, 2, (nil) trace:imm:DllMain Raphaël> 0x42120000, 2, (nil) fixme:d3d:IDirect3D8Impl_CreateDevice Raphaël> Requested full screen support not implemented, expect windowed Raphaël> operation fixme:d3d:IDirect3D8Impl_CheckDeviceFormat Raphaël> (0x404309b8)->(Adptr:0, DevType: 1, AdptFmt: 23, Use: 0, Raphaël> ResTyp: 3, CheckFmt: 21) trace:imm:DllMain 0x42120000, 2, (nil) Raphaël> trace:imm:DllMain 0x42120000, 2, (nil) trace:imm:DllMain Raphaël> 0x42120000, 2, (nil) trace:imm:DllMain 0x42120000, 2, (nil) Raphaël> fixme:win32:CreateIoCompletionPort (0xffffffff, (nil), Raphaël> 00000000, 00000000): stub. trace:imm:DllMain 0x42120000, 2, Raphaël> (nil) trace:imm:DllMain 0x42120000, 2, (nil) Raphaël> fixme:imm:ImmGetContext (0x10021): stub Raphaël> fixme:imm:ImmGetOpenStatus ((nil)): semi-stub
The traces don't show a crash...
Bye
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Le Mercredi 14 Mai 2003 10:14, Uwe Bonnes a écrit :
"Raphaël" == Raphaël Junqueira fenix@club-internet.fr writes:
Raphaël> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Raphaël> Hi, Raphaël> today when i run warcraft3 demo, i have a crash in imm32! Raphaël> here are the traces: Raphaël> - -=(FeniX as fenix@DarkBluE)-(on tty1)-(at 10:00:12)=- Raphaël> -={$:'/usr/src/wine/Program Files/Warcraft III Demo'}=->wine Raphaël> --debugmsg +imm War3Demo.exe trace:imm:DllMain 0x42120000, 1, Raphaël> (nil) trace:imm:DllMain 0x42120000, 2, (nil) trace:imm:DllMain Raphaël> 0x42120000, 2, (nil) fixme:d3d:IDirect3D8Impl_CreateDevice Raphaël> Requested full screen support not implemented, expect windowed Raphaël> operation fixme:d3d:IDirect3D8Impl_CheckDeviceFormat Raphaël> (0x404309b8)->(Adptr:0, DevType: 1, AdptFmt: 23, Use: 0, Raphaël> ResTyp: 3, CheckFmt: 21) trace:imm:DllMain 0x42120000, 2,
(nil) Raphaël> trace:imm:DllMain 0x42120000, 2, (nil) trace:imm:DllMain Raphaël> 0x42120000, 2, (nil) trace:imm:DllMain 0x42120000, 2, (nil) Raphaël> fixme:win32:CreateIoCompletionPort (0xffffffff, (nil), Raphaël> 00000000, 00000000): stub. trace:imm:DllMain 0x42120000, 2, Raphaël> (nil) trace:imm:DllMain 0x42120000, 2, (nil) Raphaël> fixme:imm:ImmGetContext (0x10021): stub Raphaël> fixme:imm:ImmGetOpenStatus ((nil)): semi-stub
The traces don't show a crash...
because warcraft3 catch it and print a beatiful messagebox for it ;) but if you prefer like that:
winedbg --debugmsg +imm War3Demo.exe <snip loading debug syms> fixme:d3d:IDirect3D8Impl_CreateDevice Requested full screen support not implemented, expect windowed operation fixme:d3d:IDirect3D8Impl_CheckDeviceFormat (0x40451a48)->(Adptr:0, DevType: 1, AdptFmt: 23, Use: 0, ResTyp: 3, CheckFmt: 21) trace:imm:DllMain 0x42120000, 2, (nil) fixme:win32:CreateIoCompletionPort (0xffffffff, (nil), 00000000, 00000000): stub. trace:imm:DllMain 0x42120000, 2, (nil) trace:imm:DllMain 0x42120000, 2, (nil) trace:imm:DllMain 0x42120000, 2, (nil) fixme:imm:ImmGetContext (0x10021): stub fixme:imm:ImmGetOpenStatus ((nil)): semi-stub First chance exception: page fault on read access to 0x00000024 in 32-bit code (0x42130f58). Register dump: CS:0023 SS:002b DS:002b ES:002b FS:008f GS:0007 EIP:42130f58 ESP:407321c0 EBP:407321d0 EFLAGS:00010216( R- 00 I -A-P1 ) EAX:00000000 EBX:42134350 ECX:40115968 EDX:00000013 ESI:4bcc0088 EDI:00000000 Stack dump: 0x407321c0 (NTDLL.DLL.sqrt+0x38f580): 00000000 42134250 00000000 00010021 0x407321d0 (NTDLL.DLL.sqrt+0x38f590): 407321f0 6f441492 00000000 00000000 0x407321e0 (NTDLL.DLL.sqrt+0x38f5a0): 4bcc0088 4bcd00b0 407321f4 40732204 0x407321f0 (NTDLL.DLL.sqrt+0x38f5b0): 40732204 6f43ed0e 4a140200 00000000 0x40732200 (NTDLL.DLL.sqrt+0x38f5c0): 4a140200 40732224 6f0aea52 4a140200 0x40732210 (NTDLL.DLL.sqrt+0x38f5d0): 00000000 ffff8000 00000000 47ca06b0 0x40732220 (NTDLL.DLL.sqrt+0x38f5e0):
0011: sel=008f base=4010f100 limit=00000fff 32-bit rw- Backtrace: =>0 0x42130f58 (ImmGetOpenStatus+0x5a(hIMC=0x0) [imm.c:619] in imm32.dll.so) (ebp=407321d0) 1 0x6f441492 (GAME.DLL.EntryPoint+0x19ae5 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=407321f0) 2 0x6f43ed0e (GAME.DLL.EntryPoint+0x17361 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=40732204) 3 0x6f0aea52 (GAME.DLL.GameMain+0xaa8d2 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=40732224) 4 0x6f0af18d (GAME.DLL.GameMain+0xab00d in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=40732244) 5 0x6f0b1c33 (GAME.DLL.GameMain+0xadab3 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=4073226c) 6 0x6f0b1ad9 (GAME.DLL.GameMain+0xad959 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=40732288) 7 0x6f0b4f90 (GAME.DLL.GameMain+0xb0e10 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=407322a8) 8 0x6f0af1a2 (GAME.DLL.GameMain+0xab022 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=407322d0) 9 0x6f0b1c33 (GAME.DLL.GameMain+0xadab3 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=407322f8) 10 0x6f0b1ad9 (GAME.DLL.GameMain+0xad959 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=40732314) 11 0x6f0b4f90 (GAME.DLL.GameMain+0xb0e10 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=40732334) 12 0x6f0af1a2 (GAME.DLL.GameMain+0xab022 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=4073235c) 13 0x6f0af924 (GAME.DLL.GameMain+0xab7a4 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=40732390) 14 0x6f2d9799 (GAME.DLL.GameMain+0x2d5619 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=40732430) 15 0x6f2de41f (GAME.DLL.GameMain+0x2da29f in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=40732884) 16 0x6f2da24a (GAME.DLL.GameMain+0x2d60ca in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=407328c4) 17 0x6f437e25 (GAME.DLL.EntryPoint+0x10478 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=407328e4) 18 0x6f438521 (GAME.DLL.EntryPoint+0x10b74 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=4073290c) 19 0x6f0407fe (GAME.DLL.GameMain+0x3c67e in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=407329c0) 20 0x6f041574 (GAME.DLL.GameMain+0x3d3f4 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=407329dc) 21 0x6f01ece4 (GAME.DLL.GameMain+0x1ab64 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=40732a08) 22 0x6f01ee71 (GAME.DLL.GameMain+0x1acf1 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=40732a30) 23 0x6f019459 (GAME.DLL.GameMain+0x152d9 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=40732a54) 24 0x6f008a54 (GAME.DLL.GameMain+0x48d4 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=40732ad0) 25 0x6f008a89 (GAME.DLL.GameMain+0x4909 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=40732b44) 26 0x6f0087a3 (GAME.DLL.GameMain+0x4623 in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=40732b5c) 27 0x6f03576a (GAME.DLL.GameMain+0x315ea in C:\PROGRAM FILES\WARCRAFT III DEMO\GAME.DLL) (ebp=40732c20) 28 0x00440c4b (War3Demo.exe.Jg+0x39db in C:\Program Files\Warcraft III Demo\War3Demo.exe) (ebp=40732c54) 29 0x0043da9f (War3Demo.exe.Jg+0x82f in C:\Program Files\Warcraft III Demo\War3Demo.exe) (ebp=40732cc4) 30 0x0043d621 (War3Demo.exe.Jg+0x3b1 in C:\Program Files\Warcraft III Demo\War3Demo.exe) (ebp=40732dd8) 31 0x00401148 (War3Demo.exe..text+0x148 in C:\Program Files\Warcraft III Demo\War3Demo.exe) (ebp=40732e88) 32 0x400a9a15 (start_process+0x28c [process.c:570] in libntdll.dll.so) (ebp=40732f28) 33 0x400ad887 (call_on_thread_stack+0x3c(func=0x400a9789) [sysdeps.c:115] in libntdll.dll.so) (ebp=40732ff4) 34 0x400adad4 (SYSDEPS_CallOnStack+0x14 in libntdll.dll.so) (ebp=00000000)
0x42130f58 (ImmGetOpenStatus+0x5a [imm.c:619] in imm32.dll.so): movl 0x24(%eax),%eax
wine_dbg_cmd: Wine-dbg>p data Many symbols with name 'data', choose the one you want (<cr> to abort): [1]: 0x40e9990a (data [mouse.c] in x11drv.dll.so) [2]: 0x40daa280 (data [socket.c] in ws2_32.dll.so) [3]: local variable of ImmGetOpenStatus in /cvs-src/wine/dlls/imm32/imm.c => 3 0x00000000
Bye
Raphael
You could just protect it with a
if (!data) return FALSE;
If I had CVS access at work (stupid corporate politics) I'd submit it myself, not a hard fix....
Whoops, looks like i forgot to put in that protection when i coded that section.
This fix is exactly what you need, i did it most other places that data is used i just missed this one.
thanks -aric
Mike Hearn wrote:
You could just protect it with a
if (!data) return FALSE;
If I had CVS access at work (stupid corporate politics) I'd submit it myself, not a hard fix....
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Ok,
patch attached and it works perfectly with warcraft3 ;)
Changelog: - fix a warcraft3 crash when using unitialised imm apis
Thx, Raphael
Whoops, looks like i forgot to put in that protection when i coded that section.
This fix is exactly what you need, i did it most other places that data is used i just missed this one.
thanks -aric
Mike Hearn wrote:
You could just protect it with a
if (!data) return FALSE;
If I had CVS access at work (stupid corporate politics) I'd submit it myself, not a hard fix....