SetActiveWindow problem

bperkins at netspace.org bperkins at netspace.org
Tue Nov 27 13:11:08 CST 2001


Sorry, I'm new to wine hacking, so bear with me.

I was playing around a bit the other day trying to see if the tahni
deskmate worked at all.  I tried to run the installer (tahnisetup.exe
available at tahni.com).
 
It would run, and then crash with a stack overflow.

I've attached the sequence in a backtrace that was repeated many times
at the bottom.

It's wine-20011108, BTW.

Since I don't have the source to tahnisetup it made things a bit
tricky to decipher.  My guess was(is) that the program is trying to
the window as active, which sends a message to the program.  It sees
that it's not active, so it again tries to set it as be active, which
eventually causes a stack overflow.

My awful hack was to just put a sanity counter in SetActiveWindow and
return true after being called a certain number of times.  This seems
to work, as in it causes to program to get farther (it gets stuck on
something else).  Presumably one could check if it was being called
recursively. 

I realize that this isn't really useful info, but I was curious to see
if I was right about this, or if anyone had an insight.  Am I right or
did I just get lucky with the hack?



 25246 0x0040266f (tahnisetup.exe..text+0x166f in E:\tahnisetup.exe) (ebp=437e6444)
  25247 0x407c3a67 (WINPROC_wrapper+0x17 in libuser32.so) (ebp=437e6468)
  25248 0x407c3af2 (WINPROC_CallWndProc+0x82(proc=0x4025b8, hwnd=0x1002f, msg=0x6, wParam=0x0, lParam=0x10026) [winproc.c:173] in libuser32.so) (ebp=437e6498)
  25249 0x407c95ca (CallWindowProcA+0x4a(func=0x4025b8, hwnd=0x1002f, msg=0x6, wParam=0x0, lParam=0x10026) [winproc.c:2623] in libuser32.so) (ebp=437e64cc)
  25250 0x4097b54c (FILEDLG_CallWindowProc+0x54(lfs=0x40400dbc, wMsg=0x6, wParam=0x0, lParam=0x10026) [filedlg.c:294] in libcomdlg32.so) (ebp=437e64f4)
  25251 0x4097d944 (FileOpenDlgProc+0x78(hWnd=0x1002f, wMsg=0x6, wParam=0x0, lParam=0x10026) [filedlg.c:1440] in libcomdlg32.so) (ebp=437e651c)
  25252 0x407c3a67 (WINPROC_wrapper+0x17 in libuser32.so) (ebp=437e6540)
  25253 0x407c3af2 (WINPROC_CallWndProc+0x82(proc=0x4097d8cc, hwnd=0x1002f, msg=0x6, wParam=0x0, lParam=0x10026) [winproc.c:173] in libuser32.so) (ebp=437e6570)
  25254 0x407c91f4 (WINPROC_CallProc32WTo32A+0x80(func=0x4097d8cc, hwnd=0x1002f, msg=0x6, wParam=0x0, lParam=0x10026) [winproc.c:2435] in libuser32.so) (ebp=437e6598)
  25255 0x407c972b (CallWindowProcW+0xab(func=0x430c0984, hwnd=0x1002f, msg=0x6, wParam=0x0, lParam=0x10026) [winproc.c:2675] in libuser32.so) (ebp=437e65cc)
  25256 0x4079f744 (DefDlgProcW+0x48(hwnd=0x1002f, msg=0x6, wParam=0x0, lParam=0x10026) [defdlg.c:389] in libuser32.so) (ebp=437e65f8)
  25257 0x407c3a67 (WINPROC_wrapper+0x17 in libuser32.so) (ebp=437e661c)
  25258 0x407c3af2 (WINPROC_CallWndProc+0x82(proc=0x4079f6fc, hwnd=0x1002f, msg=0x6, wParam=0x0, lParam=0x10026) [winproc.c:173] in libuser32.so) (ebp=437e664c)
  25259 0x407c9152 (WINPROC_CallProc32ATo32W+0x7e(func=0x4079f6fc, hwnd=0x1002f, msg=0x6, wParam=0x0, lParam=0x10026) [winproc.c:2412] in libuser32.so) (ebp=437e6674)
  25260 0x407c9647 (CallWindowProcA+0xc7(func=0x430c0259, hwnd=0x1002f, msg=0x6, wParam=0x0, lParam=0x10026) [winproc.c:2643] in libuser32.so) (ebp=437e66a8)
  25261 0x4076957e (call_window_proc+0xf2(hwnd=0x1002f, msg=0x6, wparam=0x0, lparam=0x10026, unicode=0x0) [message.c:1146] in libuser32.so) (ebp=437e6704)
  25262 0x4076a1af (SendMessageTimeoutA+0xdf(hwnd=0x1002f, msg=0x6, wparam=0x0, lparam=0x10026, flags=0x0, timeout=0xffffffff, res_ptr=0x437e6788) [message.c:1577] in libuser32.so) (ebp=437e6764)
  25263 0x4076a317 (SendMessageA+0x37(hwnd=0x1002f, msg=0x6, wparam=0x0, lparam=0x10026) [message.c:1622] in libuser32.so) (ebp=437e6798)
  25264 0x407c2e92 (WINPOS_SetActiveWindow+0x196(hWnd=0x10026, fMouse=0x0, fChangeFocus=0x1) [winpos.c:1282] in libuser32.so) (ebp=437e67f0)
  25265 0x407c229a (SetForegroundWindow+0x7a(hwnd=0x10026) [winpos.c:781] in libuser32.so) (ebp=437e680c)


--
"Only CmdrTaco can save us now"  -- The Register
Brian Perkins                bperkins at netspace.org 





More information about the wine-devel mailing list