[PATCH] wmp/tests: Stop crash when setting a media option.

Zebediah Figura z.figura12 at gmail.com
Thu Mar 29 09:36:57 CDT 2018


On 29/03/18 08:46, Jacek Caban wrote:
> Hi Alistair,
> 
> 
> diff --git a/dlls/wmp/tests/oleobj.c b/dlls/wmp/tests/oleobj.c
> index e4c2294436..58ba6081b1 100644
> --- a/dlls/wmp/tests/oleobj.c
> +++ b/dlls/wmp/tests/oleobj.c
> @@ -970,10 +970,13 @@ static void test_wmp_ifaces(IOleObject *oleobj)
>      ok(0 == lstrcmpW(url, filename), "%s != %s\n", wine_dbgstr_w(url), wine_dbgstr_w(filename));
>      SysFreeString(url);
>  
> +    /* Keep a reference since we are using the same media object, stops a crash (w2003std, wvistau64) */
> +    IWMPMedia_AddRef(media);
>      SET_EXPECT(GetContainer);
>      hres = IWMPPlayer4_put_currentMedia(player4, media);
>      ok(hres == S_OK, "put_currentMedia failed: %08x\n", hres);
>      todo_wine CHECK_CALLED_OR_BROKEN(GetContainer);
> +    IWMPMedia_Release(media);
>  
>      IWMPMedia_Release(media);
> 
> 
> Note that we already hold reference to media interface, so this should not be needed. If the patch helps, it means that we have a problem with ref counting somewhere else or Windows implementation is somehow broken. Given that the problem is visible only on one platform, I suspect the later. Maybe we should skip WMP tests on this platform?
> 
> Thanks,
> Jacek
> 
> 
> 

For what it's worth, it seems to me that it'd be more desirable to work
around a Windows bug rather than skip the test entirely.



More information about the wine-devel mailing list