CefSharp.WinForms 错误(GPU 进程意外退出:exit_code=-532462766)

问题描述 投票:0回答:2

我是第一次设置 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[])
cefsharp
2个回答
2
投票

我错过了说明https://github.com/cefsharp/CefSharp/blob/cefsharp/99/NuGet/Readme.txt#L13 我创建了 app.manifest 文件并且效果很好。感谢您的帮助,amaitland!


0
投票

当系统 (Windows 10) 上存在 Sophos Endpoint 保护并启用应用程序控制时,我们遇到了同样的问题。在事件中我们可以看到 CEFLib 已被禁用。花了一段时间我们才弄清楚...

© www.soinside.com 2019 - 2024. All rights reserved.