Deployed Qt application QtWebEngineProcess unable to load Qt5Core.dll

2

I need help to correctly deploy a Qt 5.14.1 x64 application to a client's Windows 10 PC. The application uses the QtWebEngineProcess to display a google map in one of the tabbed interface windows.

This used to work fine until either the Visual Studio 2019 (currently at the latest Version 16.4.5) was updated or the Version of QT was updated from the prior version - I think that used version 5.13.2. I cannot tell which change caused the error.

The problem is that when the application launches on the client's PC (without Visual Studio or Qt). When I double click on the application, it pauses for a few seconds and eventually it pops up a dialog indicating that it could not find Qt5Core.dll. (which is in the same folder as the application) and shortly thereafter it shows another dialog with error code 0xc0000022.

These are associated with a child process (QtWebEngineProcess.exe) that gets instantiated from my main application executable (app739.exe).

Comparing the working (prior) version to the current working version, I noticed that there was a new DLL dependency on VCRUNTIME140_1.dll. This seems to have something to do with exception handling, however the QtWebEngineProcess.exe does not have this dll listed as a dependency.

The application was deployed as follows:

F:\Common\coffey\CoPilotTesterV23.0\app739.exe 64 bit, release executable
Adding Qt5Svg for qsvgicon.dll
Skipping plugin qmldbg_debugger.dll due to disabled dependencies (Qt5Qml).
Skipping plugin qmldbg_inspector.dll due to disabled dependencies (Qt5Qml Qt5Quick).
Skipping plugin qmldbg_local.dll due to disabled dependencies (Qt5Qml).
Skipping plugin qmldbg_messages.dll due to disabled dependencies (Qt5Qml).
Skipping plugin qmldbg_native.dll due to disabled dependencies (Qt5Qml).
Skipping plugin qmldbg_nativedebugger.dll due to disabled dependencies (Qt5Qml).
Skipping plugin qmldbg_preview.dll due to disabled dependencies (Qt5Qml Qt5Quick).
Skipping plugin qmldbg_profiler.dll due to disabled dependencies (Qt5Qml).
Skipping plugin qmldbg_quickprofiler.dll due to disabled dependencies (Qt5Qml Qt5Quick).
Skipping plugin qmldbg_server.dll due to disabled dependencies (Qt5Qml).
Skipping plugin qmldbg_tcp.dll due to disabled dependencies (Qt5Qml).
Skipping plugin qsgd3d12backend.dll due to disabled dependencies (Qt5Qml Qt5Quick).
Direct dependencies: Qt5Core Qt5Gui Qt5SerialPort Qt5Widgets Qt5WebEngineWidgets Qt5WebChannel
All dependencies   : Qt5Core Qt5Gui Qt5Network Qt5Positioning Qt5PrintSupport Qt5Qml Qt5Quick Qt5QuickWidgets Qt5SerialPort Qt5Widgets Qt5WebEngineCore Qt5WebEngineWidgets Qt5WebChannel
To be deployed     : Qt5Core Qt5Gui Qt5Network Qt5Positioning Qt5PrintSupport Qt5Qml Qt5Quick Qt5QuickWidgets Qt5SerialPort Qt5Svg Qt5Widgets Qt5WebEngineCore Qt5WebEngineWidgets Qt5WebChannel
Qt5QmlModels.dll is up to date.
Qt5Core.dll is up to date.
Qt5Gui.dll is up to date.
Qt5Network.dll is up to date.
Qt5Positioning.dll is up to date.
Qt5PrintSupport.dll is up to date.
Qt5Qml.dll is up to date.
Qt5Quick.dll is up to date.
Qt5QuickWidgets.dll is up to date.
Qt5SerialPort.dll is up to date.
Qt5Svg.dll is up to date.
Qt5Widgets.dll is up to date.
Qt5WebEngineCore.dll is up to date.
Qt5WebEngineWidgets.dll is up to date.
Qt5WebChannel.dll is up to date.
libGLESV2.dll is up to date.
libEGL.dll is up to date.
d3dcompiler_47.dll is up to date.
opengl32sw.dll is up to date.
qgenericbearer.dll is up to date.
qsvgicon.dll is up to date.
qgif.dll is up to date.
qicns.dll is up to date.
qico.dll is up to date.
qjpeg.dll is up to date.
qsvg.dll is up to date.
qtga.dll is up to date.
qtiff.dll is up to date.
qwbmp.dll is up to date.
qwebp.dll is up to date.
qwindows.dll is up to date.
qtposition_positionpoll.dll is up to date.
qtposition_serialnmea.dll is up to date.
qtposition_winrt.dll is up to date.
windowsprintersupport.dll is up to date.
qwindowsvistastyle.dll is up to date.
Deploying: QtWebEngineProcess...
QtWebEngineProcess.exe is up to date.
F:\Common\coffey\CoPilotTesterV23.0\app739.exe 64 bit, release executable
Adding Qt5Svg for qsvgicon.dll
Skipping plugin qmldbg_debugger.dll due to disabled dependencies (Qt5Qml).
Skipping plugin qmldbg_inspector.dll due to disabled dependencies (Qt5Qml Qt5Quick).
Skipping plugin qmldbg_local.dll due to disabled dependencies (Qt5Qml).
Skipping plugin qmldbg_messages.dll due to disabled dependencies (Qt5Qml).
Skipping plugin qmldbg_native.dll due to disabled dependencies (Qt5Qml).
Skipping plugin qmldbg_nativedebugger.dll due to disabled dependencies (Qt5Qml).
Skipping plugin qmldbg_preview.dll due to disabled dependencies (Qt5Qml Qt5Quick).
Skipping plugin qmldbg_profiler.dll due to disabled dependencies (Qt5Qml).
Skipping plugin qmldbg_quickprofiler.dll due to disabled dependencies (Qt5Qml Qt5Quick).
Skipping plugin qmldbg_server.dll due to disabled dependencies (Qt5Qml).
Skipping plugin qmldbg_tcp.dll due to disabled dependencies (Qt5Qml).
Skipping plugin qsgd3d12backend.dll due to disabled dependencies (Qt5Qml Qt5Quick).
Direct dependencies: Qt5Core Qt5Gui Qt5SerialPort Qt5Widgets Qt5WebEngineWidgets Qt5WebChannel
All dependencies   : Qt5Core Qt5Gui Qt5Network Qt5Positioning Qt5PrintSupport Qt5Qml Qt5Quick Qt5QuickWidgets Qt5SerialPort Qt5Widgets Qt5WebEngineCore Qt5WebEngineWidgets Qt5WebChannel
To be deployed     : Qt5Core Qt5Gui Qt5Network Qt5Positioning Qt5PrintSupport Qt5Qml Qt5Quick Qt5QuickWidgets Qt5SerialPort Qt5Svg Qt5Widgets Qt5WebEngineCore Qt5WebEngineWidgets Qt5WebChannel
Qt5QmlModels.dll is up to date.
Qt5Core.dll is up to date.
Qt5Gui.dll is up to date.
Qt5Network.dll is up to date.
Qt5Positioning.dll is up to date.
Qt5PrintSupport.dll is up to date.
Qt5Qml.dll is up to date.
Qt5Quick.dll is up to date.
Qt5QuickWidgets.dll is up to date.
Qt5SerialPort.dll is up to date.
Qt5Svg.dll is up to date.
Qt5Widgets.dll is up to date.
Qt5WebEngineCore.dll is up to date.
Qt5WebEngineWidgets.dll is up to date.
Qt5WebChannel.dll is up to date.
libGLESV2.dll is up to date.
libEGL.dll is up to date.
d3dcompiler_47.dll is up to date.
opengl32sw.dll is up to date.
qgenericbearer.dll is up to date.
qsvgicon.dll is up to date.
qgif.dll is up to date.
qicns.dll is up to date.
qico.dll is up to date.
qjpeg.dll is up to date.
qsvg.dll is up to date.
qtga.dll is up to date.
qtiff.dll is up to date.
qwbmp.dll is up to date.
qwebp.dll is up to date.
qwindows.dll is up to date.
qtposition_positionpoll.dll is up to date.
qtposition_serialnmea.dll is up to date.
qtposition_winrt.dll is up to date.
windowsprintersupport.dll is up to date.
qwindowsvistastyle.dll is up to date.
icudtl.dat is up to date.
qtwebengine_devtools_resources.pak is up to date.
qtwebengine_resources.pak is up to date.
qtwebengine_resources_100p.pak is up to date.
qtwebengine_resources_200p.pak is up to date.
en-US.pak is up to date.

This is the dependency info:

F:\Common\coffey\CoPilotTesterV23.0>dumpbin /dependents app739.exe
Microsoft (R) COFF/PE Dumper Version 14.24.28316.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file app739.exe

File Type: EXECUTABLE IMAGE

  Image has the following dependencies:

    BTI42964.dll
    Qt5WebEngineWidgets.dll
    Qt5Widgets.dll
    Qt5Gui.dll
    Qt5SerialPort.dll
    Qt5WebChannel.dll
    Qt5Core.dll
    MSVCP140.dll
    WS2_32.dll
    BTICard64.dll
    KERNEL32.dll
    VCRUNTIME140.dll
    VCRUNTIME140_1.dll
    api-ms-win-crt-runtime-l1-1-0.dll
    api-ms-win-crt-heap-l1-1-0.dll
    api-ms-win-crt-stdio-l1-1-0.dll
    api-ms-win-crt-string-l1-1-0.dll
    api-ms-win-crt-math-l1-1-0.dll
    api-ms-win-crt-convert-l1-1-0.dll
    api-ms-win-crt-locale-l1-1-0.dll
    api-ms-win-crt-filesystem-l1-1-0.dll
    api-ms-win-crt-time-l1-1-0.dll
    SHELL32.dll
    api-ms-win-crt-utility-l1-1-0.dll

  Summary

        C000 .data
       13000 .pdata
       FF000 .rdata
        3000 .reloc
       4C000 .rsrc
      1BC000 .text

enter image description here

enter image description here

c++
qt
deployment
asked on Stack Overflow Mar 6, 2020 by johnco3

3 Answers

2

I have the same issue using Qt 5.15 and VS 2019. However, the problem only occurs when my application is deployed on a network drive. The same collection of files, where qt5Core.dll is in the same folder, works fine on all local drives.

answered on Stack Overflow Jul 16, 2020 by David Stodden
1

I had a similar issue running QT 5.15.1 on Windows 10. QtWebEngineProcess.exe could not find Qt5Core.dll even though it was in the same folder as the executable. For me the problem was solved when i disabled sandboxing, see https://doc.qt.io/qt-5/qtwebengine-platform-notes.html.

0

Deploying Qt WebEngine Processes (differs from standard Qt5 applications deployment):

...
Qt WebEngine takes advantage of the multi-process model that the Chromium project offers. The multi-process model requires that the Qt WebEngine Process executable be deployed alongside your application.

The WebEngine process is executed for each QWebEngineView or WebEngineView instance. For example, a browser application with two tabs open should have two separate instances of the process running. This is a common approach used by most modern web engines to provide a stable browsing experience.

At runtime, Qt WebEngine looks for the QtWebEngineProcess executable in the directory that QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath) returns. For Qt installations, this is QTDIR/libexec (Linux) or QTDIR\bin (Windows). The path can be changed by defining a qt.conf file, for example. Alternatively, an executable path can be set as a value of the QTWEBENGINEPROCESS_PATH environment variable. On macOS, Qt WebEngine looks for the executable in .app/Helpers/QtWebEngineProcess
...

Firstly, you need to check what path QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath); returns.

Additionally: standard Qt5 applications deployment console tool for Windows - windeployqt

See also: Deploying Qt 5 App on Windows

answered on Stack Overflow Mar 6, 2020 by Vladimir Bershov • edited Mar 6, 2020 by Vladimir Bershov

User contributions licensed under CC BY-SA 3.0