https://bugs.winehq.org/show_bug.cgi?id=26369
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Keywords| |dotnet URL|http://ares.x10studio.com |https://www.fileplanet.com/ | |217883/download/A.R.E.S:-Ex | |tinction-Agenda-Demo Version|unspecified |1.3.15 Summary|A.R.E.S. Extinction Agenda |A.R.E.S. Extinction Agenda |demo hangs during intro |1.x (.NET 2.0, XNA 3.1 | |game) crashes during intro | |('quartz' | |FilterGraph2_Connect should | |translate HRESULT of | |failures more correctly)
--- Comment #6 from Anastasius Focht focht@gmx.net --- Hello folks,
prerequisites list from installer:
--- snip --- * Minimum System Requirements
* Windows XP/Vista/7 * Pentium 4 2.4 GHz or equivalent AMD's CPU * 1 GB * 600 MB free HD space * NVIDIA GeForce 6600 or ATI X1300 XT or better * 100% DirectX 9.0c compatible sound card and drivers. * XNA Framework 3.1 (Included) * .NET Framework 2.0 (Included) --- snip ---
* bug 34622 ("Multiple games need CLSID_DMOWrapperFilter/DMO Wrapper Filter '{94297043-bd82-4dfd-b0de-8177739c6d20}', 'qasf.dll' (Neocron, Age of empires III Steam, .NET XNA 3.x/4.x games using Media classes)") * bug 45365 ("Multiple .NET XNA 3.x/4.x games using Microsoft.Xna.Framework.Media classes crash due to IWMPCore3::newMedia stub")
With these worked around it runs into:
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/ARES - Demo
$ file *.{dll,exe} AssetLoader.dll: PE32 executable (DLL) (console) Intel 80386 Mono/.Net assembly, for MS Windows FlatRedBall.dll: PE32 executable (DLL) (console) Intel 80386 Mono/.Net assembly, for MS Windows X10.FRB.dll: PE32 executable (DLL) (console) Intel 80386 Mono/.Net assembly, for MS Windows ARES.exe: PE32 executable (GUI) Intel 80386 Mono/.Net assembly, for MS Windows unins000.exe: PE32 executable (GUI) Intel 80386, for MS Windows
$ wine ./ARES.exe ... Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Song playback failed. Please verify that the song is not DRM protected. DRM protected songs are not supported for creator games. ---> System.InvalidOperationException: An unexpected error has occurred. --- End of inner exception stack trace --- at Microsoft.Xna.Framework.Media.MediaQueue.Play(Song song) at Microsoft.Xna.Framework.Media.MediaPlayer.Play(Song song) at Trashman.Screens.Screen.SetBGMusic(String soundName) at Trashman.Screens.MainMenuScreen..ctor() --- End of inner exception stack trace --- at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at Trashman.Screens.ScreenManager.LoadScreen(String screen, Layer layerToLoadScreenOn, Object[] args) at Trashman.Screens.ScreenManager.Activity() at Trashman.Trashman.Update(GameTime gameTime) at Microsoft.Xna.Framework.Game.Tick() at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e) at Microsoft.Xna.Framework.GameHost.OnIdle() at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e) at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at Microsoft.Xna.Framework.WindowsGameHost.Run() at Microsoft.Xna.Framework.Game.Run() at Trashman.Program.Main(String[] args) wine: Unhandled exception 0xe0434f4d in thread 9 at address 0x7b446fe6 (thread 0009), starting debugger... --- snip ---
Trace log:
--- snip --- $ WINEDEBUG=+seh,+relay,+quartz,+msacm wine ./ARES.exe >>log.txt 2>&1 ... 004d:Call window proc 0x1002a270 (hwnd=0x30074,msg="Microsoft.Xna.Framework.Media.WmpProxyThread",wp=00000000,lp=00000000) ... 004d:Call KERNEL32.LoadLibraryExW(09cdf0be L"C:\windows\system32\quartz.dll",00000000,00000008) ret=7e183052 ... 004d:Call quartz.DllGetClassObject(09cdf428,7e264488,09cdf438) ret=7e18523f 004d:trace:quartz:DllGetClassObject ({e436ebb3-524f-11ce-9f53-0020af0ba770},{00000001-0000-0000-c000-000000000046},0x9cdf438) ... 004d:trace:quartz:DSCF_CreateInstance (0x70e03a0)->((nil),{56a868a9-0ad4-11ce-b03a-0020af0ba770},0x9cdf43c) 004d:trace:quartz:FilterGraph_create ((nil),0x9cdf3dc) ... 004d:trace:quartz:DSCF_CreateInstance (0x70e1e50)->((nil),{56a86895-0ad4-11ce-b03a-0020af0ba770},0x9cdf42c) 004d:trace:quartz:DSoundRender_create ((nil), 0x9cdf3cc) ... 004d:trace:quartz:DSoundRender_QueryInterface (0x6f5dec8, 0x6f5dec8)->({56a86895-0ad4-11ce-b03a-0020af0ba770}, 0x9cdf42c) ... 004d:trace:quartz:FilterGraph2_EnumFilters (0x70e03b8/0x70e03bc)->(0x9cdf360) ... 004d:trace:quartz:FilterGraph2_AddSourceFilter (0x70e03b8/0x70e03bc)->(L"c:\program files\ares - demo\content\aud\menu.wma", (null), 0x2f15df4) 004d:trace:quartz:GetClassMediaFile ((nil), L"c:\program files\ares - demo\content\aud\menu.wma", (nil), (nil)) ... 004d:trace:quartz:DSCF_CreateInstance (0x723cdc8)->((nil),{56a86895-0ad4-11ce-b03a-0020af0ba770},0x9cdf06c) ... 004d:trace:quartz:AsyncReader_QueryInterface 0x19ca48->({56a868a6-0ad4-11ce-b03a-0020af0ba770}, 0x9cdf1cc) 004d:trace:quartz:FileSource_Load 0x19ca48->(L"c:\program files\ares - demo\content\aud\menu.wma", (nil)) 004d:Call KERNEL32.CreateFileW(09cdf384 L"c:\program files\ares - demo\content\aud\menu.wma",80000000,00000001,00000000,00000003,40000000,00000000) ret=7a7287d6 004d:Ret KERNEL32.CreateFileW() retval=00000670 ret=7a7287d6 ... 004d:trace:quartz:GetClassMediaFile (0x72e43d8, L"c:\program files\ares - demo\content\aud\menu.wma", 0x1752d8d0, 0x1752d8e0) ... 004d:trace:quartz:process_pattern_string Pattern string: L"0,4,ffdfdfdf,3C53414d" ... 004d:trace:quartz:FileAsyncReader_SyncRead 0x72e4248->(0, 4, 0x72e4428) ... 004d:trace:quartz:FileAsyncReader_SyncRead -- 0 ... 004d:trace:quartz:GetClassMediaFile Found file's class: 004d:trace:quartz:GetClassMediaFile major = MEDIATYPE_Stream 004d:trace:quartz:GetClassMediaFile subtype = {6b6d0801-9ada-11d0-a520-00a0d10129c0} 004d:trace:quartz:FileAsyncReaderPin_Release (0x72e4248)->() Release from 2 004d:trace:quartz:AsyncReader_Release 0x19ca48->() Release from 2 004d:trace:quartz:AsyncReader_FindPin 0x19ca48->(L"Output", 0x9cdf1c8) 004d:trace:quartz:FileAsyncReaderPin_QueryInterface ({56a868aa-0ad4-11ce-b03a-0020af0ba770}, 0x9cdf1d0) 004d:trace:quartz:FileAsyncReaderPin_Release (0x72e4248)->() Release from 3 004d:trace:quartz:GetClassMediaFile (0x72e43d8, L"c:\program files\ares - demo\content\aud\menu.wma", (nil), (nil)) ... 004d:Call ole32.CoCreateInstance(7a7cdfe8,072feb70,00000001,7a7d42e0,072fed30) ret=7a7ab4c5 ... 004d:trace:quartz:DllGetClassObject ({060af76c-68dd-11d0-8fc1-00c04fd9189d},{00000001-0000-0000-c000-000000000046},0x9cde858) ... 004d:Ret ole32.CoCreateInstance() retval=00000000 ret=7bd4dc01 004d:fixme:strmbase:TransformFilterImpl_QueryInterface No interface for {37d84f60-42cb-11ce-8135-00aa004bb851}! ... 004d:trace:quartz:FilterGraph2_AddFilter (0x70e03b8/0x70e03bc)->(0x72feb70, L"ACM Wrapper" (0x72fc834)) ... 004d:trace:quartz:ACMWrapper_SetMediaType (0x72feb70)->(0 0x72fe590) ... 004d:Call msacm32.acmStreamOpen(09cded94,00000000,072fc978,072fe5e0,00000000,00000000,00000000,00000000) ret=7a71a231 ... 004d:trace:msacm:acmStreamOpen (0x9cded94, (nil), 0x72fc6f8, 0x72fe388, (nil), 0, 0, 0) 004d:trace:msacm:acmStreamOpen src [wFormatTag=353, nChannels=2, nSamplesPerSec=44100, nAvgBytesPerSec=24002, nBlockAlign=8917, wBitsPerSample=16, cbSize=10] 004d:trace:msacm:acmStreamOpen dst [wFormatTag=1, nChannels=2, nSamplesPerSec=44100, nAvgBytesPerSec=176400, nBlockAlign=4, wBitsPerSample=16, cbSize=0] ... 004d:trace:msacm:acmStreamOpen => (512) 004d:Ret msacm32.acmStreamOpen() retval=00000200 ret=7a71a231 004d:fixme:quartz:ACMWrapper_SetMediaType acmStreamOpen returned 512 ... 004d:trace:quartz:ACMWrapper_SetMediaType Unable to find a suitable ACM decompressor 004d:trace:quartz:ACMWrapper_SetMediaType Connection refused ... 004d:trace:quartz:FilterGraph2_Connect Cannot connect to filter (80040207), trying next one ... 004d:trace:quartz:FilterGraph2_RemoveFilter (0x70e03b8/0x70e03bc)->(0x72feb70) 004d:trace:quartz:FilterGraph2_RemoveFilter Removing filter L"ACM Wrapper" ... 004d:trace:quartz:FilterGraph2_Connect --> 80040207 ... 004d:trace:quartz:BasicAudio_put_Volume (0x70e03b8/0x70e03c8)->(-1204) 004d:trace:quartz:MediaControl_Stop (0x70e03b8/0x70e03c0)->()
--- snip ---
wFormatTag=353 -> WAVE_FORMAT_WMAUDIO2
https://msdn.microsoft.com/en-us/library/windows/desktop/ff819497(v=vs.85).a...
--- quote --- Format tag constant Format tag value Audio format
WAVE_FORMAT_WMAUDIO2 0x0161 Windows Media Audio Standard WAVE_FORMAT_WMAUDIO3 0x0162 Windows Media Audio Professional WAVE_FORMAT_WMAUDIO_LOSSLESS 0x0163 Windows Media Audio Lossless --- quote ---
So there are at least two bugs here (apart from the already mentioned ones):
* missing support for input format WAVE_FORMAT_WMAUDIO2, 0x0161 (I found some mentioning of this format tag in Bugzilla but most bugs were messed up as usual)
* native quartz can somehow handle failures of unsupported formats more gracefully -> this ticket
With native 'quartz':
--- snip --- ... 0046:Call msacm32.acmStreamOpen(00000000,00000000,072f75e8,072f7ce8,00000000,00000000,00000000,00000005) ret=3552b9c4 0046:trace:msacm:acmStreamOpen ((nil), (nil), 0x72f75e8, 0x72f7ce8, (nil), 0, 0, 5) 0046:trace:msacm:acmStreamOpen src [wFormatTag=353, nChannels=2, nSamplesPerSec=44100, nAvgBytesPerSec=24002, nBlockAlign=8917, wBitsPerSample=16, cbSize=10] 0046:trace:msacm:acmStreamOpen dst [wFormatTag=1, nChannels=2, nSamplesPerSec=44100, nAvgBytesPerSec=176400, nBlockAlign=4, wBitsPerSample=16, cbSize=0] ... 0046:trace:msacm:acmStreamOpen => (512) 0046:Ret msacm32.acmStreamOpen() retval=00000200 ret=3552b9c4 ... 0046:Call msacm32.acmStreamOpen(00000000,00000000,072f7d58,072f7ce8,00000000,00000000,00000000,00000005) ret=3552b9c4 0046:trace:msacm:acmStreamOpen ((nil), (nil), 0x72f7d58, 0x72f7ce8, (nil), 0, 0, 5) 0046:trace:msacm:acmStreamOpen src [wFormatTag=353, nChannels=2, nSamplesPerSec=44100, nAvgBytesPerSec=24002, nBlockAlign=8917, wBitsPerSample=16, cbSize=10] 0046:trace:msacm:acmStreamOpen dst [wFormatTag=1, nChannels=2, nSamplesPerSec=44100, nAvgBytesPerSec=176400, nBlockAlign=4, wBitsPerSample=16, cbSize=0] ... 0046:trace:msacm:acmStreamOpen => (512) 0046:Ret msacm32.acmStreamOpen() retval=00000200 ret=3552b9c4 ... <same sequence repeats over and over again as it tries different 'dst' formats> ... --- snip ---
Debugging:
--- snip --- Stopped on breakpoint 1 at 0x7a719ffe ACMWrapper_SetMediaType [/home/focht/projects/wine/mainline-src/dlls/quartz/acmwrapper.c:250] in quartz ACMWrapper_SetMediaType () at /home/focht/projects/wine/mainline-src/dlls/quartz/acmwrapper.c:250 250 {
Wine-dbg>bt Backtrace: =>0 0x7a719ffe ACMWrapper_SetMediaType(tf=0x72cb3f8, dir=PINDIR_INPUT, pmt=0x72cb0f8) [/home/focht/projects/wine/mainline-src/dlls/quartz/acmwrapper.c:250] in quartz (0x0989ee28) 1 0x10af62da in qasf (+0x62d9) (0x0989ee4c) 2 0x10af63d7 in qasf (+0x63d6) (0x0989ee74) 3 0x10af64be in qasf (+0x64bd) (0x0989eea0) 4 0x10af82b7 in qasf (+0x82b6) (0x0989eeb8) 5 0x10afe2af in qasf (+0xe2ae) (0x0989eed8) 6 0x7a72ee32 FilterGraph2_Connect+0xfff(iface=<couldn't compute location>, ppinOut=<couldn't compute location>, ppinIn=<couldn't compute location>) [/home/focht/projects/wine/mainline-build-x86/dlls/quartz/../../include/strmif.h:1046] in quartz (0x0989f308) 7 0x10030765 in microsoft.xna.framework (+0x30764) (0x0989f334) 8 0x100307c8 in microsoft.xna.framework (+0x307c7) (0x0989f354) 9 0x1002e511 in microsoft.xna.framework (+0x2e510) (0x0989f370) 10 0x1002ea0b in microsoft.xna.framework (+0x2ea0a) (0x0989f590) 11 0x1002eb2e in microsoft.xna.framework (+0x2eb2d) (0x0989f5a8) 12 0x1002eba3 in microsoft.xna.framework (+0x2eba2) (0x0989f5c0) 13 0x1002ed3e in microsoft.xna.framework (+0x2ed3d) (0x0989f5e0) 14 0x1002ee0e in microsoft.xna.framework (+0x2ee0d) (0x0989f600) 15 0x1002da63 in microsoft.xna.framework (+0x2da62) (0x0989f610) 16 0x09af74ca (0x0989f67c) 17 0x09af7313 (0x0989f6dc) 18 0x793d7a7b in mscorlib.ni (+0x317a7a) (0x0105cfb4) 19 0x03940398 in system.ni (+0x6c0397) (0x03910399) ...
Wine-dbg>bt
Backtrace: =>0 0x7a72ee3e FilterGraph2_Connect+0x100c(iface=<couldn't compute location>, ppinOut=<couldn't compute location>, ppinIn=<couldn't compute location>) [/home/focht/projects/wine/mainline-src/dlls/quartz/filtergraph.c:1116] in quartz (0x0989f308) 1 0x10030765 in microsoft.xna.framework (+0x30764) (0x0989f334) 2 0x100307c8 in microsoft.xna.framework (+0x307c7) (0x0989f354) 3 0x1002e511 in microsoft.xna.framework (+0x2e510) (0x0989f370) 4 0x1002ea0b in microsoft.xna.framework (+0x2ea0a) (0x0989f590) 5 0x1002eb2e in microsoft.xna.framework (+0x2eb2d) (0x0989f5a8) 6 0x1002eba3 in microsoft.xna.framework (+0x2eba2) (0x0989f5c0) 7 0x1002ed3e in microsoft.xna.framework (+0x2ed3d) (0x0989f5e0) 8 0x1002ee0e in microsoft.xna.framework (+0x2ee0d) (0x0989f600) 9 0x1002da63 in microsoft.xna.framework (+0x2da62) (0x0989f610) 10 0x09af74ca (0x0989f67c) 11 0x09af7313 (0x0989f6dc) 12 0x793d7a7b in mscorlib.ni (+0x317a7a) (0x0105cfb4) 13 0x03940398 in system.ni (+0x6c0397) (0x03910399)
Wine-dbg> 0x7a72ee3e FilterGraph2_Connect+0x100c [/home/focht/projects/wine/mainline-src/dlls/quartz/filtergraph.c:1116] in quartz: movl $0x7a7ff658,%eax 1116 TRACE("Cannot connect to filter (%x), trying next one\n", hr);
Wine-dbg>p hr 0x80040207 --- snip ---
0x80040207 -> VFW_E_NO_ACCEPTABLE_TYPES
That's the HRESULT directly passed to XNA Media class unmanaged/managed code wrappers and it doesn't like it.
You need to translate/pass 0x80040217 -> VFW_E_CANNOT_CONNECT here which makes more sense if you think about it.
https://msdn.microsoft.com/en-us/library/windows/desktop/dd390088(v=vs.85).a...
Source: https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/quartz/filtergraph.c#...
--- snip --- 894 /*** IGraphBuilder methods ***/ 895 static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut, IPin *ppinIn) 896 { 897 IFilterGraphImpl *This = impl_from_IFilterGraph2(iface); ... 913 914 TRACE("(%p/%p)->(%p, %p)\n", This, iface, ppinOut, ppinIn); 915 916 if(!ppinOut || !ppinIn) 917 return E_POINTER; ... 1010 /* Try to find a suitable filter that can connect to the pin to render */ 1011 tab[0] = mt->majortype; 1012 tab[1] = mt->subtype; 1013 hr = IFilterMapper2_EnumMatchingFilters(pFilterMapper2, &pEnumMoniker, 0, FALSE, MERIT_UNLIKELY, TRUE, 1, tab, NULL, NULL, FALSE, FALSE, 0, NULL, NULL, NULL); 1014 if (FAILED(hr)) { 1015 WARN("Unable to enum filters (%x)\n", hr); 1016 goto out; 1017 } 1018 1019 hr = VFW_E_CANNOT_RENDER; 1020 while(IEnumMoniker_Next(pEnumMoniker, 1, &pMoniker, &nb) == S_OK) 1021 { 1022 VARIANT var; 1023 GUID clsid; 1024 IPin** ppins = NULL; 1025 IPin* ppinfilter = NULL; 1026 IBaseFilter* pfilter = NULL; 1027 IAMGraphBuilderCallback *callback = NULL; 1028 1029 hr = GetFilterInfo(pMoniker, &var); 1030 if (FAILED(hr)) { 1031 WARN("Unable to retrieve filter info (%x)\n", hr); 1032 goto error; 1033 } ... 1086 hr = IFilterGraph2_AddFilter(iface, pfilter, V_BSTR(&var)); 1087 if (FAILED(hr)) { 1088 WARN("Unable to add filter (%x)\n", hr); 1089 IBaseFilter_Release(pfilter); 1090 pfilter = NULL; 1091 goto error; 1092 } 1093 1094 VariantClear(&var); 1095 1096 hr = IBaseFilter_EnumPins(pfilter, &penumpins); 1097 if (FAILED(hr)) { 1098 WARN("Enumpins (%x)\n", hr); 1099 goto error; 1100 } 1101 1102 hr = IEnumPins_Next(penumpins, 1, &ppinfilter, &pin); 1103 IEnumPins_Release(penumpins); 1104 1105 if (FAILED(hr)) { 1106 WARN("Obtaining next pin: (%x)\n", hr); 1107 goto error; 1108 } 1109 if (pin == 0) { 1110 WARN("Cannot use this filter: no pins\n"); 1111 goto error; 1112 } 1113 1114 hr = IPin_Connect(ppinOut, ppinfilter, NULL); 1115 if (FAILED(hr)) { 1116 TRACE("Cannot connect to filter (%x), trying next one\n", hr); 1117 goto error; 1118 } 1119 TRACE("Successfully connected to filter, follow chain...\n"); ... 1170 error: 1171 VariantClear(&var); 1172 if (ppinfilter) IPin_Release(ppinfilter); 1173 if (pfilter) { 1174 IFilterGraph2_RemoveFilter(iface, pfilter); 1175 IBaseFilter_Release(pfilter); 1176 } 1177 while (++i < nb) IPin_Release(ppins[i]); 1178 CoTaskMemFree(ppins); 1179 } 1180 1181 IEnumMoniker_Release(pEnumMoniker); 1182 1183 out: 1184 if (pFilterMapper2) 1185 IFilterMapper2_Release(pFilterMapper2); 1186 if (penummt) 1187 IEnumMediaTypes_Release(penummt); 1188 if (mt) 1189 DeleteMediaType(mt); 1190 --This->recursioncount; 1191 LeaveCriticalSection(&This->cs); 1192 TRACE("--> %08x\n", hr); 1193 return SUCCEEDED(hr) ? S_OK : hr; 1194 } --- snip ---
NOTE: There is another bug of this kind in 'quartz' component which I will report/explain separately. After that one is fixed the intro crash with builtin 'quartz' is gone.
$ sha1sum ARES_Demo_setup.exe 042abbabd5f6b1bbe7418acba7c4cdd9d9df34f6 ARES_Demo_setup.exe
$ du -sh ARES_Demo_setup.exe 118M ARES_Demo_setup.exe
$ wine --version wine-3.11
Regards