protonscr

6.3 is missing `UiaDisconnectProvider` function (fixed upstream)

wineclosed
ValveSoftware/wine#132 · opened 2021-12-06 by w-flo · updated 2022-02-16 · 4 comments · github
2 matching comments, n / p to jump
Ww-flo 2021-12-06 github

6.3 branch (experimental and released) is missing this function. It is needed for dotnet core and was fixed upstream in wine 6.18, bug 51729: https://bugs.winehq.org/show_bug.cgi?id=51729

The patch is https://source.winehq.org/git/wine.git/commitdiff/eac5cef24038f0194e58ed0004c4a162b4f3e9a4

I feel like this used to work earlier in 6.3 proton (I was using dotnet core software without issues), so it might be a regression related to recent additions to the uiautomationcore dll in proton-wine, or maybe something changed in the proprietary software I'm using.

Iivyl 2021-12-06 github

What's an example of affected game so we could test that a cherry-pick is all that's required?

Ww-flo 2021-12-06 github

"Zusi 3 - Aerosoft Edition" includes the "ZusiDisplay" application which is affected: https://store.steampowered.com/app/1040730/ZUSI_3__Aerosoft_Edition/

It can be a bit difficult to get running. I believe you need to manually install dotnet core (there's an installscript_netcore.vdf, but it only works if you rename it to installscript.vdf apparently), and you need the micross.ttf font, but I believe a replacement for that font is now in the Proton distribution (even though the font metrics are slightly off, so the ZusiDisplay settings menu has no visible buttons at the bottom).

The main application (Zusi) then has a menu entry to launch ZusiDisplay (in German: Konfiguration -> ZusiDisplay starten -> ZusiDisplay Grundmaske starten), which usually triggers the crash for me while closing the small loading screen window. It feels a bit racy though, like sometimes it works when starting it again directly after a crash. Just adding the UiaDisconnectProvider stub to Proton's 6.3 wine code, building the uiautomationcore.dll and putting it into the "dist/lib/wine" Proton directory works reliably for me so far (while building the dll from proton-6.3 branch unchanged and using that file will crash ZusiDisplay).

Something inside ZusiDisplay then apparently hides the useful exception shown in the upstream bug report and reports another exception instead (probably because the original exception is thrown inside a thread and the usual "show exception message from a thread" user interface is not available at this stage of the application initialization - see the "OnThreadException" method in the callstack), which is

Unhandled exception. System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at System.Collections.ArrayList.get_Item(Int32 index)
   at System.Windows.Forms.FormCollection.get_Item(Int32 index)
   at MMI.Program.Application_ThreadException(Object sender, ThreadExceptionEventArgs e)
   at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
   at System.Windows.Forms.Timer.TimerNativeWindow.OnThreadException(Exception e)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr 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 MMI.Program.Main(String[] args)
Ww-flo 2021-12-11 github

The steam game "Zusi 3 - Aerosoft Edition" has received an update a few days ago. The installscript for dotnet core seems to work now, so hopefully it's straight-forward to launch the affected ZusiDisplay application now through the Zusi menu. However this issue might still be difficult to reproduce since it looks like the expection is not thrown on the main thread, and it may be ignored sometimes thanks to lucky timing (?), and crashes the application in cases of unlucky timing (with the confusing exception message I posted above).

Ww-flo 2022-02-16 github

This is fixed in Proton 7, so a backport seems unnecessary now. I'm closing the issue.

Proton versions

Upstream links

DLLs