From 72d996e11aecbaddaca22571e035be4f971681a1 Mon Sep 17 00:00:00 2001 From: SatyamAgarwl Date: Mon, 13 Jul 2026 12:52:23 +0530 Subject: [PATCH] Fix intermittent startup crash on Windows: honor disableHttpsFeatures in Welcome Tab The Windows/macOS WelcomeTab created its QWebEngineView unconditionally, so the embedded Chromium always started even with disableHttpsFeatures enabled - and its startup intermittently crashes the whole app with an access violation in Qt5WebEngineCore.dll on newer Windows builds. Skip creating the web view when disableHttpsFeatures is set, consistent with the Welcome Tab menu action gating in MainWindow and with the Linux implementation, so the embedded Chromium never initializes. Co-Authored-By: Claude --- .../gui/widgets/workarea/WelcomeTab.cpp | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/robomongo/gui/widgets/workarea/WelcomeTab.cpp b/src/robomongo/gui/widgets/workarea/WelcomeTab.cpp index f0637398e..09c5ede4a 100644 --- a/src/robomongo/gui/widgets/workarea/WelcomeTab.cpp +++ b/src/robomongo/gui/widgets/workarea/WelcomeTab.cpp @@ -5,15 +5,33 @@ #include #include +#include "robomongo/core/AppRegistry.h" +#include "robomongo/core/settings/SettingsManager.h" + namespace Robomongo { // ------------------ WelcomeTab WelcomeTab::WelcomeTab(QScrollArea *parent) : QWidget(parent), _parent(parent) { + auto mainLayout = new QHBoxLayout; + mainLayout->setContentsMargins(-10, -10, -1, -1); + mainLayout->setSizeConstraint(QLayout::SetMinimumSize); + setLayout(mainLayout); + + // Respect "disableHttpsFeatures" on Windows/macOS as well (it already + // gates the Welcome Tab menu action and the Linux implementation). + // Creating any WebEngine object starts the embedded Chromium, which + // intermittently crashes the whole application shortly after startup + // on newer Windows builds (access violation in Qt5WebEngineCore.dll). + // With this setting enabled the web view is never created, so the + // embedded Chromium never initializes. + if (AppRegistry::instance().settingsManager()->disableHttpsFeatures()) + return; + auto webView = new QWebEngineView(this); QUrl const URL { - "http://files.studio3t.com/rm-feed_3t_io/1.4.3/index.html" + "http://files.studio3t.com/rm-feed_3t_io/1.4.3/index.html" }; webView->setPage(new MyWebPage(this)); webView->page()->setUrl(URL); @@ -21,11 +39,7 @@ namespace Robomongo { webView->page()->triggerAction(QWebEnginePage::WebAction::ReloadAndBypassCache); webView->page()->profile()->setHttpCacheType(QWebEngineProfile::HttpCacheType::NoCache); - auto mainLayout = new QHBoxLayout; - mainLayout->setContentsMargins(-10, -10, -1, -1); - mainLayout->setSizeConstraint(QLayout::SetMinimumSize); mainLayout->addWidget(webView); - setLayout(mainLayout); } // ------------------ MyWebPage