在 ubuntu 中使用 wine 运行 .Net core 6.0 应用程序时出错

在 ubuntu 中使用 wine 运行 .Net core 6.0 应用程序时出错

我们有一个基于 .net 框架的应用程序,它使用 REST API 与后端连接。当我们在 Ubuntu 20.04 上使用 Wine 运行此应用程序时,它运行良好。我们的要求是,我们需要先将这个基于 .net 框架的应用程序转换为 .net core 6,然后在 Ubuntu 上使用 Wine 运行。经过此转换后,当我们运行应用程序并尝试反序列化从 REST API 返回的 JSON 时,它会失败并出现以下错误

Fatal error. Internal CLR error. (0x80131506)
0204:fixme:advapi:RegisterEventSourceW ((null),L".NET Runtime"): stub
0204:fixme:advapi:ReportEventW (CAFE4242,0x0001,0x0000,0x000003ff,00000000,0x0001,0x00000000,003AD66C,00000000): stub
0204:err:eventlog:ReportEventW L"Application: APP.exe\nCoreCLR Version: 6.0.522.21309\n.NET Version: 6.0.5\nDescription: The process was terminated due to an internal error in the .NET Runtime at IP 0144D5A8 (01320000) with exit code 80131506.\n"
0204:fixme:advapi:DeregisterEventSource (CAFE4242) stub
wine: Call from 7BC29F80 to unimplemented function KERNEL32.dll.RaiseFailFastException, aborting
Unhandled exception. System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.

奇怪的是,这种行为是间歇性的。有时反序列化也会成功。我们也看到了 Newtonsoft.Json API 的相同行为

代码行如下:

value = (T)System.Text.Json.JsonSerializer.Deserialize(jsonString, typeof(T));

我们使用的是 Wine 7 版本。

感谢任何对此的帮助。

答案1

看起来你可能需要更新你的 wine 版本。

此错误已于最近(2022 年 5 月 6 日)得到解决:
https://bugs.winehq.org/show_bug.cgi?id=48718

致力于解决这个问题: https://source.winehq.org/git/wine.git/commitdiff/509877743efab802a9d84c8a2b05fdadeb122869

要解决此问题,你必须切换到开发者版本 7.10

相关内容