Crash due to edit.c patch (was: Regression: origin6 crashes with 20050310 (20050211 works))

Lauri Tulmin tulmin at gmail.com
Wed Apr 6 12:43:26 CDT 2005


On Apr 6, 2005 10:15 AM, Tobias Burnus <burnus at gmx.de> wrote:
> Hello,
> 
> as described in http://bugs.winehq.org/show_bug.cgi?id=2813 , Origin6
> crashes with the edit.c patch, implementing !ES_AUTO[HV]SCROLL
> (http://www.winehq.org/hypermail/wine-cvs/2005/02/0506.html).
> 
I'm pretty certain that this patch just exposes some other bug.
The problem is that Origin6 crashes when it receives an EN_MAXTEXT
notification. The notification is sent because the text really doesn't
fit into the edit control because it's 0 pixels wide. Application
creates the  edit control with width of -22 and later also tries to
resize it to -22, wine turns negative numbers to 0.
I would start with writing a test for seting window width & height to
negative numbers.
good luck.

trace:
trace:win:WIN_CreateWindowEx (null) "Edit" ex=00000000 style=50000300
3,3 -22x20 parent=0x10084 menu=0x3e9 inst=0x400000 params=(nil)
trace:win:dump_window_styles style: WS_CHILD WS_VISIBLE 00000300
trace:win:dump_window_styles exstyle:
trace:win:WIN_CreateWindowEx winproc type is 2 (WIN_PROC_32A)
trace:win:WIN_SetWindowLong 0x10088 -12 3e9 3
err:x11drv:X11DRV_CreateWindow invalid window width -22
trace:x11drv:X11DRV_set_window_pos win 0x10088 window (3,3)-(3,23)
client (3,3)-(3,23) style 40000300
trace:x11drv:X11DRV_CreateWindow hwnd 0x10088 cs 3,3 0x20
trace:edit:EditWndProc_common hwnd=0x10088 msg=81 (WM_NCCREATE)
wparam=0 lparam=406eeae0
trace:edit:EDIT_WM_NCCreate Creating ANSI edit control, style = 50000300
trace:win:WIN_SetWindowLong 0x10088 0 4046ad20 3
trace:edit:EditWndProc_common hwnd=0x10088 msg=83 (WM_NCCALCSIZE)
wparam=0 lparam=406ee8a0
trace:edit:EditWndProc_common hwnd=0x10088 msg=83 (WM_NCCALCSIZE) -- 0x00000000
trace:x11drv:X11DRV_set_window_pos win 0x10088 window (3,3)-(3,23)
client (3,3)-(3,23) style 40000300
trace:x11drv:X11DRV_CreateWindow win 0x10088 window 3,3,3,23 client
3,3,3,23 whole 3,3,3,23 X client 0,0,0,20 xwin 0
trace:edit:EditWndProc_common hwnd=0x10088 msg=1 (WM_CREATE) wparam=0
lparam=406eeae0
trace:edit:EDIT_WM_Create (null)
trace:edit:EDIT_EM_SetMargins left=0, right=0
trace:edit:EDIT_SetCaretPos 0 - 0x0
trace:edit:EditWndProc_common hwnd=0x10088 msg=1 (WM_CREATE) -- 0x00000001
trace:edit:EditWndProc_common hwnd=0x10088 msg=5 (WM_SIZE) wparam=0
lparam=140000
trace:edit:EDIT_WM_Size width = 0, height = 20
trace:edit:EDIT_SetCaretPos 0 - 0x0
trace:edit:EditWndProc_common hwnd=0x10088 msg=5 (WM_SIZE) -- 0x00000000
trace:edit:EditWndProc_common hwnd=0x10088 msg=3 (WM_MOVE) wparam=0 lparam=30003
trace:edit:EditWndProc_common hwnd=0x10088 msg=3 (WM_MOVE) -- 0x00000000
trace:x11drv:X11DRV_ShowWindow hwnd=0x10088, cmd=5, wasVisible 0
trace:edit:EditWndProc_common hwnd=0x10088 msg=18 (WM_SHOWWINDOW)
wparam=1 lparam=0
trace:edit:EditWndProc_common hwnd=0x10088 msg=18 (WM_SHOWWINDOW) -- 0x00000000
trace:win:SetWindowPos hwnd 0x10088, after (nil), 0,0 (0x0), flags 00000057
trace:win:dump_winpos_flags flags: SWP_NOSIZE SWP_NOMOVE SWP_NOZORDER
SWP_NOACTIVATE SWP_SHOWWINDOW
trace:x11drv:X11DRV_SetWindowPos hwnd 0x10088, after (nil), swp 0,0
0x0 flags 00000057
trace:edit:EditWndProc_common hwnd=0x10088 msg=46
(WM_WINDOWPOSCHANGING) wparam=0 lparam=406ee810
trace:edit:EditWndProc_common hwnd=0x10088 msg=46
(WM_WINDOWPOSCHANGING) -- 0x00000000
trace:x11drv:SWP_DoWinPosChanging hwnd 0x10088, after (nil), swp 0,0
0x0 flags 00001857
trace:x11drv:SWP_DoWinPosChanging current (3,3)-(3,23) style 40000300
new (3,3)-(3,23)
trace:x11drv:X11DRV_set_window_pos win 0x10088 window (3,3)-(3,23)
client (3,3)-(3,23) style 50000300
trace:x11drv:X11DRV_SetWindowPos 	status flags = 1847
trace:edit:EditWndProc_common hwnd=0x10088 msg=47
(WM_WINDOWPOSCHANGED) wparam=0 lparam=406ee810
trace:edit:EditWndProc_common hwnd=0x10088 msg=47
(WM_WINDOWPOSCHANGED) -- 0x00000000
trace:win:WIN_CreateWindowEx created window 0x10088
...
trace:win:SetWindowPos hwnd 0x10088, after (nil), 3,3 (-22x20), flags 0000001c
trace:win:dump_winpos_flags flags: SWP_NOZORDER SWP_NOREDRAW SWP_NOACTIVATE
trace:x11drv:X11DRV_SetWindowPos hwnd 0x10088, after (nil), swp 3,3
-22x20 flags 0000001c
trace:edit:EditWndProc_common hwnd=0x10088 msg=46
(WM_WINDOWPOSCHANGING) wparam=0 lparam=406ee5c4
trace:edit:EditWndProc_common hwnd=0x10088 msg=46
(WM_WINDOWPOSCHANGING) -- 0x00000000
trace:x11drv:SWP_DoWinPosChanging hwnd 0x10088, after (nil), swp 3,3
0x20 flags 0000181c
trace:x11drv:SWP_DoWinPosChanging current (3,3)-(3,23) style 50000300
new (3,3)-(3,23)
trace:x11drv:X11DRV_set_window_pos win 0x10088 window (3,3)-(3,23)
client (3,3)-(3,23) style 50000300
trace:x11drv:X11DRV_SetWindowPos 	status flags = 1807
...
trace:edit:EditWndProc_common hwnd=0x10088 msg=c (WM_SETTEXT) wparam=0
lparam=40464050
trace:edit:EDIT_WM_SetText L"10"
trace:edit:EDIT_EM_ReplaceSel L"10", can_undo 0, send_update 0
trace:edit:EDIT_EM_ReplaceSel inserting stuff (tl 0, strl 2, selstart
0 ('L""'), text 'L""')
trace:edit:EDIT_EM_ReplaceSel notification EN_MAXTEXT sent to hwnd=0x10084
fixme:msvcrt:_XcptFilter (-1073741819,0x406ec798)semi-stub
wine: Unhandled exception (thread 0009), starting debugger...
WineDbg starting on pid 0x8
Unhandled exception: page fault on read access to 0x00000000 in 32-bit
code (0x40f3e886).
In 32 bit mode.



More information about the wine-devel mailing list