On Thu, Jun 08, 2000 at 10:42:33AM -0700, Alexandre Julliard wrote:
> An menu entry without string is created as a separator (this part
> seems OK in your trace). What you should do is find out where we lost
> the separator flag and started believing this was a string item.
I have the strange feeling that this crash isn't related to menu problems
at all.
And I have EVIDENCE:
Call USER.219: CREATEDIALOGINDIRECT(0x03b6,03b7:984c,0x01cc,0x065705c4) ret=07df:10a5
ds=07f7
trace:win:WIN_CreateWindowEx "" "#32770" 00000001 80c80081 0,0 0x0 01cc 0000 000003b6
(nil)
trace:menu:CreateMenu return 03e8
^^^^^^ !!!
trace:menu:InsertMenuA hMenu 03e8, pos -1, flags 00002410, id 0050, str 00000000 (not
a string)
trace:menu:do_debug_print_menuitem MENU_SetItemData from: { ID=0x0, Text=Null }
trace:menu:do_debug_print_menuitem MENU_SetItemData to : { ID=0x50, Sub=0x50,
Typ=sep,pop,rorder }
trace:menu:MENU_GetSysMenu GetSysMenu hMenu=03e8 (0050)
And later the program does:
Call USER.452: CREATEWINDOWEX(0x00000000,0x065f1434 "COMBOBOX",0x067f064e
"",0x40230013,0x0000,0x0000,0x003c,0x0014,0x0340,0x04f2,0x03b6,0x00000000)
ret=07d7:1bad ds=07f7
trace:win:WIN_CreateWindowEx "" "COMBOBOX" 00000000 40230013 0,0 60x20 0340 04f2
000003b6 (nil)
which triggers in Wine code:
trace:win:WIN_CreateWindowEx #0000 "ComboLBox" 00000000 44a00011 0,30 60x-10 04b4 03e8
000003b6 0x4118ffc4
^^^^^^ !!!!!!!!!!!!!!!!!!!!!!!!!!
This is:
./combo.h:#define ID_CB_LISTBOX 1000
And WIN_CreateWindowEx terminates with:
trace:win:WIN_CreateWindowEx created window 0540
^^^^^^ (see below !)
Do you smell something ?
Somehow the WIN_CreateWindowEx seems to get fooled into thinking that
this is the menu ID we created earlier instead of the ID_CB_LISTBOX it
is supposed to be.
Some wrong interpretation of WS_xxx flags ??
And given that, it's not very surprising that we get a NULL pointer problem
when Wine tries to check the "menu" of this window:
trace:relay:WINPROC_CallWndProc
(wndproc=0x4008a3a8,hwnd=00000540,msg=WM_NCCALCSIZE,wp=00000001,lp=41096280)
trace:menu:MENU_GetMenuBarHeight HWND 0x540, width 372, at (1, 1).
trace:menu:MENU_MenuBarCalcSize left=1 top=1 right=373 bottom=20
trace:menu:MENU_MenuBarCalcSize calling MENU_CalcItemSize org=(1, 1)
trace:menu:do_debug_print_menuitem item: { ID=0x50, Sub=0x50, Typ=pop,rorder,
Text=Null }
trace:menu:MENU_CalcItemSize dc=0x0910 owner=0x0540 (1,1)
trace:menu:do_debug_print_menuitem MENU_CalcItemSize: menuitem: { ID=0x50, Sub=0x50,
Typ=pop,rorder, Text=Null } (MenuBar)
Call user32.391: MessageBoxA(00000000,40f54aac "Unhandled exception 0xc0000005 at
address 0x4008bbfb.\nDo you wish to debug it ?",401dfdca "Error",00000014)
ret=40166fce fs=0327
I'll try to track it down some more...
Meanwhile you could be so kind as to tell me what exactly is happening :)
Andreas Mohr