CefSharp.WinForms 错误(GPU 进程意外退出:exit_code=-532462766)
我是第一次设置 CefSharp。我已经安装了 NuGet CefSharp.WinForms 版本 99.2.90。我已经在 x64 和 x86 版本中运行了它。 x64 引发了 DLL 错误,这表明它应该在 x86 中构建。 我尝试了很多在网上找到的不同方法,但简单地启动 CefSharp 就会引发错误。
运行 chromeBrowser = new ChromiumWebBrowser("www.google.com");导致以下错误:
[0315/133306.821:ERROR:gpu_process_host.cc(972)] GPU process exited unexpectedly: exit_code=-532462766
[0315/133306.821:WARNING:gpu_process_host.cc(1277)] The GPU process has crashed 6 time(s)
[0315/133306.821:FATAL:gpu_data_manager_impl_private.cc(447)] GPU process isn't usable. Goodbye.
The program '[18264] CefSharp.exe' has exited with code 1073741855 (0x4000001f).
表单代码:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using CefSharp.WinForms;
using CefSharp;
using System.Threading;
using System.IO;
using System.Diagnostics;
using CefSharp.DevTools.IO;
namespace TemarkNamespace
{
public partial class CefSharpController : Form
{
private ChromiumWebBrowser chromeBrowser;
public CefSharpController()
{
InitializeComponent();
chromeBrowser = new ChromiumWebBrowser("www.google.com");
}
private void FormClosed(object sender, FormClosedEventArgs e)
{
Cef.Shutdown();
}
}
}
事件查看器错误:
Application: CefSharp.BrowserSubprocess.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.BadImageFormatException
at CefSharp.BrowserSubprocess.Program.Main(System.String[])
I'm getting CefSharp setup for the first time. I've installed the NuGet CefSharp.WinForms version 99.2.90. I've ran it in both build x64 and x86. x64 threw a DLL error which shows me it should be built in x86.
I've tried quite a few different methods I've found online but simply starting CefSharp throws an error.
running chromeBrowser = new ChromiumWebBrowser("www.google.com"); results in the below error:
[0315/133306.821:ERROR:gpu_process_host.cc(972)] GPU process exited unexpectedly: exit_code=-532462766
[0315/133306.821:WARNING:gpu_process_host.cc(1277)] The GPU process has crashed 6 time(s)
[0315/133306.821:FATAL:gpu_data_manager_impl_private.cc(447)] GPU process isn't usable. Goodbye.
The program '[18264] CefSharp.exe' has exited with code 1073741855 (0x4000001f).
Form Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using CefSharp.WinForms;
using CefSharp;
using System.Threading;
using System.IO;
using System.Diagnostics;
using CefSharp.DevTools.IO;
namespace TemarkNamespace
{
public partial class CefSharpController : Form
{
private ChromiumWebBrowser chromeBrowser;
public CefSharpController()
{
InitializeComponent();
chromeBrowser = new ChromiumWebBrowser("www.google.com");
}
private void FormClosed(object sender, FormClosedEventArgs e)
{
Cef.Shutdown();
}
}
}
Event Viewer error:
Application: CefSharp.BrowserSubprocess.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.BadImageFormatException
at CefSharp.BrowserSubprocess.Program.Main(System.String[])
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我错过了说明 https://github.com/ cefsharp/CefSharp/blob/cefsharp/99/NuGet/Readme.txt#L13
我创建了 app.manifest 文件并且效果很好。感谢阿迈特兰的帮助!
I missed the instructions https://github.com/cefsharp/CefSharp/blob/cefsharp/99/NuGet/Readme.txt#L13
I created the app.manifest file and it worked great. Thanks for the help amaitland!
当系统 (Windows 10) 上存在 Sophos Endpoint 保护并且启用了应用程序控制时,我们遇到了同样的问题。在事件中我们可以看到 CEFLib 已被禁用。我们花了一段时间才弄清楚...
We had the same issue When Sophos Endpoint protection was present on the system (Windows 10), and the Application Control was enabled. I the Events we could see that CEFLib was disabled. Took a while we figured out...