[Bug 9670] SparVoip crashes

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Mar 29 10:18:57 CDT 2008


http://bugs.winehq.org/show_bug.cgi?id=9670


Anastasius Focht <focht at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |focht at gmx.net




--- Comment #7 from Anastasius Focht <focht at gmx.net>  2008-03-29 10:18:56 ---
Hello,

--- quote ---
Still present in git. Now needs native gdiplus as well to get around a crash
there.
--- quote ---

It needs native gdiplus if you set comctl32 to native ;-)

This seems to be a bug in the creation phase of wine's statusbar control.

--- snip wine builtin comctl32 trace ---
0009:trace:win:WIN_CreateWindowEx (null) L"msctls_statusbar32" ex=00000000
style=50000000 0,0 0x0 parent=0x1003e menu=(nil) inst=0x400000 params=(nil)
..
0009:Call window proc 0x6d732f
(hwnd=0x10040,msg=WM_NCCREATE,wp=00000000,lp=0033db54)
..
0009:trace:msg:WINPROC_CallProcWtoA
(hwnd=0x10040,msg=WM_NCCALCSIZE,wp=00000000,lp=0033d8e8)
..
0009:trace:statusbar:StatusWindowProc hwnd=0x10040 msg=83 wparam=0
lparam=33d8e8
(hwnd=0x10040,msg=WM_CREATE,wp=00000000,lp=0033db54)
..
0009:trace:statusbar:StatusWindowProc hwnd=0x10040 msg=1 wparam=0 lparam=33d1b0
0009:trace:statusbar:STATUSBAR_WMCreate 
..
0009:trace:msg:WINPROC_CallProcWtoA
(hwnd=0x1003e,msg=WM_NOTIFYFORMAT,wp=00010040,lp=00000003)
..
0009:trace:msg:WINPROC_CallProcWtoA
(hwnd=0x10040,msg=WM_STYLECHANGING,wp=fffffff0,lp=0033c0ac)
..
0009:trace:statusbar:StatusWindowProc hwnd=0x10040 msg=3 wparam=0
lparam=ffff0000
..
0009:trace:statusbar:StatusWindowProc hwnd=0x10040 msg=5 wparam=0 lparam=1301d4
0009:trace:statusbar:STATUSBAR_WMSize flags 0000
0009:trace:statusbar:STATUSBAR_SetPartBounds client wnd size is (0,0)-(468,19)
..
0009:trace:statusbar:StatusWindowProc hwnd=0x10040 msg=406 wparam=3
lparam=339c38
..
0009:trace:statusbar:STATUSBAR_GetParts (3)
..
(hwnd=0x10040,msg=WM_USER+6,wp=00000003,lp=00339c38) retval=00000001
0009:Ret  user32.CallWindowProcA() retval=00000001 ret=006d48da
0009:Ret  window proc 0x6d732f
(hwnd=0x10040,msg=WM_USER+6,wp=00000003,lp=00339c38) retval=00000001
0009:Ret  user32.SendMessageA() retval=00000001 ret=0048ce21
0009:trace:seh:raise_exception code=c0000005 flags=0 addr=0x6da625
0009:trace:seh:raise_exception  info[0]=00000000
0009:trace:seh:raise_exception  info[1]=00000050
0009:trace:seh:raise_exception  eax=00339c28 ebx=0048cd30 ecx=00000000
edx=00000004 esi=001301d4 edi=00fdd520
0009:trace:seh:raise_exception  ebp=00339be4 esp=00339be4 cs=0073 ds=007b
es=007b fs=0033 gs=003b flags=00210282
0009:trace:seh:call_stack_handlers calling handler at 0x89df6e code=c0000005
flags=0 
--- snip wine builtin comctl32 trace ---

vs.

--- snip wine native comctl32 trace ---
0017:trace:win:WIN_CreateWindowEx (null) L"msctls_statusbar32" ex=00000000
style=50000000 0,0 0x0 parent=0x10078 menu=(nil) inst=0x400000 params=(nil) 
..
0017:Call window proc 0x6d732f
(hwnd=0x1007a,msg=WM_NCCREATE,wp=00000000,lp=0033db54) 
..
0017:trace:msg:WINPROC_CallProcWtoA
(hwnd=0x1007a,msg=WM_NCCALCSIZE,wp=00000000,lp=0033d8e8)
..
0017:trace:msg:WINPROC_CallProcAtoW
(hwnd=0x1007a,msg=WM_CREATE,wp=00000000,lp=0033db54) 
..
0017:trace:msg:WINPROC_CallProcWtoA
(hwnd=0x10078,msg=WM_NOTIFYFORMAT,wp=0001007a,lp=00000003) 
..
0017:trace:msg:WINPROC_CallProcWtoA
(hwnd=0x10078,msg=WM_QUERYUISTATE,wp=00000000,lp=00000000) 
..
0017:trace:win:RedrawWindow 0x1007a whole window flags: RDW_ALLCHILDREN
RDW_UPDATENOW
..
0017:Call user32.NotifyWinEvent(0000800c,0001007a,fffffffc,00000001)
ret=5d4572d0
0017:Ret  user32.NotifyWinEvent() retval=00000000 ret=5d4572d0
..
(hwnd=0x1007a,msg=WM_CREATE,wp=00000000,lp=0033d1b0) retval=00000000
0017:Ret  user32.CallWindowProcA() retval=00000000 ret=006d48da
..
<control creation done>
..
0017:Call user32.GetClassInfoA(00400000,012514d0 "VsnQualityCtrl",0033d2d0)
ret=00540950
..
--- snip wine native comctl32 trace ---

ExtStyle = 0
Style = WS_CHILD|WS_VISIBLE
X = 0
Y = 0
Width = 0
Height = 0
hParent = 0x1003e ('Main Applicationdialog',class='#32770',parent=0x205FE)
hMenu = NULL
hInst = 0x400000
lParam = NULL

native sequence condensed form:

WM_NCCREATE -> WM_NCCALCSIZE -> WM_CREATE
WM_NOTIFYFORMAT
WM_QUERYUISTATE (not needed)
<return from WM_CREATE handler>
<statusbar child control gets created here>

The culprit seems to be the resize code in statusbar's WM_CREATE handler which
triggers messages sent to app window procs which are not expected.
App window proc code dereferences some internal C++ objects - wrappers for
child controls which are not created yet, resulting in exception.
See native trace, "VsnQualityCtrl" which is created after parent (return from
parent WM_CREATE handler).

Using the spy++ on windows, there is no statusbar resizing message while the
control is being created (WM_SIZE/MOVE whatever).
The statusbar and its child controls are resized fine after the controls have
been completely created.

--- snip dlls/comctl32/status.c ---
diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c
index e704635..b7d5635 100644
--- a/dlls/comctl32/status.c
+++ b/dlls/comctl32/status.c
@@ -1044,8 +1044,6 @@ STATUSBAR_WMCreate (HWND hwnd, const CREATESTRUCTA
*lpCreate)
             ReleaseDC (hwnd, hdc);
         }

-        SetWindowPos(hwnd, 0, lpCreate->x, lpCreate->y - 1,
-                       width, infoPtr->height, SWP_NOZORDER);
         STATUSBAR_SetPartBounds (infoPtr);
     }
--- snip dlls/comctl32/status.c ---

Apply the patch and app starts fine.

And yes, the app exposes additional bugs ... file them separately.

Regards


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list