https://bugs.winehq.org/show_bug.cgi?id=57119
Bug ID: 57119 Summary: WPF app (VOCALOID) fails to initialize Markup Product: Wine Version: 9.14 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: gauvain@govanify.com Distribution: ---
Created attachment 77011 --> https://bugs.winehq.org/attachment.cgi?id=77011 Crash log of VOCALOID 6
When trying to start VOCALOID 6, an exception is thrown on startup:
Exception Info: System.Windows.Markup.XamlParseException: Set property 'System.Windows.Controls.Primitives.ButtonBase.Command' threw an exception.
Trying to disable hardware acceleration through registry does not change the behaviour of the application, and trying to prevent library loading to prevent HW acceleration only leads to different kinds of crashes.
This exact bug was already present in VOCALOID 5 (so at least since 2018), and probably affects other WPF apps as well.
It is required to install dotnet48, dotnet60 and d3dcompiler_47 to get this far, otherwise the application crashes much earlier on within a clrcore->kernelbase call stack.
https://bugs.winehq.org/show_bug.cgi?id=57119
--- Comment #1 from Gauvain Roussel-Tarbouriech gauvain@govanify.com --- Decompiling a bit more the application, the relevant logic that fails here is:
public void InitializeComponent() { if (!_contentLoaded) { _contentLoaded = true; Uri resourceLocator = new Uri("/VOCALOID6;component/mainwindow/mainwindow.xaml", UriKind.Relative); Application.LoadComponent(this, resourceLocator); } }
Where LoadComponent fails (the call stack goes a little bit deeper and calls a system xaml parser to initialize the UI but this isn't really relevant).
It seems to be fully a WPF bug, I can't find any unexpected issues within the application's logic itself.
The xaml can be found in VOCALOID6.DLL resources, which can be viewed using ILSpy.
https://bugs.winehq.org/show_bug.cgi?id=57119
--- Comment #2 from Gauvain Roussel-Tarbouriech gauvain@govanify.com --- I managed to fix the bug.
VOCALOID 6 ships with a customized version of System.Management.dll from dotnet.
This library specifically fails during a typeof() check here: https://github.com/dotnet/dotnet/blob/927ad5b54ec13615dfcb1e30f76f6708b61738...
Noping out those two checks and replacing the library with the patched one seems to do the trick, but as this code is shipped with .NET 6 by default it might be wise to look into it before other apps break on this check...
https://bugs.winehq.org/show_bug.cgi?id=57119
--- Comment #3 from Hans Leidekker hans@meelstraat.net --- Can you attach a WINEDEBUG=+wmiutils,+wbemprox trace from unpatched System.Management.dll?
https://bugs.winehq.org/show_bug.cgi?id=57119
--- Comment #4 from Gauvain Roussel-Tarbouriech gauvain@govanify.com --- Created attachment 77016 --> https://bugs.winehq.org/attachment.cgi?id=77016 Crash log with WINEDEBUG=+wmiutils,+wbemprox
https://bugs.winehq.org/show_bug.cgi?id=57119
--- Comment #5 from Gauvain Roussel-Tarbouriech gauvain@govanify.com --- 011c:trace:wmiutils:path_GetInfo 00006DE70DBEF630, 0, 00007FFFFE27B0B8 011c:fixme:wmiutils:path_GetInfo some flags are not implemented
This might indeed be our culprit!
https://bugs.winehq.org/show_bug.cgi?id=57119
--- Comment #6 from Hans Leidekker hans@meelstraat.net --- Created attachment 77017 --> https://bugs.winehq.org/attachment.cgi?id=77017 patch
Does this patch help?
https://bugs.winehq.org/show_bug.cgi?id=57119
--- Comment #7 from Gauvain Roussel-Tarbouriech gauvain@govanify.com --- Unfortunately not, but the exception is different this time around (or rather lack thereof)
https://bugs.winehq.org/show_bug.cgi?id=57119
--- Comment #8 from Gauvain Roussel-Tarbouriech gauvain@govanify.com --- Created attachment 77018 --> https://bugs.winehq.org/attachment.cgi?id=77018 Crash log after patch applied
https://bugs.winehq.org/show_bug.cgi?id=57119
--- Comment #9 from Gauvain Roussel-Tarbouriech gauvain@govanify.com --- After adding a trace in wql_parse I was able to see where wine errors out.
pre-patch (patched): 0024:trace:wbemprox:parse_query wql_parse input L"SELECT * FROM Win32_LogicalDisk WHERE DeviceId="C:"" 0024:trace:wbemprox:find_table returning 00006FFFFAB51BC0 0024:trace:wbemprox:parse_query wql_parse returned 0
post-patch (unpatched): 0024:trace:wbemprox:parse_query wql_parse input L"SELECT * FROM Win32_LogicalDisk WHERE ="C:"" 0024:err:wbemprox:wql_error syntax error, unexpected TK_EQ 0024:trace:wbemprox:parse_query wql_parse returned 1
Notice the DeviceId missing in the second instance
https://bugs.winehq.org/show_bug.cgi?id=57119
Hans Leidekker hans@meelstraat.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #77017|0 |1 is obsolete| |
--- Comment #10 from Hans Leidekker hans@meelstraat.net --- Created attachment 77019 --> https://bugs.winehq.org/attachment.cgi?id=77019 patch
That patch fixes GetInfo() but it now it also needs GetText() to handle a path with implied key. Can you try this patch instead of the previous one?
https://bugs.winehq.org/show_bug.cgi?id=57119
--- Comment #11 from Gauvain Roussel-Tarbouriech gauvain@govanify.com --- The patch works!
Thanks a lot for the work on the patch, it would have taken me so much longer than you just to get familiar with WMI...
https://bugs.winehq.org/show_bug.cgi?id=57119
Hans Leidekker hans@meelstraat.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED Fixed by SHA1| |fe8a54c8a8bd44d40faa5d97458 | |51f1fe03786f0
--- Comment #12 from Hans Leidekker hans@meelstraat.net --- Fixed with fe8a54c8a8bd44d40faa5d9745851f1fe03786f0. Thanks for the bug report!
https://bugs.winehq.org/show_bug.cgi?id=57119
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 9.17.