Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-87235

QttWebEngine crashes when a new view is requested

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P1: Critical
    • None
    • 5.15.0, 5.15.1
    • WebEngine
    • None
    • Linux/X11

    Description

      Short Description : WebEngineView crashes when trying to block a newViewRequest. That is when a link is being opened with Ctrl+Click or window.open is being called by js, WebEngineView crashes.

      Long Description : When a new view is requested(Ctrl+click or window.open is called) in a loaded page in WebEngineView it crashes (attaching backtrace below) : 

      #0  0x00007ffff16327e0 in QtWebEngineCore::ProfileAdapter::profile() () at /usr/lib/libQt5WebEngineCore.so.5 
      #1  0x00007ffff165fdb6 in QtWebEngineCore::WebContentsAdapter::initialize(content::SiteInstance*) () at /usr/lib/libQt5WebEngineCore.so.5 
      #2  0x00007ffff166b9c0 in  () at /usr/lib/libQt5WebEngineCore.so.5 
      #3  0x0000000000000000 in  ()
      

      Tried handling the signal `onNewViewRequested` and still the same issue :

      // This doesn't work.
      WebEngineView {
          id: webengine
          anchors.fill: parent
              
          [...]
      
          onNewViewRequested: {
              console.log("New View Requested :", JSON.stringify(request, null, 2));            
          }
      
          [...]
      }
      

      After some more tests found out that it is not crashing when the request is being opened in a webengineview :

      // This works. But unable to block the request.
      WebEngineView {
          id: webengine
          anchors.fill: parent
              
          [...]
      
          onNewViewRequested: {
              console.log("New View Requested :", JSON.stringify(request, null, 2));
              request.openIn(webengine);
          }
      
          [...]
      }
      

      Tested this on Qt 5.15.0 and 5.15.1 on Linux.
      Had the same issue on both cases.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qt_webengine_team Qt WebEngine Team
              ab0027 Anupam Basak
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes