https://bugs.winehq.org/show_bug.cgi?id=38756
Bug ID: 38756 Summary: FutureMark SystemInformation diagnostics (.NET 4.0 app) crashes when clicking 'connect' (COM support for 'new' moniker and 'BIND_OPTS3' missing) Product: Wine Version: 1.7.45 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
split off from bug 27185 which is about Wine-Mono.
The installer installs the following prerequisites on its own:
* DirectX Jun 2010 * Microsoft .NET Framework 4 Client Profile 4.0.30319 * Microsoft Visual C++ 2010 x86 Redistributable 10.0.40219
.NET Framework 4.0 install only works right away if Wine-Mono has been removed prior the install or Wine was built without Mono support as I do.
The first problem after installation is bug 15670
--- snip --- Unhandled Exception: System.Windows.Markup.XamlParseException: The invocation of the constructor on type 'Futuremark.PCMark7.PCMark7Gui.WelcomeWindow' that matches the specified binding constraints threw an exception. ---> System.IO.IsolatedStorage.IsolatedStorageException: Unable to create the store directory. (Exception from HRESULT: 0x80131468) at System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope scope, StringHandleOnStack retRootDir) at System.IO.IsolatedStorage.IsolatedStorageFile.InitGlobalsNonRoamingUser(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.GetRootDir(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.GetGlobalFileIOPerm(IsolatedStorageScope scope) at System.IO.IsolatedStorage.IsolatedStorageFile.Init(IsolatedStorageScope scope) at Futuremark.BenchmarkUtility.Identifier.set_Key(String value) at Futuremark.PCMark7.PCMarkEssence.LicenseManager.ValidateKey(String key, Boolean online) at Futuremark.PCMark7.PCMarkEssence.LicenseManager..ctor(IOnlineMessenger onlineMessenger) at Futuremark.PCMark7.PCMarkEssence.UIController..ctor() at Futuremark.PCMark7.PCMark7Gui.WelcomeWindow..ctor() --- End of inner exception stack trace --- --- snip ---
Next problem:
--- snip --- 002d:Call user32.MessageBoxW(00000000,0106f914 L"Initializing Futuremark SystemInfo failed.\nPlease verify that version 4.0 or newer is installed properly.",0106fea8 L"PCMark 7 - SystemInfo failure",00000000) ret=0545b07f --- snip ---
http://community.futuremark.com/forum/showthread.php?181303-Problem-futurema...
Looks like a separate (COM) service component.
Trying to use the diagnosis tool which ought to connect to the service also fails:
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/Futuremark/Futuremark SystemInfo
$ wine ./FMSIDiag.exe ... fixme:advapi:ReportEventW (0xcafe4242,0x0001,0x0000,0x00000401,(nil),0x0001,0x00000000,0x33bcac,(nil)): stub err:eventlog:ReportEventW L"Application: FMSIDiag.exe\nFramework Version: v4.0.30319\nDescription: The application requested process termination through System.Environment.FailFast(string message).\nMessage: Unrecoverable system error.\nStack:\n at System.Environment.FailFast(System.String)\n at MS.Internal.Invariant.FailFa"... fixme:advapi:DeregisterEventSource (0xcafe4242) stub --- snip ---
-> bug 32323 ('winetricks -q corefonts')
Running it again:
--- snip --- ... Unhandled Exception: FMSIDiag.SystemInfoException: SystemInfo initialization failed. at FMSIDiag.SystemInfo2.Init(Boolean tryElevate) at FMSIDiag.SystemInfo2.Init() at FMSIDiag.Core.Connect() at FMSIDiag.MainWindow.buttonBasicConnect_Click(Object sender, RoutedEventArgs e) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e) at System.Windows.Controls.Primitives.ButtonBase.OnClick() at System.Windows.Controls.Button.OnClick() --- snip ---
First-chance exception caught with managed debugger:
--- snip --- Child SP IP Call Site
0559ce14 7b8455e1 [HelperMethodFrame: 0559ce14] 0559ce64 05039207 DomainBoundILStubClass.IL_STUB_PInvoke(System.String, BIND_OPTS3 ByRef, System.Guid) 0559ce68 0503904c [InlinedCallFrame: 0559ce68] FMSIDiag.UACManager.CoGetObject(System.String, BIND_OPTS3 ByRef, System.Guid) 0559cf38 0503904c FMSIDiag.UACManager.LaunchCOMObject(System.Guid, System.Guid) 0559cfac 05038dbd FMSIDiag.SystemInfo2.ThreadInit(Boolean) ... --- snip ---
Relevant part of trace log:
--- snip --- 0040:Call ole32.CoGetObject(00dce0ac L"new:{f9c82199-b002-41b4-8b00-0f1eca89425f}",054bce6c,054bcee8,054bce64) ret=053a0e78 ... 0040:Ret ole32.CoGetObject() retval=80070057 ret=053a0e78 ... 0040:trace:seh:raise_exception code=e0434352 flags=1 addr=0x7b8455e1 ip=7b8455e1 tid=0040 0040:trace:seh:raise_exception info[0]=80070057 0040:trace:seh:raise_exception info[1]=00000000 0040:trace:seh:raise_exception info[2]=00000000 0040:trace:seh:raise_exception info[3]=00000000 0040:trace:seh:raise_exception info[4]=79140000 0040:trace:seh:raise_exception eax=7b83247d ebx=00000005 ecx=00000014 edx=054bcc44 esi=054bcce4 edi=054bccb0 0040:trace:seh:raise_exception ebp=054bcc88 esp=054bcc24 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00200283 0040:trace:seh:call_vectored_handlers calling handler at 0x791f5a7c code=e0434352 flags=1 ... --- snip ---
Relevant .NET code:
--- snip --- // FMSIDiag.SystemInfo2 private void ThreadInit(bool tryElevate) { if (this.m_FMSI != null) { return; } this.m_FMSI = UACManager.LaunchCOMObject( new Guid("F9C82199-B002-41B4-8B00-0F1ECA89425F"), new Guid("93382A45-8441-4A42-BE09-95C7D0550B94")); if (this.m_FMSI != null) { this.m_FuturemarkSystemInfo = (IFuturemarkSystemInfo2)this.m_FMSI; this.m_FuturemarkSystemInfoVersion = (IFuturemarkSystemInfoVersion)this.m_FMSI; this.m_FuturemarkSystemInfoMultiGPU = (IFuturemarkSystemInfoMultiGPU)this.m_FMSI; this.m_FuturemarkSystemInfoQuery = (IFuturemarkSystemInfoQuery)this.m_FMSI; this.m_FuturemarkSystemInfoLegacyQuery = (IFuturemarkSystemInfoLegacyQuery)this.m_FMSI; this.m_FuturemarkSystemInfoQueryStorage = (IFuturemarkSystemInfoQueryStorage)this.m_FMSI; this.m_FuturemarkSystemInfoMonitoring = (IFuturemarkSystemInfoMonitoring)this.m_FMSI; this.m_Initialized = true; } }
... // FMSIDiag.UACManager [return: MarshalAs(UnmanagedType.Interface)] public static object LaunchCOMObject(Guid Clsid, Guid InterfaceID) { string str = Clsid.ToString("B"); string pszName = "new:" + str; UACManager.BIND_OPTS3 bIND_OPTS = default(UACManager.BIND_OPTS3); bIND_OPTS.cbStruct = (uint)Marshal.SizeOf(bIND_OPTS); bIND_OPTS.hwnd = IntPtr.Zero; bIND_OPTS.dwClassContext = 4u; object result = null; try { result = UACManager.CoGetObject(pszName, ref bIND_OPTS, InterfaceID); } catch (Exception) { result = null; } return result; } --- snip ---
Registry entry of COM server:
--- snip --- REGEDIT4
[HKEY_CLASSES_ROOT\CLSID{F9C82199-B002-41B4-8B00-0F1ECA89425F}] @="Futuremark SystemInfo v2 Class" "AppID"="{1BF1C030-CE12-4A8A-A4E1-EDDCE7176799}" "LocalizedString"="@C:\Program Files\Futuremark\Futuremark SystemInfo\FMSISvc.exe,-101"
[HKEY_CLASSES_ROOT\CLSID{F9C82199-B002-41B4-8B00-0F1ECA89425F}\LocalService] @=""C:\Program Files\Futuremark\Futuremark SystemInfo\FMSISvc.exe""
[HKEY_CLASSES_ROOT\CLSID{F9C82199-B002-41B4-8B00-0F1ECA89425F}\ProgID] @="FuturemarkSystemInfo2.1"
[HKEY_CLASSES_ROOT\CLSID{F9C82199-B002-41B4-8B00-0F1ECA89425F}\Programmable]
[HKEY_CLASSES_ROOT\CLSID{F9C82199-B002-41B4-8B00-0F1ECA89425F}\TypeLib] @="{0E985ACA-E998-460F-B705-8436E606F78C}"
[HKEY_CLASSES_ROOT\CLSID{F9C82199-B002-41B4-8B00-0F1ECA89425F}\VersionIndependentProgID] @="FuturemarkSystemInfo2" --- snip ---
Article: http://chrison.net/UACElevationInManagedCodeStartingElevatedCOMComponents.as... ("UAC Elevation in Managed Code: Starting Elevated COM Components")
which is courtesy of: https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/5706957f-b96b-...
Although the app .NET class is called 'UACManager' the code seems to contradict this. The elevation moniker syntax is not used:
MSDN: https://msdn.microsoft.com/en-us/library/windows/desktop/ms679687%28v=vs.85%...
--- snip --- Elevation:Administrator!new:{guid} Elevation:Highest!new:{guid} --- snip ---
What's new is the use of the 'new' moniker though:
http://thrysoee.dk/InsideCOM+/ch11e.htm ("The New Moniker")
and BIND_OPTS3:
MSDN: https://msdn.microsoft.com/en-us/library/windows/desktop/aa746553%28v=vs.85%...
$ sha1sum PCMark_7_v104_installer.zip 1a13ea91439ae4d81a153ca777ecb74e42394015 PCMark_7_v104_installer.zip
$ du -sh PCMark_7_v104_installer.zip 304M PCMark_7_v104_installer.zip
$ wine --version wine-1.7.45
Regards