I am running this on MacBook M2 Max / MacOs Ventura 14.1
Here is my whole code:
#include "mainwindow.h"
#include "QCefContext.h"
#include "QCefSetting.h"
#include "QCefView.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
// build QCefConfig
QCefConfig config;
// set user agent
config.setUserAgent("QCefViewTest");
// set log level
config.setLogLevel(QCefConfig::LOGSEVERITY_DEFAULT);
// set JSBridge object name (default value is QCefViewClient)
config.setBridgeObjectName("CallBridge");
// port for remote debugging (default is 0 and means to disable remote debugging)
config.setRemoteDebuggingPort(9000);
// set background color for all browsers
// (QCefSetting.setBackgroundColor will overwrite this value for specified browser instance)
config.setBackgroundColor(Qt::lightGray);
// WindowlessRenderingEnabled is set to true by default,
// set to false to disable the OSR mode
config.setWindowlessRenderingEnabled(true);
// add command line args, you can any cef supported switches or parameters
config.addCommandLineSwitch("use-mock-keychain");
config.addCommandLineSwitch("disable-gpu");
// config.addCommandLineSwitch("enable-media-stream");
// config.addCommandLineSwitch("allow-file-access-from-files");
// config.addCommandLineSwitch("disable-spell-checking");
// config.addCommandLineSwitch("disable-site-isolation-trials");
// config.addCommandLineSwitch("enable-aggressive-domstorage-flushing");
config.addCommandLineSwitchWithValue("renderer-process-limit", "1");
// config.addCommandLineSwitchWithValue("disable-features", "BlinkGenPropertyTrees,TranslateUI,site-per-process");
// create QCefContext instance with config,
// the lifecycle of cefContext must be the same as QApplication instance
QCefContext cefContext(&a, argc, argv, &config);
MainWindow w;
w.show();
return a.exec();
}
~3 Seconds after program starts It crashes. In the console this is what I see:
[1116/220122.278002:WARNING:allocator_interception_mac.mm(494)] Internals of CFAllocator not known; out-of-memory failures via CFAllocator will not result in termination. http://crbug.com/45650
[1116/220122.427449:WARNING:chrome_browser_cloud_management_controller.cc(87)] Could not create policy manager as CBCM is not enabled.
[1116/220122.454926:WARNING:allocator_interception_mac.mm(494)] Internals of CFAllocator not known; out-of-memory failures via CFAllocator will not result in termination. http://crbug.com/45650
[1116/220122.458835:ERROR:mach_port_rendezvous.cc(316)] bootstrap_look_up $(PRODUCT_BUNDLE_IDENTIFIER).MachPortRendezvousServer.24033: Unknown service name (1102)
[1116/220122.458891:FATAL:field_trial.cc(704)] Check failed: result.
[1116/220122.471007:ERROR:socket_posix.cc(147)] bind() failed: Address already in use (48)
[1116/220122.471057:ERROR:devtools_http_handler.cc(311)] Cannot start http server for devtools.
2023-11-16 22:01:22.574 CefViewTest[24033:15560368] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
[1116/220122.587328:ERROR:gpu_process_host.cc(953)] GPU process exited unexpectedly: exit_code=5
[1116/220122.587377:WARNING:gpu_process_host.cc(1303)] The GPU process has crashed 1 time(s)
[1116/220122.616609:WARNING:allocator_interception_mac.mm(494)] Internals of CFAllocator not known; out-of-memory failures via CFAllocator will not result in termination. http://crbug.com/45650
[1116/220122.620906:ERROR:mach_port_rendezvous.cc(316)] bootstrap_look_up $(PRODUCT_BUNDLE_IDENTIFIER).MachPortRendezvousServer.24033: Unknown service name (1102)
[1116/220122.620964:FATAL:field_trial.cc(704)] Check failed: result.
[1116/220122.661545:ERROR:gpu_process_host.cc(953)] GPU process exited unexpectedly: exit_code=5
[1116/220122.661581:WARNING:gpu_process_host.cc(1303)] The GPU process has crashed 2 time(s)
[1116/220122.681933:WARNING:allocator_interception_mac.mm(494)] Internals of CFAllocator not known; out-of-memory failures via CFAllocator will not result in termination. http://crbug.com/45650
[1116/220122.686258:ERROR:mach_port_rendezvous.cc(316)] bootstrap_look_up $(PRODUCT_BUNDLE_IDENTIFIER).MachPortRendezvousServer.24033: Unknown service name (1102)
[1116/220122.688907:FATAL:field_trial.cc(704)] Check failed: result.
[1116/220122.689241:ERROR:gpu_process_host.cc(953)] GPU process exited unexpectedly: exit_code=5
[1116/220122.689259:WARNING:gpu_process_host.cc(1303)] The GPU process has crashed 3 time(s)
[1116/220122.709253:WARNING:allocator_interception_mac.mm(494)] Internals of CFAllocator not known; out-of-memory failures via CFAllocator will not result in termination. http://crbug.com/45650
[1116/220122.713146:ERROR:mach_port_rendezvous.cc(316)] bootstrap_look_up $(PRODUCT_BUNDLE_IDENTIFIER).MachPortRendezvousServer.24033: Unknown service name (1102)
[1116/220122.713198:FATAL:field_trial.cc(704)] Check failed: result.
[1116/220122.713531:ERROR:gpu_process_host.cc(953)] GPU process exited unexpectedly: exit_code=5
[1116/220122.713554:WARNING:gpu_process_host.cc(1303)] The GPU process has crashed 4 time(s)
[1116/220122.733368:WARNING:allocator_interception_mac.mm(494)] Internals of CFAllocator not known; out-of-memory failures via CFAllocator will not result in termination. http://crbug.com/45650
[1116/220122.737194:ERROR:mach_port_rendezvous.cc(316)] bootstrap_look_up $(PRODUCT_BUNDLE_IDENTIFIER).MachPortRendezvousServer.24033: Unknown service name (1102)
[1116/220122.737240:FATAL:field_trial.cc(704)] Check failed: result.
[1116/220122.737550:ERROR:gpu_process_host.cc(953)] GPU process exited unexpectedly: exit_code=5
[1116/220122.737567:WARNING:gpu_process_host.cc(1303)] The GPU process has crashed 5 time(s)
[1116/220122.756495:WARNING:allocator_interception_mac.mm(494)] Internals of CFAllocator not known; out-of-memory failures via CFAllocator will not result in termination. http://crbug.com/45650
[1116/220122.760600:ERROR:mach_port_rendezvous.cc(316)] bootstrap_look_up $(PRODUCT_BUNDLE_IDENTIFIER).MachPortRendezvousServer.24033: Unknown service name (1102)
[1116/220122.760646:FATAL:field_trial.cc(704)] Check failed: result.
[1116/220122.761417:ERROR:gpu_process_host.cc(953)] GPU process exited unexpectedly: exit_code=5
[1116/220122.761439:WARNING:gpu_process_host.cc(1303)] The GPU process has crashed 6 time(s)
[1116/220122.761451:FATAL:gpu_data_manager_impl_private.cc(440)] GPU process isn't usable. Goodbye.
Any idea why it crashes and how can I resolve this ?
I am running this on MacBook M2 Max / MacOs Ventura 14.1
Here is my whole code:
~3 Seconds after program starts It crashes. In the console this is what I see:
Any idea why it crashes and how can I resolve this ?