http://bugs.winehq.org/show_bug.cgi?id=32467
Bug #: 32467 Summary: Windows Sysinternals "bginfo" tool crashes due to incorrect sysparams PATH_ENTRY macro definition Product: Wine Version: 1.5.19 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: user32 AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net Classification: Unclassified
Hello folks,
retested some Windows Sysinternals (former "Sysinternals") tools. "bginfo" crashes after applying settings (or if the timer runs out).
Download: http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx
--- snip --- $ wine ./Bginfo.exe ... Unhandled exception: page fault on write access to 0x000000e6 in 32-bit code (0x004700f1). Register dump: CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b EIP:004700f1 ESP:0033da04 EBP:0033da10 EFLAGS:00010286( R- -- I S - -P- ) EAX:ffffffff EBX:0000003a ECX:1d2c7fe2 EDX:7bc9a7c0 ESI:0000003a EDI:00000000 Stack dump: 0x0033da04: 7eb58280 0000003a 00000001 0033dc00 0x0033da14: 7eabfd9b 7eb58280 00000000 0033dc38 0x0033da24: 00000000 0033dbf8 7e0ea4a8 0033dbf8 0x0033da34: 7e07c080 7c6bc0b0 0033dac4 7e07b6ec 0x0033da44: 00000040 7bcc26c8 0033db90 00000000 0x0033da54: 0033db00 f758e91e 0033da70 00000000 000c: sel=0067 base=00000000 limit=00000000 32-bit r-x Backtrace: =>0 0x004700f1 in bginfo (+0x700f1) (0x0033da10) 1 0x7eabfd9b SystemParametersInfoW+0x1185(uiAction=0x29, uiParam=0x1f8, pvParam=0x33dc20, fWinIni=0) [/home/focht/projects/wine/wine-git/dlls/user32/sysparams.c:1581] in user32 (0x0033dc00) 2 0x7ec2669b TOOLTIPS_InitSystemSettings+0x76(infoPtr=0x141998) [/home/focht/projects/wine/wine-git/dlls/comctl32/tooltips.c:208] in comctl32 (0x0033de20) 3 0x7ec2bc19 TOOLTIPS_WinIniChange+0x10(infoPtr=0x141998) [/home/focht/projects/wine/wine-git/dlls/comctl32/tooltips.c:2130] in comctl32 (0x0033de40) 4 0x7ec2c4f4 TOOLTIPS_WindowProc+0x82b(hwnd=0x50020, uMsg=0x1a, wParam=0x14, lParam=0x7eb61348) [/home/focht/projects/wine/wine-git/dlls/comctl32/tooltips.c:2333] in comctl32 (0x0033de90) 5 0x7eadf72e WINPROC_wrapper+0x19() in user32 (0x0033dec0) 6 0x7eadf883 call_window_proc+0xcd(hwnd=0x50020, msg=0x1a, wp=0x14, lp=0x7eb61348, result=0x33dfb4, arg=0x7ec2bcc8) [/home/focht/projects/wine/wine-git/dlls/user32/winproc.c:243] in user32 (0x0033df10) 7 0x7eae1b5d WINPROC_call_window+0x15f(hwnd=0x50020, msg=0x1a, wParam=0x14, lParam=0x7eb61348, result=0x33dfb4, unicode=0x1, mapping=WMCHAR_MAP_SENDMESSAGE) [/home/focht/projects/wine/wine-git/dlls/user32/winproc.c:900] in user32 (0x0033df60) 8 0x7eaa0265 call_window_proc+0xbf(hwnd=0x50020, msg=0x1a, wparam=0x14, lparam=0x7eb61348, unicode=0x1, same_thread=0x1, mapping=WMCHAR_MAP_SENDMESSAGE) [/home/focht/projects/wine/wine-git/dlls/user32/message.c:2211] in user32 (0x0033dfc0) 9 0x7eaa2fae send_message+0x138(info=0x33e03c, res_ptr=0x0(nil), unicode=0x1) [/home/focht/projects/wine/wine-git/dlls/user32/message.c:3203] in user32 (0x0033e020) 10 0x7eaa3501 SendMessageTimeoutW+0x4a(hwnd=0x50020, msg=0x1a, wparam=0x14, lparam=0x7eb61348, flags=0x2, timeout=0x7d0, res_ptr=0x0(nil)) [/home/focht/projects/wine/wine-git/dlls/user32/message.c:3357] in user32 (0x0033e070) 11 0x7ea9b2ad broadcast_message_callback+0xc4(hwnd=0x50020, lparam=0x33e16c) [/home/focht/projects/wine/wine-git/dlls/user32/message.c:565] in user32 (0x0033e0c0) 12 0x7ead5603 EnumWindows+0x7b(lpEnumFunc=0x7ea9b1e8, lParam=0x33e16c) [/home/focht/projects/wine/wine-git/dlls/user32/win.c:3277] in user32 (0x0033e0f0) 13 0x7eaa2eb0 send_message+0x3a(info=0x33e16c, res_ptr=0x0(nil), unicode=0x1) [/home/focht/projects/wine/wine-git/dlls/user32/message.c:3190] in user32 (0x0033e150) 14 0x7eaa3501 SendMessageTimeoutW+0x4a(hwnd=0xffff, msg=0x1a, wparam=0x14, lparam=0x7eb61348, flags=0x2, timeout=0x7d0, res_ptr=0x0(nil)) [/home/focht/projects/wine/wine-git/dlls/user32/message.c:3357] in user32 (0x0033e1a0) 15 0x7eabcf64 SYSPARAMS_NotifyChange+0x6c(uiAction=0x14, fWinIni=0x3) [/home/focht/projects/wine/wine-git/dlls/user32/sysparams.c:504] in user32 (0x0033e1d0) 16 0x7eac2b3c SystemParametersInfoW+0x3f26(uiAction=0x14, uiParam=0, pvParam=0x33e3f4, fWinIni=0x3) [/home/focht/projects/wine/wine-git/dlls/user32/sysparams.c:2206] in user32 (0x0033e3c0) 17 0x7eac2d20 SystemParametersInfoA+0x15f(uiAction=0x14, uiParam=0, pvParam=0x33e6a8, fuWinIni=0x3) [/home/focht/projects/wine/wine-git/dlls/user32/sysparams.c:2236] in user32 (0x0033e630) 18 0x004075e3 in bginfo (+0x75e2) (0x80000001) 0x004700f1: movl %ebx,0xac(%esi) ... --- snip ---
case SPI_GETNONCLIENTMETRICS
Examining entry structures:
--- snip --- Wine-dbg>bt Backtrace: =>0 0x7eabe8d8 get_entry(ptr=0x7eb58280, int_param=0, ptr_param=0x33dc38) [/home/focht/projects/wine/wine-git/dlls/user32/sysparams.c:1081] in user32 (0x0033dc00) 1 0x7ec2669b TOOLTIPS_InitSystemSettings+0x76(infoPtr=0x141998) [/home/focht/projects/wine/wine-git/dlls/comctl32/tooltips.c:208] in comctl32 (0x0033de20) 2 0x7ec2bc19 TOOLTIPS_WinIniChange+0x10(infoPtr=0x141998) [/home/focht/projects/wine/wine-git/dlls/comctl32/tooltips.c:2130] in comctl32 (0x0033de40) 3 0x7ec2c4f4 TOOLTIPS_WindowProc+0x82b(hwnd=0x100b0, uMsg=0x1a, wParam=0x14, lParam=0x7eb61348) [/home/focht/projects/wine/wine-git/dlls/comctl32/tooltips.c:2333] in comctl32 (0x0033de90) ... Wine-dbg>x/10x ptr 0x7eb58280 entry_CAPTIONLOGFONT: 00470042 006e0049 006f0066 0062002e 0x7eb58290 entry_CAPTIONLOGFONT+0x10: 0070006d 00000000 000002bc fffffff5 0x7eb582a0 entry_CAPTIONLOGFONT+0x20: 00000000 00000000 ... Wine-dbg>p entry_BORDER {hdr={get=0x7eabd996, set=0x7eabd8dd, init=0x7eabd94d, regval="BorderWidth", mirror=0x0(nil), loaded=0x1}, val=0x1}
Wine-dbg>p entry_SCROLLWIDTH {hdr={get=0x7eabd996, set=0x7eabd8dd, init=0x7eabd94d, regval="ScrollWidth", mirror=0x0(nil), loaded=0x1}, val=0x10}
Wine-dbg>p entry_CAPTIONLOGFONT {hdr={get=0x470042, set=0x6e0049, init=0x6f0066, regval="", mirror="", loaded=0}, weight=0x2bc, val={lfHeight=0xfffffff5, lfWidth=0, lfEscapement=0, lfOrientation=0, lfWeight=0x2bc, lfItalic=0, lfUnderline=0, lfStrikeOut=0, lfCharSet=0, lfOutPrecision=0, lfClipPrecision=0, lfQuality=0, lfPitchAndFamily='"', lfFaceName={0x4d, 0x53, 0x20, 0x53, 0x68, 0x65, 0x6c, 0x6c, 0x20, 0x44, 0x6c, 0x67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}}
Wine-dbg>p entry_SMCAPTIONWIDTH {hdr={get=0x7eabd996, set=0x7eabd8dd, init=0x7eabd94d, regval="SmCaptionWidth", mirror=0x0(nil), loaded=0x1}, val=0xd} --- snip ---
entry_CAPTIONLOGFONT looks strange while others retrieved in SPI_GETNONCLIENTMETRICS case are fine:
Dumping the entries preceding entry_CAPTIONLOGFONT:
--- snip --- Wine-dbg>x/100x &entry_DESKWALLPAPER
0x7eb58240 entry_DESKWALLPAPER: 7eabe42d 7eabe4b7 7eabe52c 7eaf631a 0x7eb58250 entry_DESKWALLPAPER+0x10: 00000000 00000001 003a0043 0075005c 0x7eb58260 entry_USERPREFERENCESMASK: 00650073 00730072 0066005c 0063006f 0x7eb58270 entry_USERPREFERENCESMASK+0x10: 00740068 0054005c 006d0065 005c0070 0x7eb58280 entry_CAPTIONLOGFONT: 00470042 006e0049 006f0066 0062002e 0x7eb58290 entry_CAPTIONLOGFONT+0x10: 0070006d 00000000 000002bc fffffff5 0x7eb582a0 entry_CAPTIONLOGFONT+0x20: 00000000 00000000 00000000 000002bc 0x7eb582b0 entry_CAPTIONLOGFONT+0x30: 00000000 22000000 0053004d 00530020 0x7eb582c0 entry_CAPTIONLOGFONT+0x40: 00650068 006c006c 00440020 0067006c 0x7eb582d0 entry_CAPTIONLOGFONT+0x50: 00000000 00000000 00000000 00000000 0x7eb582e0 entry_CAPTIONLOGFONT+0x60: 00000000 00000000 00000000 00000000 0x7eb582f0 entry_CAPTIONLOGFONT+0x70: 00000000 00000000 00000000 00000000 ... Wine-dbg>p *&entry_DESKWALLPAPER {hdr={get=0x7eabe42d, set=0x7eabe4b7, init=0x7eabe52c, regval="Wallpaper", mirror=0x0(nil), loaded=0x1}, ptr=0x3a0043, size=0x75005c} --- snip ---
Whoops, that structure type/layout seems wrong...
entry_DESKWALLPAPER:
--- snip --- struct sysparam_entry { BOOL (*get)( union sysparam_all_entry *entry, UINT int_param, void *ptr_param ); BOOL (*set)( union sysparam_all_entry *entry, UINT int_param, void *ptr_param, UINT flags ); BOOL (*init)( union sysparam_all_entry *entry ); const WCHAR *regval; const WCHAR *mirror; BOOL loaded; };
...
struct sysparam_path_entry { struct sysparam_entry hdr; WCHAR path[MAX_PATH]; };
...
#define PATH_ENTRY(name) \ struct sysparam_binary_entry entry_##name = { { get_path_entry, set_path_entry, init_path_entry, \ name ##_VALNAME } }
... static PATH_ENTRY( DESKWALLPAPER ); --- snip ---
Typo in PATH_ENTRY macro: "struct sysparam_binary_entry" should be "struct sysparam_path_entry".
http://source.winehq.org/git/wine.git/blob/51f936adc28187f0aaaacb8651b2dc3c6...
With that fix in place "bginfo" doesn't crash anymore. Probably fixes other apps too ...
Regards