Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. QtWebEngine crash only Release

QtWebEngine crash only Release

Scheduled Pinned Locked Moved Unsolved QtWebEngine
2 Posts 2 Posters 399 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lerxt
    wrote on last edited by
    #1

    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: 2GB

    Relevant installed packages:
    libqt5core5a
    libqt5gui5
    libqt5opengl5
    libqt5widgets5
    libqt5network5
    libqt5webengine-data
    libqt5webengine5
    libqt5webenginecore5
    libqt5webenginewidgets5

    V 1 Reply Last reply
    0
    • L lerxt

      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: 2GB

      Relevant installed packages:
      libqt5core5a
      libqt5gui5
      libqt5opengl5
      libqt5widgets5
      libqt5network5
      libqt5webengine-data
      libqt5webengine5
      libqt5webenginecore5
      libqt5webenginewidgets5

      V Offline
      V Offline
      Vijaykarthikeyan
      wrote on last edited by
      #2

      @lerxt I have this same problem ..Don't know how to resolve this

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved