Unsolved QWebEngineProfile causes Valgrind Crash
-
Hi, Hoping someone can help or at least point me in the right direction.
I've got a complex program that I've created and I have a memory leak somewhere in the code. The software heavily uses QWebEngine. However I want to use Valgrind to locate any potential memory leaks I've probably coded in somewhere.However whenever I run Valgrind it starts and then says "The program has unexpectedly finished". I know this can be an issue so I started hunting around to find out why this was happening. Where I've got to is the following, a simple 4 line program that crashes valgrind.
main.cpp
#include <QDebug> #include <QApplication> #include <QWebEngineProfile> int main(int argc, char *argv[]) { QApplication app(argc, argv); QWebEngineProfile p; qDebug() << "Running"; app.exec(); }
QT += core gui QT += widgets webengine webenginewidgets network webchannel sql concurrent LIBS += -lssl -lcrypto CONFIG += c++11 CONFIG += use_gold_linker CONFIG -= qml_debug # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target SOURCES += \ main.cpp
If I run this program I get to see the word "Running" in the console window.
However when I do "Analyze > Valgrind Memory Analzer" from the menu.I get
20:21:07: /usr/bin/valgrind --child-silent-after-fork=yes --xml-socket=127.0.0.1:39091 --log-socket=127.0.0.1:39389 --xml=yes --smc-check=stack --tool=memcheck --gen-suppressions=all --track-origins=yes --leak-check=summary --num-callers=25 /home/dan.integrate-it.network/Documents/build-ezrentalValgrindTest-Desktop_Qt_5_15_2_GCC_64bit-Debug/ezrentalValgrindTest 20:21:24: The program has unexpectedly finished. 20:21:24: Process exited with return value Process crashed 20:21:24: Analyzing finished.
Any help anyone can give would be great. Not sure if it's a QT issue or a Valgrid issue.
Regards
-
@Integrate-IT
what are the specs (especially RAM) of the machine you are on? -
@raven-worx Hi thanks for the question.
So a reasonable machine really.
16gb Ram on 8 core Intel i7-9700 @ 3.00mhz