QtWebEngineCore on macOS: Fatal process out of memory: Failed to reserve memory for new V8 Isolate
-
Hey,
I have a QtQuick application and I instantiate a WebEngineView in a QtQuick Controls Popup:
WebEngineView { anchors.fill: parent url: "https://www.qt.io" }
Before the QGuiApplication is initialised, the QtWebEngine gets initialised:
QtWebEngine::initialize();
When starting the application from within QtCreator (debug/release) it works just fine. However, when deploying the app with the qtmacdeploy tool:
$QT/bin/macdeployqt "myapp.app" -qmldir="../qmldir/"
The WebView stops working. When showing the view it prints:
# # Fatal error in , line 0 # Fatal process out of memory: Failed to reserve memory for new V8 Isolate # # # #FailureMessage Object: 0x7ffee4a6c9700 QtWebEngineCore 0x000000010e4b0b59 shape_detection::TextDetectionImplMac::Detect(SkBitmap const&, base::OnceCallback<void (std::__1::vector<mojo::StructPtr<shape_detection::mojom::TextDetectionResult>, std::__1::allocator<mojo::StructPtr<shape_detection::mojom::TextDetectionResult> > >)>) + 8105641 1 QtWebEngineCore 0x000000010e3d95b3 shape_detection::TextDetectionImplMac::Detect(SkBitmap const&, base::OnceCallback<void (std::__1::vector<mojo::StructPtr<shape_detection::mojom::TextDetectionResult>, std::__1::allocator<mojo::StructPtr<shape_detection::mojom::TextDetectionResult> > >)>) + 7223555 2 QtWebEngineCore 0x000000011099469b ui::CATransactionCoordinator::SynchronizeImpl() + 7105835 3 QtWebEngineCore 0x0000000110964a92 ui::CATransactionCoordinator::SynchronizeImpl() + 6910242 4 QtWebEngineCore 0x000000010cf2a82b GrMtlSemaphore::GrMtlSemaphore(id<MTLEvent>, unsigned long long) + 11362187 5 QtWebEngineCore 0x000000010d19f7d2 GrMtlSemaphore::GrMtlSemaphore(id<MTLEvent>, unsigned long long) + 13938482 6 QtWebEngineCore 0x000000010d19f965 GrMtlSemaphore::GrMtlSemaphore(id<MTLEvent>, unsigned long long) + 13938885 7 QtWebEngineCore 0x000000010d06c986 GrMtlSemaphore::GrMtlSemaphore(id<MTLEvent>, unsigned long long) + 12681446 8 QtWebEngineCore 0x000000011099037e ui::CATransactionCoordinator::SynchronizeImpl() + 7088654 9 QtWebEngineCore 0x000000011075b1fd ui::CATransactionCoordinator::SynchronizeImpl() + 4774029 10 QtWebEngineCore 0x000000011075bb13 ui::CATransactionCoordinator::SynchronizeImpl() + 4776355 11 QtWebEngineCore 0x00000001104359f4 ui::CATransactionCoordinator::SynchronizeImpl() + 1474692 12 QtWebEngineCore 0x00000001103ed254 ui::CATransactionCoordinator::SynchronizeImpl() + 1177828 13 QtWebEngineCore 0x000000011200e347 ui::CATransactionCoordinator::SynchronizeImpl() + 30673367 14 QtWebEngineCore 0x000000011200c878 ui::CATransactionCoordinator::SynchronizeImpl() + 30666504 15 QtWebEngineCore 0x000000011200e19d ui::CATransactionCoordinator::SynchronizeImpl() + 30672941 16 QtWebEngineCore 0x000000011203e836 ui::CATransactionCoordinator::SynchronizeImpl() + 30871238 17 QtWebEngineCore 0x000000010de865e6 shape_detection::TextDetectionImplMac::Detect(SkBitmap const&, base::OnceCallback<void (std::__1::vector<mojo::StructPtr<shape_detection::mojom::TextDetectionResult>, std::__1::allocator<mojo::StructPtr<shape_detection::mojom::TextDetectionResult> > >)>) + 1640758 18 QtWebEngineCore 0x00000001120ee733 ui::CATransactionCoordinator::SynchronizeImpl() + 31591875 19 QtWebEngineCore 0x000000010de859f4 shape_detection::TextDetectionImplMac::Detect(SkBitmap const&, base::OnceCallback<void (std::__1::vector<mojo::StructPtr<shape_detection::mojom::TextDetectionResult>, std::__1::allocator<mojo::StructPtr<shape_detection::mojom::TextDetectionResult> > >)>) + 1637700 20 QtWebEngineCore 0x000000010be6102b QtWebEngineCore::processMain(int, char const**) + 139 21 QtWebEngineProcess 0x000000010b191ee7 main + 167 22 libdyld.dylib 0x00007fff6ee91cc9 start + 1 23 ??? 0x0000000000000010 0x0 + 16
I double checked and my app bundle contains these frameworks
- QtWebChannel.framework
- QtWebEngine.framework
- QtWebEngineCore.framework
where the core framework contains the QtWebEngineProcess.app helper and the *.pak resource files and locales. But anyway I'd assume to observe some different errors if the bundle is missing required Ressources.
The bundle is both signed and notarised. I am running macOS 10.15.7 and Qt 5.15.0
Thanks a lot -
After more research it appears that signing my bundle causes the issue.
For a solution see https://forum.qt.io/topic/102212/qtwebengine-signing-issues/18