QtWebEngine crash only Release
-
Hello,
I am currently experiencing an application crash with a SEGFAULT when trying to use the C++ version of QtWebEngine.
The target device is armhf, running Debian. The Qt version being used is 5.15.13 LTS, and it is being linked statically.With a Debug configuration, when calling QWebEngineView::load(QUrl), the application functions as expected. However, when building for a Release configuration, the application crashes. This happens with all webpages.
I have experimented with this by creating a separate QWebEnginePage object to then inject it into the QWebEngineView object, however, this also produces a crash only on the Release configuration, and not on the Debug configuration.
A fragment of the code is as follows:
class BrowserScreen { public: BrowserScreen() = default; virtual ~BrowserScreen() = default; public slots: void FinishLoading(const std::string& url); private: QWebEngineView* view_; } void BrowserScreen::OnURLReceived(const std::string& url) { if (!view_) { view_ = new QWebEngineView(this); QWebEnginePage* page = new QWebEnginePage(this); if (page) { view_->setPage(page); // code crashes here } connect(view_, &QWebEngineView::loadFinished, this, &BrowserScreen::FinishLoading); } view_->load(QUrl(QString::fromStdString(url))); }
Operating system: Linux (Debian 12 Bookworm)
Architecture: armv7l (armhf)
CPU: i.MX6DL, Cortex A9 Dual-Core
Memory: 512MB
Flash storage: 2GBRelevant installed packages:
libqt5core5a
libqt5gui5
libqt5opengl5
libqt5widgets5
libqt5network5
libqt5webengine-data
libqt5webengine5
libqt5webenginecore5
libqt5webenginewidgets5