Qtweb demo Critical error detected c0000374


_ROOT Version:_v6.30.04
_Platform:_win11
Compiler: visual studio 2019


I created a demo using vs2019+qt5.15.3, and the code is the same as the official qtweb code. However, when I run it, the form does not display at all and prompts Critical error detected c0000374
QtWidgetsApplication. exe has triggered a breakpoint. I added a breakpoint in the first line of the main function, but it didn’t hit. Is there an issue with my environment configuration? Does anyone know why this error occurred? thanks very much!

Due to the inability to upload compressed files, I don’t know how to upload my project

Hi and welcome on the forum,

How you build your ROOT version?

Did you change something in the demo?

Regards,
Sergey

I downloaded the root_v6.30.04.win64.vc17.exe installation package, but because I don’t understand cmake very well, I didn’t use cmakelist.txt. Instead, I created a qt application project using vs2019 and imported the qtweb code. And the compilation did not report any errors, but it could not run

Does this ROOT includes libROOTQt5WebDisplay.dll?

To my knowledge, ROOT binary distributions do not provide it and therefore one need to build
ROOT from the sources - enabling -Dqt5web=ON.

If you like - I can provide some hints how to build ROOT on windows with qt5web component.

There is no such dynamic library (libROOTQt5WebDisplay.dll), only libROOTWebDisplay.dll. If the library is missing, shouldn’t there be a pop-up window indicating that the dynamic library is missing?

cmake should report problem when you will try to build qtweb demo - while library directly specified as required.

See root/tutorials/webgui/qtweb/CMakeLists.txt at master · root-project/root · GitHub

Thanks, I want to integrate root into the qt form. If compilation is necessary, I hope you can tell me how to compile it.

One small remark - you need latest Qt5.15.15 or better Qt6.4 with ROOT version 6.30.

For that special Qt 5.15.3 I recommend to use ROOT 6.28.

Thank you for your suggestion, since my other programs are based on Qt5.15.3, I can only choose ROOT 6.28

I will provide fix soon to support older Qt5 with old chromium with ROOT 6.30.
But this will be released later with ROOT 6.30.06

[Building ROOT from source - ROOT](Building ROOT from source - ROOT)Am I following this tutorial?

Yes, you need to build ROOT from sources.

On windows you have to start x64 Native Tools Command Prompt from Visual Studio 2019.

And export PATH to QT installation like:

set PATH=%PATH%;C:\Qt5\5.15.2\msvc2019_64\bin

Then you need to create build directory and call cmake:

    cmake -G"Visual Studio 16 2019" -A x64 -Thost=x64 -Droot7=ON -Dpython=OFF -DPYTHON_EXECUTABLE=python -Dtesting=ON -DCMAKE_CXX_STANDARD=17 -Dwebgui=ON -Dqt5web=ON c:\your\root\source\dir

And finally call build:

cmake --build . --config Release --

OK I’ll try

I follow your command ,get this error:

CMake Warning at cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package):
Could not find a configuration file for package “Qt5Quick” that is
compatible with requested version “5.15.9”.

The following configuration files were considered but not accepted:

D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5Quick/Qt5QuickConfig.cmake, version: 5.15.3

Call Stack (most recent call first):
D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngineCore/Qt5WebEngineCoreConfig.cmake:105 (find_package)
cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngine/Qt5WebEngineConfig.cmake:105 (find_package)
cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
gui/qt5webdisplay/CMakeLists.txt:15 (find_package)

CMake Warning at cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package):
Found package configuration file:

D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngineCore/Qt5WebEngineCoreConfig.cmake

but it set Qt5WebEngineCore_FOUND to FALSE so package “Qt5WebEngineCore” is
considered to be NOT FOUND.
Call Stack (most recent call first):
D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngine/Qt5WebEngineConfig.cmake:105 (find_package)
cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
gui/qt5webdisplay/CMakeLists.txt:15 (find_package)

CMake Warning at cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package):
Found package configuration file:

D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngine/Qt5WebEngineConfig.cmake

but it set Qt5WebEngine_FOUND to FALSE so package “Qt5WebEngine” is
considered to be NOT FOUND.
Call Stack (most recent call first):
D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
gui/qt5webdisplay/CMakeLists.txt:15 (find_package)

CMake Warning at cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package):
Could not find a configuration file for package “Qt5Quick” that is
compatible with requested version “5.15.9”.

The following configuration files were considered but not accepted:

D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5Quick/Qt5QuickConfig.cmake, version: 5.15.3

Call Stack (most recent call first):
D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngineCore/Qt5WebEngineCoreConfig.cmake:105 (find_package)
cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngineWidgets/Qt5WebEngineWidgetsConfig.cmake:105 (find_package)
cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
gui/qt5webdisplay/CMakeLists.txt:15 (find_package)

CMake Warning at cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package):
Found package configuration file:

D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngineCore/Qt5WebEngineCoreConfig.cmake

but it set Qt5WebEngineCore_FOUND to FALSE so package “Qt5WebEngineCore” is
considered to be NOT FOUND.
Call Stack (most recent call first):
D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngineWidgets/Qt5WebEngineWidgetsConfig.cmake:105 (find_package)
cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
gui/qt5webdisplay/CMakeLists.txt:15 (find_package)

CMake Warning at cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package):
Found package configuration file:

D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngineWidgets/Qt5WebEngineWidgetsConfig.cmake

but it set Qt5WebEngineWidgets_FOUND to FALSE so package
“Qt5WebEngineWidgets” is considered to be NOT FOUND.
Call Stack (most recent call first):
D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package)
gui/qt5webdisplay/CMakeLists.txt:15 (find_package)

CMake Warning at cmake/modules/SearchInstalledSoftware.cmake:18 (_find_package):
Found package configuration file:

D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5/Qt5Config.cmake

but it set Qt5_FOUND to FALSE so package “Qt5” is considered to be NOT
FOUND. Reason given by package:

Failed to find Qt5 component “WebEngine” config file at
“D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngine/Qt5WebEngineConfig.cmake”

Failed to find Qt5 component “WebEngineWidgets” config file at
“D:/OSGeo4W/apps/Qt5/lib/cmake/Qt5WebEngineWidgets/Qt5WebEngineWidgetsConfig.cmake”

Call Stack (most recent call first):
gui/qt5webdisplay/CMakeLists.txt:15 (find_package)

CMake Warning at gui/qt5webdisplay/CMakeLists.txt:21 (message):
Qt5 (WebEngine, WebEngineWidgets) not found, disabling option ‘qt5web’

Probably you do not install all required components from Qt5.

Most important is QWebEngine

I am currently trying to use QT6 using the command

Set PATH=% PATH%; C: \ Qt6 \ 6.5.3 \ msvc2019_64 \ bin

Cmake. exe - G “Visual Studio 16 2019” - A x64- Host=x64- Droot7=ON - Dpython=OFF - DPYTHON-EXECUTABLE=python - Testing=ON - DCMAKEXCX_STANDARD=17- Dwebgui=ON - Dqt6web=ON C: \ root-6.28.12 \ installroot

No errors occurred, but I executed

Cmake – build-- Config Release–

The following error occurred:

No update step for ‘PCRE’
No patch step for ‘PCRE’
Performing configure step for ‘PCRE’
– PCRE configure command succeeded. See also C:/root-6.28.12/installroot/builtins/pcre/PCRE-prefix/src/PCRE-stamp/P
CRE-configure-*.log
Performing build step for ‘PCRE’
CMake Error at C:/root-6.28.12/installroot/builtins/pcre/PCRE-prefix/src/PCRE-stamp/PCRE-build-Release.cmake:49 (mess
age):
Command failed: 1

 'C:/Program Files/CMake/bin/cmake.exe' '--build' 'C:/root-6.28.12/installroot/builtins/pcre/PCRE-prefix/src/PCRE-b

uild’ ‘–config Release’ ‘–target’ ‘pcre’

See also

  C:/root-6.28.12/installroot/builtins/pcre/PCRE-prefix/src/PCRE-stamp/PCRE-build-*.log

C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(
241,5): error MSB8066: “C:\root-6.28.12\installroot\CMakeFiles\7bda5267c80c660435f76aff4957d055\PCRE-mkdir.rule;C:\root
-6.28.12\installroot\CMakeFiles\7bda5267c80c660435f76aff4957d055\PCRE-download.rule;C:\root-6.28.12\installroot\CMakeFi
les\7bda5267c80c660435f76aff4957d055\PCRE-update.rule;C:\root-6.28.12\installroot\CMakeFiles\7bda5267c80c660435f76aff49
57d055\PCRE-patch.rule;C:\root-6.28.12\installroot\CMakeFiles\7bda5267c80c660435f76aff4957d055\PCRE-configure.rule;C:\r
oot-6.28.12\installroot\CMakeFiles\7bda5267c80c660435f76aff4957d055\PCRE-build.rule;C:\root-6.28.12\installroot\CMakeFi
les\7bda5267c80c660435f76aff4957d055\PCRE-install.rule;C:\root-6.28.12\installroot\CMakeFiles\b59fef3e060259adecc44ef76
c791d78\PCRE-complete.rule;C:\root-6.28.12\installroot\CMakeFiles\8cc23d17c830f2db9183fd3149d251a6\PCRE.rule”的自定义生成已退出,
代码为 1。 [C:\root-6.28.12\installroot\builtins\pcre\PCRE.vcxproj]

May be @bellenot can help with windows compilation