https://bugs.winehq.org/show_bug.cgi?id=49740
Bug ID: 49740 Summary: Microsoft Flight Simulator crash after a black screen Product: Wine Version: 5.11 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: juliocampagnolo@gmail.com Distribution: ---
Created attachment 68039 --> https://bugs.winehq.org/attachment.cgi?id=68039 Steam proton log
Microsoft Flight Simulator 2020 present some problems on launching. Workarounding #49739 by copying netutils.dll and srvcli.dll from Windows 10, the program is able to create a black screen and crashes right after that. Discussing this in a specific proton Github issue ( https://github.com/ValveSoftware/Proton/issues/4134 ) that appear to occur due to missing UWP APIs inplementation: SpeechSynthesizer and Package. According Proton logs:
29536.066:00b4:00b8:fixme:combase:RoGetActivationFactory (L"Windows.ApplicationModel.Package", {4e534bdf-2960-4878-97a4-9624deb72f2d}, 000000000051F9F8): semi-stub 29536.070:00b4:00b8:err:combase:RoGetActivationFactory Failed to find library for L"Windows.ApplicationModel.Package"
and
002c:fixme:combase:RoGetActivationFactory (L"Windows.Media.SpeechSynthesis.SpeechSynthesizer", {7d526ecc-7533-4c3f-85be-888c2baeebdc}, 000000000051D1E0): semi-stub 002c:err:combase:RoGetActivationFactory Failed to find library for L"Windows.Media.SpeechSynthesis.SpeechSynthesizer"
Also, in attachment, there is the full log.
https://bugs.winehq.org/show_bug.cgi?id=49740
Thomas Barbier thomas.barbier@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |thomas.barbier@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=49740
Anya maniikarabera@protonmail.ch changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |maniikarabera@protonmail.ch
https://bugs.winehq.org/show_bug.cgi?id=49740
brunoaiss+winebugs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |brunoaiss+winebugs@gmail.co | |m
https://bugs.winehq.org/show_bug.cgi?id=49740
nodo@kahanamura.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nodo@kahanamura.com
https://bugs.winehq.org/show_bug.cgi?id=49740
Rémi Bernon rbernon@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rbernon@codeweavers.com
--- Comment #1 from Rémi Bernon rbernon@codeweavers.com --- The initial crash is caused by partial mfplat implementation. It is possible to go past it by using the -FastLaunch argument.
https://bugs.winehq.org/show_bug.cgi?id=49740
--- Comment #2 from Julio Campagnolo juliocampagnolo@gmail.com --- Hello Rémi, this crash is basically the same if using -FastLaunch option. I couldn't find any important difference using FastLaunch or not.
https://bugs.winehq.org/show_bug.cgi?id=49740
--- Comment #3 from Rémi Bernon rbernon@codeweavers.com --- Created attachment 68066 --> https://bugs.winehq.org/attachment.cgi?id=68066 bcrypt hacky workaround for XAL authentication failure
Alright, indeed I probably missed this ugly hack attached.
IIRC I could then go further with that launch parameter, until missing windows.media.speechsynthesis.dll becomes a problem.
https://bugs.winehq.org/show_bug.cgi?id=49740
--- Comment #4 from Rémi Bernon rbernon@codeweavers.com --- Created attachment 68067 --> https://bugs.winehq.org/attachment.cgi?id=68067 windows.media.speech.dll stub standalone patch
And here's a stub implementation of the missing windows.media.speech.dll. It could be better implemented using the widl patches I'm trying to upstream, but this one should be standalone.
This should allow to play the game, although online mode doesn't work.
https://bugs.winehq.org/show_bug.cgi?id=49740
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 CC| |leslie_alistair@hotmail.com Status|UNCONFIRMED |STAGED Staged patchset| |https://github.com/wine-sta | |ging/wine-staging/tree/mast | |er/patches/windows.media.sp | |eech.dll
https://bugs.winehq.org/show_bug.cgi?id=49740
--- Comment #5 from nodo@kahanamura.com --- Just to verify - online mode as in playing with other players, online mode as in inability to download map data from Bing Maps, or a total inability for the game to communicate with the internet?
https://bugs.winehq.org/show_bug.cgi?id=49740
--- Comment #6 from Rémi Bernon rbernon@codeweavers.com --- At least the ability to download map data from Bing. After loading a flight the game complains that there was a connectivity issue and that online mode has been switched off.
https://bugs.winehq.org/show_bug.cgi?id=49740
--- Comment #7 from Julio Campagnolo juliocampagnolo@gmail.com --- Bcrypt hack is not needed for XBox authentication (I think). I could login without this patch. The UWP patch with the bug #49739 patches, already in staging, could make the game work. More testing is needed due to internet complains and features, like the SpeechSynthesis itself that was not tested in my preliminary tests.
https://bugs.winehq.org/show_bug.cgi?id=49740
--- Comment #8 from Rémi Bernon rbernon@codeweavers.com --- Yes that's what I figured after all, I probably took the intro video crash to be related to the XAL failure message although it was unrelated. Anyway, I sent some bcrypt patches that should fix the issue upstream nonetheless.
The online mode issue most likely comes from missing FreeThreadedXMLHTTP60 class / IXMLHTTPRequest2 interface.
https://bugs.winehq.org/show_bug.cgi?id=49740
--- Comment #9 from Rémi Bernon rbernon@codeweavers.com --- Created attachment 68119 --> https://bugs.winehq.org/attachment.cgi?id=68119 CreateFile2 patch
I finally got the online mode working, so I'm attaching the required patches as I know some people are eager to try.
The deadlock was caused by incorrect CreateFile2 flags handling which caused the files to be opened for synchronous I/O when the game requested overlapped I/O.
https://bugs.winehq.org/show_bug.cgi?id=49740
--- Comment #10 from Rémi Bernon rbernon@codeweavers.com --- Created attachment 68120 --> https://bugs.winehq.org/attachment.cgi?id=68120 CoCreateInstanceFromApp stub
Then the game also tries to create some imaging classes through an unimplemented entry point, which I quickly hacked here (maybe incorrectly but it works so far).
https://bugs.winehq.org/show_bug.cgi?id=49740
--- Comment #11 from Rémi Bernon rbernon@codeweavers.com --- Created attachment 68121 --> https://bugs.winehq.org/attachment.cgi?id=68121 FreeThreadedXMLHTTP60 stub
And the msxml6 FreeThreadedXMLHTTP60 that makes online mode work (with the previous patches applied it should work fine).
https://bugs.winehq.org/show_bug.cgi?id=49740
sutesuteneter+winebugs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sutesuteneter+winebugs@gmai | |l.com
--- Comment #12 from sutesuteneter+winebugs@gmail.com --- Created attachment 68187 --> https://bugs.winehq.org/attachment.cgi?id=68187 MSFS2020 Backtrace
Hi, Although some people are reporting that Microsoft Flight Simulator is working with very latest wine-staging changes, I still cannot reproduce it's working. I tried both proton-tkg(custom build of Valve's Proton with staging wine) and Steam on wine-staging but the game launcher crashes every time. Maybe I'm building staging wine in wrong way, but I can't decide just by looking at logs.
https://bugs.winehq.org/show_bug.cgi?id=49740
--- Comment #13 from Rémi Bernon rbernon@codeweavers.com --- You probably need to pass -FastLaunch flag to the game command-line. Otherwise it requires some unimplemented mfplat code to play the introduction videos.
https://bugs.winehq.org/show_bug.cgi?id=49740
--- Comment #14 from sutesuteneter+winebugs@gmail.com --- Rémi, Thank you for your indication, and I'm so sorry that I forgot to add that I've already passed the launch option in steam. The attached log was logged when '-FastLaunch' was set to launch option.
https://bugs.winehq.org/show_bug.cgi?id=49740
--- Comment #15 from Rémi Bernon rbernon@codeweavers.com --- Alright, then I'm not sure what's missing. I know there could be crashes when gamepads are plugged in, but IIRC all the related (wbemprox) patches are in upstream wine already.
The log isn't very informative as it only contains the crash dump, which happens in the game code. It may be more interesting to see if there's any fixme or warnings before that (using WINEDEBUG=+pid,+tid,warn+all,fixme+all,err+all,+debugstr for instance).
Anyway it appears that the latest game update made windows.globalization.dll mandatory.
https://bugs.winehq.org/show_bug.cgi?id=49740
--- Comment #16 from Rémi Bernon rbernon@codeweavers.com --- Created attachment 68189 --> https://bugs.winehq.org/attachment.cgi?id=68189 windows.globalization.dll stub standalone patch
So here's a stub for this library too (for Wine 5.17). It may conflict with windows.gaming.dll stub, but only because it's adding lines next to each other.
https://bugs.winehq.org/show_bug.cgi?id=49740
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|STAGED |RESOLVED Fixed by SHA1| |6c7db4ba5e1bf0eb78f026e8d94 | |03d83a1852e22 Resolution|--- |FIXED
--- Comment #17 from Gijs Vermeulen gijsvrm@gmail.com --- This bug has turned into a meta-bug for MSFS, which we should avoid in the future.
The relevant windows.* dll patches were upstreamed, so I'm going to go ahead and mark this fixed.
New bugs should be filed for the remaining problems, given that such reports don't already exist.
https://bugs.winehq.org/show_bug.cgi?id=49740
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #18 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.6.