Bug 141905 - [WinCairo] WinLauncher is not starting on Vista.
Summary: [WinCairo] WinLauncher is not starting on Vista.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-23 06:24 PST by peavo
Modified: 2015-02-25 14:52 PST (History)
3 users (show)

See Also:


Attachments
Patch (1.98 KB, patch)
2015-02-23 06:29 PST, peavo
no flags Details | Formatted Diff | Diff
Patch (2.20 KB, patch)
2015-02-24 10:21 PST, peavo
no flags Details | Formatted Diff | Diff
Patch (2.18 KB, patch)
2015-02-24 12:43 PST, peavo
no flags Details | Formatted Diff | Diff
Patch (8.67 KB, patch)
2015-02-25 13:45 PST, peavo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description peavo 2015-02-23 06:24:45 PST
The Windows api function MFCreateSourceResolver has moved from Mf.dll in Vista to Mfplat.dll in Windows 7, we have to soft link.
See https://msdn.microsoft.com/en-us/library/windows/desktop/ms697433(v=vs.85).aspx
Comment 1 peavo 2015-02-23 06:29:46 PST
Created attachment 247115 [details]
Patch
Comment 2 Brent Fulgham 2015-02-23 10:46:43 PST
Comment on attachment 247115 [details]
Patch

I don't think I understand this patch. If this function is in MFplat.dll on Windows 7, and MF.dll on Vista, don't we need to soft link against both functions, and then use whichever one is available on the current OS?
Comment 3 peavo 2015-02-23 11:12:07 PST
(In reply to comment #2)
> Comment on attachment 247115 [details]
> Patch
> 
> I don't think I understand this patch. If this function is in MFplat.dll on
> Windows 7, and MF.dll on Vista, don't we need to soft link against both
> functions, and then use whichever one is available on the current OS?

According to the documentation, they've put a stub function in Mf.dll on Windows 7, which calls into Mfplat.dll, so I think it will be sufficient to soft link with  the one in Mf.dll, if that was what you meant?
Comment 4 Alex Christensen 2015-02-23 11:33:56 PST
Is there a log of which dlls are being loaded, and which functions are not found when loading them?  The Win32 API documentation says that there is always at least a stub implementation in MF.dll, which leads me to believe that this is not what is failing.
Comment 5 peavo 2015-02-23 11:49:53 PST
(In reply to comment #4)
> Is there a log of which dlls are being loaded, and which functions are not
> found when loading them?  The Win32 API documentation says that there is
> always at least a stub implementation in MF.dll, which leads me to believe
> that this is not what is failing.

I don't remember the exact dialog error message on Vista, but I think it was something like "the function MfCreateSourceResolver cannot be found in Mfplat.dll". I assume we then have linked against the one in the Mfplat library.
Comment 6 peavo 2015-02-23 11:59:13 PST
(In reply to comment #5)
> (In reply to comment #4)
> > Is there a log of which dlls are being loaded, and which functions are not
> > found when loading them?  The Win32 API documentation says that there is
> > always at least a stub implementation in MF.dll, which leads me to believe
> > that this is not what is failing.
> 
> I don't remember the exact dialog error message on Vista, but I think it was
> something like "the function MfCreateSourceResolver cannot be found in
> Mfplat.dll". I assume we then have linked against the one in the Mfplat
> library.

But it's strange that we didn't originally link with the one in Mf.dll, since we are building with an older SDK than Win7 ...
Comment 7 Alex Christensen 2015-02-23 12:12:04 PST
Try removing mfplat.lib from WebKitLibraries/win/tools/vsprops/WinCairo.props.  Maybe we shouldn't link with that directly.
Comment 8 peavo 2015-02-23 12:51:51 PST
(In reply to comment #7)
> Try removing mfplat.lib from
> WebKitLibraries/win/tools/vsprops/WinCairo.props.  Maybe we shouldn't link
> with that directly.

Thanks, will try that :)
Comment 9 peavo 2015-02-24 10:20:44 PST
(In reply to comment #7)
> Try removing mfplat.lib from
> WebKitLibraries/win/tools/vsprops/WinCairo.props.  Maybe we shouldn't link
> with that directly.

I tested this, but then MFStartup and MFShutdown were unresolved, so it seems we should link with Mfplat.lib, unless we want to softlink more functions.
Comment 10 peavo 2015-02-24 10:21:57 PST
Created attachment 247240 [details]
Patch
Comment 11 peavo 2015-02-24 10:23:15 PST
(In reply to comment #10)
> Created attachment 247240 [details]
> Patch

An alternative to this would be to soft link more, or all, of the Media Foundation functions.
Comment 12 Alex Christensen 2015-02-24 10:25:30 PST
Yep, that's a problem.  This looks like a good solution, then, except what indicates that MFCreateSourceResolver is the only function that needs this, and how would we effectively test to make sure no other functions have this problem?
Comment 13 peavo 2015-02-24 10:44:17 PST
(In reply to comment #12)
> Yep, that's a problem.  This looks like a good solution, then, except what
> indicates that MFCreateSourceResolver is the only function that needs this,
> and how would we effectively test to make sure no other functions have this
> problem?

Good point, and to be honest, I don't know the answer. But I guess we can say for sure that with the MF functions currently used, there are no more cases on Vista, since WinLauncher is starting on Vista for me with this patch. I haven't tested WinXP though, there might be similar cases there.
Comment 14 peavo 2015-02-24 12:43:37 PST
Created attachment 247254 [details]
Patch
Comment 15 peavo 2015-02-24 12:44:14 PST
(In reply to comment #14)
> Created attachment 247254 [details]
> Patch

The Mac build failed for some reason, trying again :)
Comment 16 peavo 2015-02-25 13:45:37 PST
Created attachment 247341 [details]
Patch
Comment 17 peavo 2015-02-25 13:46:30 PST
(In reply to comment #16)
> Created attachment 247341 [details]
> Patch

I tested on WinXP, which had similar problems, so I just soft linked everything.
Comment 18 peavo 2015-02-25 14:06:55 PST
Thanks for reviewing :)

Btw, why are we compiling with WINVER == 0x0502 (Windows Server 2003)?

Should we be using WINVER == 0x05010300 (WinXP SP3)?
Comment 19 WebKit Commit Bot 2015-02-25 14:37:27 PST
Comment on attachment 247341 [details]
Patch

Clearing flags on attachment: 247341

Committed r180641: <http://trac.webkit.org/changeset/180641>
Comment 20 WebKit Commit Bot 2015-02-25 14:37:31 PST
All reviewed patches have been landed.  Closing bug.
Comment 21 Alex Christensen 2015-02-25 14:52:14 PST
(In reply to comment #18)
> Thanks for reviewing :)
> 
> Btw, why are we compiling with WINVER == 0x0502 (Windows Server 2003)?
> 
> Should we be using WINVER == 0x05010300 (WinXP SP3)?
I'm not sure.  Look at the svn blame.  Maybe we don't need to any more.