Hi everyone,
I tried to install the game Zork : Grand Inquisitor ( probably a win16 app) and the installer crashed. With the debugger, I Obtained the attached log.
As you can see 1) CreateWindowExA is called (9170) 2) X11DRV_CreateWindow send the WM_CREATE message to the window (9168) 3) the window procedure of the app is executed (9162) and call SetForegroundWindow (9161) 4) WINPOS_SetActiveWindows is then called (9160) and send the WM_QUERYNEWPALETTE (9159) 5) When the windows procedure receive the message (9153), it call SetForegroundWindow (9152) 6) return to 4
Commenting the lines (see attached diff) in winpos.c wich send the WM_QUERYNEWPALETTE avoids the infinite loop and makes the installer work. The installer runs perfectly under Windows 98.
It seems that the app's windows procedure does not expect a WM_QUERYNEWPALETTE message.
If someone that knows this code well have an idea... else I will report this bug to bugzilla.
Ciao, Christian
9084 0x40698fe2 (CallWindowProcW+0xb2(func=0x40ec0412, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:2831] in user32.dll.so) (ebp=405d428c) 9085 0x406a8e77 (call_window_proc+0xd7(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0, unicode=0x1) [message.c:1368] in user32.dll.so) (ebp=405d42e8) 9086 0x406a9ab1 (SendMessageTimeoutW+0xe1(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0, flags=0x0, timeout=0xffffffff, res_ptr=0x405d436c) [message.c:1738] in user32.dll.so) (ebp=405d4348) 9087 0x406a9d37 (SendMessageW+0x37(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0) [message.c:1818] in user32.dll.so) (ebp=405d437c) 9088 0x40691780 (WINPOS_SetActiveWindow+0x230(hWnd=0x10021, fMouse=0x0, fChangeFocus=0x1) [winpos.c:1282] in user32.dll.so) (ebp=405d43d4) 9089 0x406909fa (SetForegroundWindow+0x7a(hwnd=0x10021) [winpos.c:762] in user32.dll.so) (ebp=405d43f0) 9090 0x0040535d (splash.exe..text+0x435d in H:\splash\splash.exe) (ebp=405d4644) 9091 0x406924dd (WINPROC_CallWndProc+0x8d(proc=0x404cc0, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:183] in user32.dll.so) (ebp=405d4674) 9092 0x40698989 (WINPROC_CallProc32WTo32A+0xc9(func=0x404cc0, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:2616] in user32.dll.so) (ebp=405d469c) 9093 0x40698fe2 (CallWindowProcW+0xb2(func=0x40ec0412, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:2831] in user32.dll.so) (ebp=405d46d0) 9094 0x406a8e77 (call_window_proc+0xd7(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0, unicode=0x1) [message.c:1368] in user32.dll.so) (ebp=405d472c) 9095 0x406a9ab1 (SendMessageTimeoutW+0xe1(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0, flags=0x0, timeout=0xffffffff, res_ptr=0x405d47b0) [message.c:1738] in user32.dll.so) (ebp=405d478c) 9096 0x406a9d37 (SendMessageW+0x37(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0) [message.c:1818] in user32.dll.so) (ebp=405d47c0) 9097 0x40691780 (WINPOS_SetActiveWindow+0x230(hWnd=0x10021, fMouse=0x0, fChangeFocus=0x1) [winpos.c:1282] in user32.dll.so) (ebp=405d4818) 9098 0x406909fa (SetForegroundWindow+0x7a(hwnd=0x10021) [winpos.c:762] in user32.dll.so) (ebp=405d4834) 9099 0x0040535d (splash.exe..text+0x435d in H:\splash\splash.exe) (ebp=405d4a88) 9100 0x406924dd (WINPROC_CallWndProc+0x8d(proc=0x404cc0, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:183] in user32.dll.so) (ebp=405d4ab8) 9101 0x40698989 (WINPROC_CallProc32WTo32A+0xc9(func=0x404cc0, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:2616] in user32.dll.so) (ebp=405d4ae0) 9102 0x40698fe2 (CallWindowProcW+0xb2(func=0x40ec0412, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:2831] in user32.dll.so) (ebp=405d4b14) 9103 0x406a8e77 (call_window_proc+0xd7(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0, unicode=0x1) [message.c:1368] in user32.dll.so) (ebp=405d4b70) 9104 0x406a9ab1 (SendMessageTimeoutW+0xe1(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0, flags=0x0, timeout=0xffffffff, res_ptr=0x405d4bf4) [message.c:1738] in user32.dll.so) (ebp=405d4bd0) 9105 0x406a9d37 (SendMessageW+0x37(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0) [message.c:1818] in user32.dll.so) (ebp=405d4c04) 9106 0x40691780 (WINPOS_SetActiveWindow+0x230(hWnd=0x10021, fMouse=0x0, fChangeFocus=0x1) [winpos.c:1282] in user32.dll.so) (ebp=405d4c5c) 9107 0x406909fa (SetForegroundWindow+0x7a(hwnd=0x10021) [winpos.c:762] in user32.dll.so) (ebp=405d4c78) 9108 0x0040535d (splash.exe..text+0x435d in H:\splash\splash.exe) (ebp=405d4ecc) 9109 0x406924dd (WINPROC_CallWndProc+0x8d(proc=0x404cc0, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:183] in user32.dll.so) (ebp=405d4efc) 9110 0x40698989 (WINPROC_CallProc32WTo32A+0xc9(func=0x404cc0, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:2616] in user32.dll.so) (ebp=405d4f24) 9111 0x40698fe2 (CallWindowProcW+0xb2(func=0x40ec0412, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:2831] in user32.dll.so) (ebp=405d4f58) 9112 0x406a8e77 (call_window_proc+0xd7(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0, unicode=0x1) [message.c:1368] in user32.dll.so) (ebp=405d4fb4) 9113 0x406a9ab1 (SendMessageTimeoutW+0xe1(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0, flags=0x0, timeout=0xffffffff, res_ptr=0x405d5038) [message.c:1738] in user32.dll.so) (ebp=405d5014) 9114 0x406a9d37 (SendMessageW+0x37(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0) [message.c:1818] in user32.dll.so) (ebp=405d5048) 9115 0x40691780 (WINPOS_SetActiveWindow+0x230(hWnd=0x10021, fMouse=0x0, fChangeFocus=0x1) [winpos.c:1282] in user32.dll.so) (ebp=405d50a0) 9116 0x406909fa (SetForegroundWindow+0x7a(hwnd=0x10021) [winpos.c:762] in user32.dll.so) (ebp=405d50bc) 9117 0x0040535d (splash.exe..text+0x435d in H:\splash\splash.exe) (ebp=405d5310) 9118 0x406924dd (WINPROC_CallWndProc+0x8d(proc=0x404cc0, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:183] in user32.dll.so) (ebp=405d5340) 9119 0x40698989 (WINPROC_CallProc32WTo32A+0xc9(func=0x404cc0, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:2616] in user32.dll.so) (ebp=405d5368) 9120 0x40698fe2 (CallWindowProcW+0xb2(func=0x40ec0412, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:2831] in user32.dll.so) (ebp=405d539c) 9121 0x406a8e77 (call_window_proc+0xd7(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0, unicode=0x1) [message.c:1368] in user32.dll.so) (ebp=405d53f8) 9122 0x406a9ab1 (SendMessageTimeoutW+0xe1(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0, flags=0x0, timeout=0xffffffff, res_ptr=0x405d547c) [message.c:1738] in user32.dll.so) (ebp=405d5458) 9123 0x406a9d37 (SendMessageW+0x37(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0) [message.c:1818] in user32.dll.so) (ebp=405d548c) 9124 0x40691780 (WINPOS_SetActiveWindow+0x230(hWnd=0x10021, fMouse=0x0, fChangeFocus=0x1) [winpos.c:1282] in user32.dll.so) (ebp=405d54e4) 9125 0x406909fa (SetForegroundWindow+0x7a(hwnd=0x10021) [winpos.c:762] in user32.dll.so) (ebp=405d5500) 9126 0x0040535d (splash.exe..text+0x435d in H:\splash\splash.exe) (ebp=405d5754) 9127 0x406924dd (WINPROC_CallWndProc+0x8d(proc=0x404cc0, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:183] in user32.dll.so) (ebp=405d5784) 9128 0x40698989 (WINPROC_CallProc32WTo32A+0xc9(func=0x404cc0, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:2616] in user32.dll.so) (ebp=405d57ac) 9129 0x40698fe2 (CallWindowProcW+0xb2(func=0x40ec0412, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:2831] in user32.dll.so) (ebp=405d57e0) 9130 0x406a8e77 (call_window_proc+0xd7(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0, unicode=0x1) [message.c:1368] in user32.dll.so) (ebp=405d583c) 9131 0x406a9ab1 (SendMessageTimeoutW+0xe1(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0, flags=0x0, timeout=0xffffffff, res_ptr=0x405d58c0) [message.c:1738] in user32.dll.so) (ebp=405d589c) 9132 0x406a9d37 (SendMessageW+0x37(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0) [message.c:1818] in user32.dll.so) (ebp=405d58d0) 9133 0x40691780 (WINPOS_SetActiveWindow+0x230(hWnd=0x10021, fMouse=0x0, fChangeFocus=0x1) [winpos.c:1282] in user32.dll.so) (ebp=405d5928) 9134 0x406909fa (SetForegroundWindow+0x7a(hwnd=0x10021) [winpos.c:762] in user32.dll.so) (ebp=405d5944) 9135 0x0040535d (splash.exe..text+0x435d in H:\splash\splash.exe) (ebp=405d5b98) 9136 0x406924dd (WINPROC_CallWndProc+0x8d(proc=0x404cc0, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:183] in user32.dll.so) (ebp=405d5bc8) 9137 0x40698989 (WINPROC_CallProc32WTo32A+0xc9(func=0x404cc0, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:2616] in user32.dll.so) (ebp=405d5bf0) 9138 0x40698fe2 (CallWindowProcW+0xb2(func=0x40ec0412, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:2831] in user32.dll.so) (ebp=405d5c24) 9139 0x406a8e77 (call_window_proc+0xd7(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0, unicode=0x1) [message.c:1368] in user32.dll.so) (ebp=405d5c80) 9140 0x406a9ab1 (SendMessageTimeoutW+0xe1(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0, flags=0x0, timeout=0xffffffff, res_ptr=0x405d5d04) [message.c:1738] in user32.dll.so) (ebp=405d5ce0) 9141 0x406a9d37 (SendMessageW+0x37(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0) [message.c:1818] in user32.dll.so) (ebp=405d5d14) 9142 0x40691780 (WINPOS_SetActiveWindow+0x230(hWnd=0x10021, fMouse=0x0, fChangeFocus=0x1) [winpos.c:1282] in user32.dll.so) (ebp=405d5d6c) 9143 0x406909fa (SetForegroundWindow+0x7a(hwnd=0x10021) [winpos.c:762] in user32.dll.so) (ebp=405d5d88) 9144 0x0040535d (splash.exe..text+0x435d in H:\splash\splash.exe) (ebp=405d5fdc) 9145 0x406924dd (WINPROC_CallWndProc+0x8d(proc=0x404cc0, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:183] in user32.dll.so) (ebp=405d600c) 9146 0x40698989 (WINPROC_CallProc32WTo32A+0xc9(func=0x404cc0, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:2616] in user32.dll.so) (ebp=405d6034) 9147 0x40698fe2 (CallWindowProcW+0xb2(func=0x40ec0412, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:2831] in user32.dll.so) (ebp=405d6068) 9148 0x406a8e77 (call_window_proc+0xd7(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0, unicode=0x1) [message.c:1368] in user32.dll.so) (ebp=405d60c4) 9149 0x406a9ab1 (SendMessageTimeoutW+0xe1(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0, flags=0x0, timeout=0xffffffff, res_ptr=0x405d6148) [message.c:1738] in user32.dll.so) (ebp=405d6124) 9150 0x406a9d37 (SendMessageW+0x37(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0) [message.c:1818] in user32.dll.so) (ebp=405d6158) 9151 0x40691780 (WINPOS_SetActiveWindow+0x230(hWnd=0x10021, fMouse=0x0, fChangeFocus=0x1) [winpos.c:1282] in user32.dll.so) (ebp=405d61b0) 9152 0x406909fa (SetForegroundWindow+0x7a(hwnd=0x10021) [winpos.c:762] in user32.dll.so) (ebp=405d61cc) 9153 0x0040535d (splash.exe..text+0x435d in H:\splash\splash.exe) (ebp=405d6420) 9154 0x406924dd (WINPROC_CallWndProc+0x8d(proc=0x404cc0, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:183] in user32.dll.so) (ebp=405d6450) 9155 0x40698989 (WINPROC_CallProc32WTo32A+0xc9(func=0x404cc0, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:2616] in user32.dll.so) (ebp=405d6478) 9156 0x40698fe2 (CallWindowProcW+0xb2(func=0x40ec0412, hwnd=0x10021, msg=0x30f, wParam=0x0, lParam=0x0) [winproc.c:2831] in user32.dll.so) (ebp=405d64ac) 9157 0x406a8e77 (call_window_proc+0xd7(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0, unicode=0x1) [message.c:1368] in user32.dll.so) (ebp=405d6508) 9158 0x406a9ab1 (SendMessageTimeoutW+0xe1(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0, flags=0x0, timeout=0xffffffff, res_ptr=0x405d658c) [message.c:1738] in user32.dll.so) (ebp=405d6568) 9159 0x406a9d37 (SendMessageW+0x37(hwnd=0x10021, msg=0x30f, wparam=0x0, lparam=0x0) [message.c:1818] in user32.dll.so) (ebp=405d659c) 9160 0x40691780 (WINPOS_SetActiveWindow+0x230(hWnd=0x10021, fMouse=0x0, fChangeFocus=0x1) [winpos.c:1282] in user32.dll.so) (ebp=405d65f4) 9161 0x406909fa (SetForegroundWindow+0x7a(hwnd=0x10021) [winpos.c:762] in user32.dll.so) (ebp=405d6610) 9162 0x00404b62 (splash.exe..text+0x3b62 in H:\splash\splash.exe) (ebp=405d697c) 9163 0x406924dd (WINPROC_CallWndProc+0x8d(proc=0x404cc0, hwnd=0x10021, msg=0x1, wParam=0x0, lParam=0x405d6d24) [winproc.c:183] in user32.dll.so) (ebp=405d69ac) 9164 0x40698ed2 (CallWindowProcA+0xb2(func=0x404cc0, hwnd=0x10021, msg=0x1, wParam=0x0, lParam=0x405d6d24) [winproc.c:2795] in user32.dll.so) (ebp=405d69e0) 9165 0x406a8ea3 (call_window_proc+0x103(hwnd=0x10021, msg=0x1, wparam=0x0, lparam=0x405d6d24, unicode=0x0) [message.c:1372] in user32.dll.so) (ebp=405d6a3c) 9166 0x406a9c0d (SendMessageTimeoutA+0xed(hwnd=0x10021, msg=0x1, wparam=0x0, lparam=0x405d6d24, flags=0x0, timeout=0xffffffff, res_ptr=0x405d6ac0) [message.c:1786] in user32.dll.so) (ebp=405d6a9c) 9167 0x406a9d87 (SendMessageA+0x37(hwnd=0x10021, msg=0x1, wparam=0x0, lparam=0x405d6d24) [message.c:1829] in user32.dll.so) (ebp=405d6ad0) 9168 0x409b7702 (X11DRV_CreateWindow+0x572(hwnd=0x10021, cs=0x405d6d24, unicode=0x0) [window.c:1005] in x11drv.dll.so) (ebp=405d6b44) 9169 0x4068bd20 (WIN_CreateWindowEx+0x590(cs=0x405d6d24, classAtom=0xc00d, type=0x2) [win.c:1154] in user32.dll.so) (ebp=405d6c0c) 9170 0x4068c17e (CreateWindowExA+0x14e(exStyle=0x0, className=0x411b3c, windowName=0x41c60d50, style=0x80880000, x=0x0, y=0x0, width=0x400, height=0x300, parent=0x0, menu=0x0, instance=0x400000, data=0x0) [win.c:1309] in user32.dll.so) (ebp=405d6d60) 9171 0x00405cd1 (splash.exe..text+0x4cd1 in H:\splash\splash.exe) (ebp=405d6e90) 9172 0x400ca01b (start_process+0x24b [process.c:526] in libntdll.dll.so) (ebp=405d6f38) 9173 0x400ce257 (call_on_thread_stack+0x27(func=0x400c9dd0) [sysdeps.c:105] in libntdll.dll.so) (ebp=405d6ff4) 9174 0x400ce410 (SYSDEPS_CallOnStack+0x14 in libntdll.dll.so) (ebp=00000000)
Index: winpos.c =================================================================== RCS file: /home/wine/wine/windows/winpos.c,v retrieving revision 1.133 diff -u -r1.133 winpos.c --- winpos.c 25 May 2002 22:16:13 -0000 1.133 +++ winpos.c 29 May 2002 17:38:49 -0000 @@ -1278,8 +1278,10 @@ PERQDATA_SetActiveWnd( pOldActiveQueue->pQData, 0 );
/* send palette messages */ + /* if (hWnd && SendMessageW( hWnd, WM_QUERYNEWPALETTE, 0, 0L)) SendMessageW( HWND_BROADCAST, WM_PALETTEISCHANGING, (WPARAM)hWnd, 0 ); + */
/* if prev wnd is minimized redraw icon title */ if( IsIconic( hwndPrevActive ) ) WINPOS_RedrawIconTitle(hwndPrevActive);
On Wed, May 29, 2002 at 08:19:01PM +0200, Christian Costa wrote:
Hi everyone,
I tried to install the game Zork : Grand Inquisitor ( probably a win16 app) and the installer crashed. With the debugger, I Obtained the attached log.
[...]
It seems that the app's windows procedure does not expect a WM_QUERYNEWPALETTE message.
Damn, I faintly remember that I've also had a problem with the WM_QUERYNEWPALETTE ages ago (about two years ago). Commenting it out made it go away.
Sounds like we might want to investigate WM_QUERYNEWPALETTE behaviour...
If someone that knows this code well have an idea... else I will report this bug to bugzilla.
Yep, good idea, since I can confirm suspicions about WM_QUERYNEWPALETTE brokenness. (or at least the WM_QUERYNEWPALETTE is playing a role in such a problem somewhere...)
It seems that the app's windows procedure does not expect a WM_QUERYNEWPALETTE message.
Damn, I faintly remember that I've also had a problem with the WM_QUERYNEWPALETTE ages ago (about two years ago). Commenting it out made it go away.
Sounds like we might want to investigate WM_QUERYNEWPALETTE behaviour...
If someone that knows this code well have an idea... else I will report this bug to bugzilla.
Yep, good idea, since I can confirm suspicions about WM_QUERYNEWPALETTE brokenness. (or at least the WM_QUERYNEWPALETTE is playing a role in such a problem somewhere...)
I've just submitted the bug report. Now you confirm the bug and add some comments.