http://bugs.winehq.org/show_bug.cgi?id=35375
Bug ID: 35375 Summary: Unimplemented function COMCTL32.dll.380 Product: Wine Version: 1.7.10 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: comctl32 Assignee: wine-bugs@winehq.org Reporter: denis.bonnenfant@diderot.org Classification: Unclassified
Created attachment 47178 --> http://bugs.winehq.org/attachment.cgi?id=47178 backtrace
Solidworks 2013 lauches at start sldprocmon.exe, a monitor normally displayed in systray.
Nothing is diplayed, but it takes 100% of 1 cpu. It regularly crashes with this error:
Unimplemented function COMCTL32.dll.380
http://bugs.winehq.org/show_bug.cgi?id=35375
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |focht@gmx.net Summary|Unimplemented function |Solidworks 2013 systray |COMCTL32.dll.380 |monitor 'sldprocmon.exe' | |needs COMCTL32.dll.380 | |(LoadIconMetric, Vista Ever confirmed|0 |1
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello denis,
this error is probably the result of native 'shlwapi.dll' and WinVer set to "Windows Vista" or greater in WINEPREFIX:
--- snip --- Module Address Debug info Name (71 modules) ... PE 77f60000-77fd6000 Deferred shlwapi ... --- snip ---
Any reason for this? Mixing those dlls with Wine builtin components should be avoided unless absolutely required.
Normally this bug would be invalid (API triggered by use of native dlls) but this specific case could be of some interest.
"Ordinal 380 not found in ComCtrl32.dll" search reveals some interesting entries:
https://stackoverflow.com/questions/4098076/does-windows-preload-comctrl32-d...
Ordinal 380 is LoadIconMetric(), a Vista+ API, exposed in Common Control library v6.10 (Windows Vista, Windows Server 2008, and Windows 7)
MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/bb775701%28v=vs.85%2...
--- quote --- LoadIconMetric function
Loads a specified icon resource with a client-specified system metric.
HRESULT LoadIconMetric( _In_ HINSTANCE hinst, _In_ PCWSTR pszName, _In_ int lims, _Out_ HICON *phico ); ... --- quote ---
Regards
http://bugs.winehq.org/show_bug.cgi?id=35375
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Solidworks 2013 systray |Solidworks 2013 systray |monitor 'sldprocmon.exe' |monitor 'sldprocmon.exe' |needs COMCTL32.dll.380 |needs COMCTL32.dll.380 |(LoadIconMetric, Vista |(LoadIconMetric, Vista+ | |API)
http://bugs.winehq.org/show_bug.cgi?id=35375
--- Comment #2 from denis bonnenfant denis.bonnenfant@diderot.org --- Created attachment 47181 --> http://bugs.winehq.org/attachment.cgi?id=47181 backtrace wow64, no shlwapi
http://bugs.winehq.org/show_bug.cgi?id=35375
--- Comment #3 from Anastasius Focht focht@gmx.net --- Hello denis,
thanks for the backtrace ... it seems the app imports this common controls v6.10 API.
The vendor states that SolidWorks 2013 requires at least Windows Vista+
http://www.solidworks.com/sw/support/SystemRequirements.html
Regards
http://bugs.winehq.org/show_bug.cgi?id=35375
--- Comment #4 from denis bonnenfant denis.bonnenfant@diderot.org --- I tried solidworks64, without wietricks ie8 ( which was the cause of shlwapi ovveride) and the crash is the same without shlwapi override.
see previous attachment.
http://bugs.winehq.org/show_bug.cgi?id=35375
--- Comment #5 from denis bonnenfant denis.bonnenfant@diderot.org --- Created attachment 47182 --> http://bugs.winehq.org/attachment.cgi?id=47182 backtrace sw32 no shlwapi
http://bugs.winehq.org/show_bug.cgi?id=35375
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |elycastellano@gmail.com
--- Comment #6 from Bruno Jesus 00cpxxx@gmail.com --- *** Bug 35480 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=35375
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://go.microsoft.com/fwl | |ink/p/?LinkId=248256 Summary|Solidworks 2013 systray |Multiple applications need |monitor 'sldprocmon.exe' |Vista+ API COMCTL32.dll.380 |needs COMCTL32.dll.380 |a.k.a. 'LoadIconMetric' |(LoadIconMetric, Vista+ |(Solidworks 2013 systray |API) |monitor, Microsoft | |One/SkyDrive)
--- Comment #7 from Anastasius Focht focht@gmx.net --- Hello folks,
revisiting, still present.
This is also needed for Microsoft 'OneDrive' or 'SkyDrive' (whatever they call it now).
--- snip --- ... 0046:Call KERNEL32.CreateProcessW(001512e8 L"C:\users\focht\Local Settings\Application Data\Microsoft\SkyDrive\SkyDrive.exe",00bee924 L"",00000000,00000000,00000001,00000400,00000000,00000000,00bee85c,00bee914) ret=0043084f ... 002f:Call KERNEL32.__wine_kernel_init() ret=7bc59dbc ... 0046:Ret KERNEL32.CreateProcessW() retval=00000001 ret=0043084f ... 002f:Call user32.IsWindow(000100ba) ret=10084133 002f:Ret user32.IsWindow() retval=00000001 ret=10084133 002f:Call user32.LoadMenuW(003f0001,00001b6c) ret=100aa571 002f:Ret user32.LoadMenuW() retval=000100bc ret=100aa571 002f:Call user32.GetSubMenu(000100bc,00000000) ret=10084716 002f:Ret user32.GetSubMenu() retval=000100be ret=10084716 002f:Call user32.SetMenuDefaultItem(000100be,00001b59,00000000) ret=1008452a 002f:Ret user32.SetMenuDefaultItem() retval=00000001 ret=1008452a 002f:trace:seh:raise_exception code=80000100 flags=1 addr=0x7bc520be ip=7bc520be tid=002f 002f:trace:seh:raise_exception info[0]=10105666 002f:trace:seh:raise_exception info[1]=0000017c wine: Call from 0x7bc520be to unimplemented function COMCTL32.dll.380, aborting 002f:trace:seh:call_stack_handlers calling handler at 0x100da7a0 code=80000100 flags=1 002f:trace:seh:call_stack_handlers handler at 0x100da7a0 returned 1 ... Backtrace: =>0 0x7bc520be stub_entry_point+0x4b(dll="COMCTL32.dll", name=*** invalid address 0x17c ***, ret_addr=0x100aa46b) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/loader.c:196] in ntdll (0x0033f630) 1 0x00340096 (0x0033f690) 2 0x100a5554 in skydriveclient (+0xa5553) (0x0033fa9c) 3 0x1009be3e in skydriveclient (+0x9be3d) (0x0033fad4) 4 0x10060bf4 in skydriveclient (+0x60bf3) (0x0033fafc) 5 0x1005721d in skydriveclient (+0x5721c) (0x0033fb3c) 6 0x00404ae4 in skydrive (+0x4ae3) (0x0033fdd4) 7 0x004053de in skydrive (+0x53dd) (0x0033fe20) 8 0x7b86404c call_process_entry+0xb() in kernel32 (0x0033fe38) ... Modules: Module Address Debug info Name (130 modules) PE 350000- 3ca000 Deferred wnsclientapi PE 3d0000- 3da000 Deferred logging PE 400000- 440000 Export skydrive PE 440000- 673000 Deferred syncengine PE 680000- 83b000 Deferred skydrivesessions PE 840000- 8c7000 Deferred telemetry PE 8d0000- 98d000 Deferred remoteaccess PE eb0000- 10fb000 Deferred skydrive.resources PE 10000000-1012c000 Export skydriveclient ... Threads: process tid prio (all id:s are in hex) ... 0000002e (D) C:\users\focht\Local Settings\Application Data\Microsoft\SkyDrive\SkyDrive.exe 00000034 0 00000037 0 00000035 0 0000002f 0 <== --- snip ---
$ sha1sum OneDriveSetup.exe 172ea5833afcc53b4876cb8d9849ba122e5e9223 OneDriveSetup.exe
$ du -sh OneDriveSetup.exe 5.9M OneDriveSetup.exe
$ wine --version wine-1.7.21-41-g5af3b8c
Regards
http://bugs.winehq.org/show_bug.cgi?id=35375
Michael Müller michael@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |michael@fds-team.de
--- Comment #8 from Michael Müller michael@fds-team.de --- Hi,
I have written an implementation and test for LoadIconMetric. Could you please test whether it fixes the problem?
Patch: https://github.com/compholio/wine-compholio/blob/master/patches/comctl32-Loa...
Test: https://github.com/compholio/wine-compholio/blob/master/patches/comctl32-Loa...
Regards
http://bugs.winehq.org/show_bug.cgi?id=35375
--- Comment #9 from Anastasius Focht focht@gmx.net --- Hello Michael,
yes, the patch lets it run further.
--- snip --- ... 0041:Call user32.LoadMenuW(003f0001,00001b6c) ret=100aa571 0041:Ret user32.LoadMenuW() retval=00020068 ret=100aa571 0041:Call user32.GetSubMenu(00020068,00000000) ret=10084716 0041:Ret user32.GetSubMenu() retval=0002007c ret=10084716 0041:Call user32.SetMenuDefaultItem(0002007c,00001b59,00000000) ret=1008452a 0041:Ret user32.SetMenuDefaultItem() retval=00000001 ret=1008452a 0041:Call comctl32.LoadIconMetric(00eb0000,0000020b,00000000,0033f678) ret=100aa46b 0041:trace:commctrl:LoadIconMetric (0xeb0000 #020b 0 0x33f678) 0041:Call user32.GetSystemMetrics(00000031) ret=7dc5aade 0041:Ret user32.GetSystemMetrics() retval=00000010 ret=7dc5aade 0041:Call user32.GetSystemMetrics(00000032) ret=7dc5aaf0 0041:Ret user32.GetSystemMetrics() retval=00000010 ret=7dc5aaf0 0041:Call user32.LoadImageW(00eb0000,0000020b,00000001,00000010,00000010,00008000) ret=7dc5ab5a 0041:Ret user32.LoadImageW() retval=00020094 ret=7dc5ab5a 0041:Ret comctl32.LoadIconMetric() retval=00000000 ret=100aa46b 0041:Call KERNEL32.GetLastError() ret=10060532 0041:Ret KERNEL32.GetLastError() retval=00000000 ret=10060532 0041:Call comctl32.LoadIconMetric(00eb0000,000001f6,00000000,0033f678) ret=100aa46b 0041:trace:commctrl:LoadIconMetric (0xeb0000 #01f6 0 0x33f678) 0041:Call user32.GetSystemMetrics(00000031) ret=7dc5aade 0041:Ret user32.GetSystemMetrics() retval=00000010 ret=7dc5aade 0041:Call user32.GetSystemMetrics(00000032) ret=7dc5aaf0 0041:Ret user32.GetSystemMetrics() retval=00000010 ret=7dc5aaf0 0041:Call user32.LoadImageW(00eb0000,000001f6,00000001,00000010,00000010,00008000) ret=7dc5ab5a 0041:Ret user32.LoadImageW() retval=00020092 ret=7dc5ab5a 0041:Ret comctl32.LoadIconMetric() retval=00000000 ret=100aa46b ... --- snip ---
It still fails in the end, complaining with: "OneDrive can't be run using full administrator rights" but that's a different bug (TokenElevation/TokenElevationType).
Regards
http://bugs.winehq.org/show_bug.cgi?id=35375
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36073
https://bugs.winehq.org/show_bug.cgi?id=35375
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
--- Comment #10 from Anastasius Focht focht@gmx.net --- Hello folks,
revisiting, still present.
https://github.com/wine-compholio/wine-staging/tree/master/patches/comctl32-...
$ wine --version wine-1.7.35-73-g6eb4966
Regards
https://bugs.winehq.org/show_bug.cgi?id=35375
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
https://bugs.winehq.org/show_bug.cgi?id=35375
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #11 from super_man@post.com --- Still present,but I do confirm that the patch works with the download provided here.
wine 1.7.50
https://bugs.winehq.org/show_bug.cgi?id=35375
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |christian@marmolejosfamily. | |com
--- Comment #12 from Sebastian Lackner sebastian@fds-team.de --- *** Bug 39208 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=35375
Michael Müller michael@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |STAGED Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/comctl32-LoadI | |conMetric
https://bugs.winehq.org/show_bug.cgi?id=35375
--- Comment #13 from Nikolay Sivov bunglehead@gmail.com --- Hi, Michael.
Please send this, tests look fine.
This part needs to be improved I think:
--- + /* FIXME: This doesn't seem to work properly yet with file names. */ + *icon = LoadImageW(hinst, name, IMAGE_ICON, width, height, 0); + if (*icon) + return S_OK; ---
to use LR_LOADFROMFILE when appropriate.
--- +380 stdcall LoadIconMetric(ptr wstr long ptr) ---
ptr/long give same result in this context, but to match the rest of spec files first arg needs fixing.
https://bugs.winehq.org/show_bug.cgi?id=35375
--- Comment #14 from Michael Müller michael@fds-team.de --- There is another problem with this patch. The MSDN clearly mentions that LoadIconMetric is supposed to downscale if possible:
If an exact size match cannot be found and a larger icon is available, a new icon is created by scaling the larger version down to the desired size.
This is not the case for my implementation: LoadImageW -> CURSORICON_Load -> CURSORICON_FindBestIconRes -> CURSORICON_FindBestIcon:
---- for ( i = 0; iTotalDiff && get_entry( dir, size, i, &cx, &cy, &bits ); i++ ) { iTempXDiff = abs(width - cx); iTempYDiff = abs(height - cy);
if(iTotalDiff > (iTempXDiff + iTempYDiff)) { iXDiff = iTempXDiff; iYDiff = iTempYDiff; iTotalDiff = iXDiff + iYDiff; } } ----
The current implementation uses the closest match instead of downscaling if possible. This is the main reason why I didn't this patch so far, it will most probably need further changes in the underlying functions to work correctly.
If the current approach is still suitable for the development branch, I can fix the problem with LR_LOADFROMFILE and send it upstream.
https://bugs.winehq.org/show_bug.cgi?id=35375
--- Comment #15 from Nikolay Sivov bunglehead@gmail.com ---
If the current approach is still suitable for the development branch, I can fix the problem with LR_LOADFROMFILE and send it upstream.
I don't see why not, worst case scenario is that some icons will look worse than they should instead of having a crash or silent failure on unimplemented function.
https://bugs.winehq.org/show_bug.cgi?id=35375
--- Comment #16 from Michael Müller michael@fds-team.de --- (In reply to Nikolay Sivov from comment #15)
If the current approach is still suitable for the development branch, I can fix the problem with LR_LOADFROMFILE and send it upstream.
I don't see why not, worst case scenario is that some icons will look worse than they should instead of having a crash or silent failure on unimplemented function.
I have updated the patch. Are you fine with the new version?
https://bugs.winehq.org/show_bug.cgi?id=35375
--- Comment #17 from Nikolay Sivov bunglehead@gmail.com --- Yes, I think it's fine. One additional thing to improve is to test if HICON arg is zeroed on invalid LIM_* value and fix it if needed.
https://bugs.winehq.org/show_bug.cgi?id=35375
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |088eb87e3b6e3b41acde6f544b1 | |f9d41b83674bf Status|STAGED |RESOLVED Resolution|--- |FIXED
--- Comment #18 from Sebastian Lackner sebastian@fds-team.de --- Fixed with http://source.winehq.org/git/wine.git/commit/088eb87e3b6e3b41acde6f544b1f9d4....
https://bugs.winehq.org/show_bug.cgi?id=35375
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #19 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.53.
https://bugs.winehq.org/show_bug.cgi?id=35375
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://go.microsoft.com/fwl |https://web.archive.org/web |ink/p/?LinkId=248256 |/20140819001912/http://wl.d | |lservice.microsoft.com/down | |load/3/7/9/379B6693-4308-44 | |9C-8556-AB1494F184AF/OneDri | |veSetup.exe
--- Comment #20 from Anastasius Focht focht@gmx.net --- Hello folks,
adding stable download link via Internet Archive for documentation.
https://web.archive.org/web/20140819001912/http://wl.dlservice.microsoft.com...
https://www.virustotal.com/gui/file/83d2429a8568ee4ea0ed002c0897560c6b0a3e0b...
$ sha1sum OneDriveSetup.exe 172ea5833afcc53b4876cb8d9849ba122e5e9223 OneDriveSetup.exe
$ du -sh OneDriveSetup.exe 5.9M OneDriveSetup.exe
Regards