https://bugs.winehq.org/show_bug.cgi?id=56571
Bug ID: 56571 Summary: osu! quits with InvalidCastException when using wine-mono Product: Wine Version: 9.6 Hardware: x86-64 URL: https://m1.ppy.sh/r/osu!install.exe OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: mscoree Assignee: wine-bugs@winehq.org Reporter: aidas957@gmail.com Distribution: ArchLinux
Created attachment 76324 --> https://bugs.winehq.org/attachment.cgi?id=76324 Snippet of Wine Mono log with the cast exception
Hello,
So osu!(stable) quits after the osu! logo (with InvalidCastException being shown in the terminal when using the WINE_MONO_TRACE=frog variable) when running the game with wine-mono installed (instead of .NET)
Installing .NET with the dotnet45 winetricks verb allows the game to run again (like with bug 50111)
I think this bug may be a continuation of https://bugs.winehq.org/show_bug.cgi?id=50111 (because I see marshalling-related functions before the exception gets thrown in the Mono log)
I'll attach a snippet of the relay-level Wine Mono log that has the exception stuff (the full log is likely too big even after compression)
I tried editing the RuntimeAssembly class to public in dnSpy for the Wine Mono mscorlib.dll (but I got an EXCEPTION_ILLEGAL_INSTRUCTION exception instead with no obvious explanation for that in the Wine Mono log which of course prevented the game from starting)
https://bugs.winehq.org/show_bug.cgi?id=56571
Aida JonikienÄ— aidas957@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet, download
https://bugs.winehq.org/show_bug.cgi?id=56571
--- Comment #1 from Esme Povirk madewokherd@gmail.com --- Exception thrown by this COM method: https://learn.microsoft.com/en-us/dotnet/api/system._appdomain.getassemblies...
It seems we expect to return a safearray of IDispatch. This should work in theory because the Assembly class implements _Assembly which is a dual interface. But, maybe Mono is tripped up by not having a class interface and having to select _Assembly instead.
https://bugs.winehq.org/show_bug.cgi?id=56571
--- Comment #2 from Esme Povirk madewokherd@gmail.com --- Application expects VT_UNKNOWN.
https://bugs.winehq.org/show_bug.cgi?id=56571
--- Comment #3 from Esme Povirk madewokherd@gmail.com --- It seems that in the case of no class interface, a SafeArray should be marshaled as VT_UNKNOWN. This gets it further, but then it fails on FieldInfo class not having the proper attributes and interface implementation to return a VT_UNKNOWN array of _FieldInfo and then on Mono's _FieldInfo having its methods in the wrong order.
Then it does a lot of examination of Types and Fields, and it crashes by branching to a NULL pointer for some reason.
https://bugs.winehq.org/show_bug.cgi?id=56571
--- Comment #4 from Esme Povirk madewokherd@gmail.com --- I've stashed the changes so far here: https://gitlab.winehq.org/madewokherd/mono/-/commits/bug56571
https://bugs.winehq.org/show_bug.cgi?id=56571
--- Comment #5 from Esme Povirk madewokherd@gmail.com --- My guess is that it's looking for some internal fields and fails when it doesn't find them. Anyway, I don't know what it wants at this point, and I can't find any corresponding code on ppy Github. So without help from the developer, I think that further work is impractical.
I'll still clean up what I have so far for inclusion in Wine Mono.
https://bugs.winehq.org/show_bug.cgi?id=56571
--- Comment #6 from Esme Povirk madewokherd@gmail.com --- So far, I haven't been able to write proper tests for the behavior osu! expects. A test class with ClassInterfaceType.None still gets converted to VT_DISPATCH. Maybe there's something subtle about the introspection classes I'm missing.
https://bugs.winehq.org/show_bug.cgi?id=56571
Esme Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |madewokherd@gmail.com