[Bug 8072] Media Player Classic segfaults

Wine Bugs wine-bugs at winehq.org
Wed May 9 14:38:36 CDT 2007


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





------- Additional Comments From focht at gmx.net  2007-09-05 14:38 -------
Created an attachment (id=6198)
 --> (http://bugs.winehq.org/attachment.cgi?id=6198&action=view)
Implements shell32 APIs to get mplayer to work with native file/folder browser

Hello,

seems my SHMapIDListToImageListIndexAsync() fix got incorporated so we can
explore further ... to the next crash *g*

--- snip ---
fixme:shell:SHELL32_714 (L"Z:\\home\\focht\\mplayer")stub
fixme:shell:SHMapIDListToImageListIndexAsync ((nil), 0x19b620, 0x1a09d8,
0x00000000, 0x763547f9, 0x1a09f8, (nil), 0x1a0a14, 0x1a0a18)
wine: Call from 0x76355050 to unimplemented function SHELL32.dll.755, aborting
wine: Unimplemented function SHELL32.dll.755 called at address 0x76355050
(thread 0040), starting debugger...
Unhandled exception: unimplemented function SHELL32.dll.755 called in 32-bit
code (0x7bc396dc).
--- snip ---

shell32.dll ordinal 755 is PathIsEqualOrSubFolder() - a rather undocumented
one.

I googled a bit and found that one implementation was introduced to wine dev
mailing list some time ago and got rejected because it was not
implemented/working correctly.
The ReactOS one isnt right either (people havent found out yet i guess) :-)

What both implementations did not account for is the fact, that the first
parameter can actually be both - a pointer or an index.
This dirty trick is the same brain damaged mechanism like SendMessage's LPARAM
(string pointer vs. integer index)

After adding an implementation based on shell32 trace it goes a lot further.
It finally shows the file dialog using native common dialog controls :)
They look a bit different, probably due to wine stubs but well (good test case
for other wine components/subsystems).

--- snip ---
0009:trace:shell:PathIsEqualOrSubFolder (0x27,
L"c:\\windows\\profiles\\focht\\My Documents")
0009:trace:shell:SHGetFolderPathW (nil),0x34d074,nFolder=0x4027
0009:trace:shell:_SHGetUserProfilePath (nil),0x00000000,0x27,0x34ca1c
0009:trace:shell:_SHGetUserShellFolderPath 0x80000001,(null),L"My
Pictures",0x34ca1c
...
0009:trace:shell:SHGetFolderPathW returning 0x00000000 (final path is
L"c:\\windows\\profiles\\focht\\My Pictures")
0009:Call shlwapi.PathRemoveBackslashW(0034d074
L"c:\\windows\\profiles\\focht\\My Pictures") ret=637f9263
0009:trace:shell:PathRemoveBackslashW (L"c:\\windows\\profiles\\focht\\My
Pictures")
0009:Call user32.CharPrevW(0034d074 L"c:\\windows\\profiles\\focht\\My
Pictures",0034d0be L"") ret=608b57cf
0009:Ret  user32.CharPrevW() retval=0034d0bc ret=608b57cf
0009:trace:shell:PathIsRootW (L"c:\\windows\\profiles\\focht\\My Pictures")
0009:Ret  shlwapi.PathRemoveBackslashW() retval=0034d0bc ret=637f9263
0009:Call shlwapi.PathCommonPrefixW(0034d074 L"c:\\windows\\profiles\\focht\\My
Pictures",0034d31c L"c:\\windows\\profiles\\focht\\My Documents",0034ce6c)
ret=637f9323
0009:trace:shell:PathCommonPrefixW (L"c:\\windows\\profiles\\focht\\My
Pictures",L"c:\\windows\\profiles\\focht\\My Documents",0x34ce6c)
0009:trace:shell:PathIsUNCW (L"c:\\windows\\profiles\\focht\\My Pictures")
0009:trace:shell:PathIsUNCW (L"c:\\windows\\profiles\\focht\\My Documents")
0009:Ret  shlwapi.PathCommonPrefixW() retval=00000019 ret=637f9323
0009:Call KERNEL32.lstrcmpiW(0034d074 L"c:\\windows\\profiles\\focht\\My
Pictures",0034ce6c L"c:\\windows\\profiles\\focht") ret=637f9340
0009:Ret  KERNEL32.lstrcmpiW() retval=00000001 ret=637f9340
0009:Ret  shell32.755() retval=00000001 ret=76355050
--- snip ---

Ok, i thought "this is it" - until i double clicked an item :(

Crashes on unimplemented "SHCreateShellItem()".
I added a minimal stub for this, which actually does nothing but E_FAIL :)
(dont use -noname for that export on .spec file, it must be visible!)

Now it seems to work. One can walk folder structure and click/open items.
Beware if you walk up to root directory which contains "net"/"network" folder,
it takes some time to refresh then.

It seems that using native comdlg32 is a good test case for wine shell32
module/API.
(To get an impression what might be missing/required).
Use WINEDEBUG=+shell and see what i mean.

Attached is a sample implementation of all the stuff bespoken here.
The file/folder browser dialog stuff doesnt crash anymore with that patch
applied.
Use it for your convenience.

Regards


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list