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

Crash on start-up when constructing QWebEngineProfile

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.3, 6.8.2
    • WebEngine
    • None
    • Windows 10/11 (x86_64) multiple versions
    • Windows

    Description

      The crash reporting of my app is showing for a while already start-up crashes origination from the WebEngine. These crashes are deep down in the QWebEngine. I noticed this issue multiple versions ago and it is one of the most tracked crashes in my application. Here are the latest two versions:

      The previous released version of my application used Qt 6.7.3, which crashes loading a webpage on start-up with an off-the-record profile. The QWebPage is initialized before the event loop is started.

      Crashed Thread: 11392
      
      Application Specific Information:
      Fatal Error: EXCEPTION_BREAKPOINT / 0x7ff836cff0b5
      
      Thread 11392 Crashed:
      0   Qt6WebEngineCore.dll            0x7ff836cff0b5      TargetNtUnmapViewOfSection
      1   Qt6WebEngineCore.dll            0x7ff835010c7e      CrashForExceptionInNonABICompliantCodeRange
      2   Qt6WebEngineCore.dll            0x7ff8323eff66      QtWebEngineCore::WebContentsAdapter::webChannel
      3   Qt6WebEngineCore.dll            0x7ff8323f09e4      QtWebEngineCore::WebContentsAdapter::webChannel
      4   Qt6WebEngineCore.dll            0x7ff8323df63a      QtWebEngineCore::WebContentsAdapter::WebContentsAdapter
      5   Qt6WebEngineCore.dll            0x7ff8323df688      QtWebEngineCore::WebContentsAdapter::WebContentsAdapter
      6   Qt6WebEngineCore.dll            0x7ff83233d661      QWebEnginePage::qt_static_metacall
      7   Qt6WebEngineCore.dll            0x7ff83233dbdf      QWebEnginePagePrivate::QWebEnginePagePrivate
      8   Qt6WebEngineCore.dll            0x7ff83233db1c      QWebEnginePage::QWebEnginePage
      [...]
      12  app.exe                         0x7ff71bdb83d6      main (main.cpp:945)
      13  app.exe.                        0x7ff71c6ca06f      qtEntryPoint (qtentrypoint_win.cpp:45)
      14  app.exe.                        0x7ff71c6adaa9      [inlined] invoke_main (exe_common.inl:102)
      15  app.exe                         0x7ff71c6adaa9      __scrt_common_main_seh (exe_common.inl:288)
      16  KERNEL32.DLL                    0x7ff895107373      BaseThreadInitThunk
      17  ntdll.dll                       0x7ff8959dcc90      RtlUserThreadStart 

       

      The latest release of this application using Qt 6.8.2 now and still has a similar issue. We are now using a named profile, which changes the init slightly and it now crashes in the first QWebEngineProfile construction (still before the event loop started):

       

      OS Version: Windows 10.0.27823 (1000)
      Report Version: 104
      
      Crashed Thread: 85872
      
      Application Specific Information:
      Fatal Error: EXCEPTION_BREAKPOINT / 0x7ff91581c657
      
      Thread 85872 Crashed:
      0   Qt6WebEngineCore.dll            0x7ff91581c657      TargetNtUnmapViewOfSection
      1   Qt6WebEngineCore.dll            0x7ff913a3587e      CrashForExceptionInNonABICompliantCodeRange
      2   Qt6WebEngineCore.dll            0x7ff910bd85a7      QtWebEngineCore::WebContentsAdapter::wasShown
      3   Qt6WebEngineCore.dll            0x7ff910bd8f04      QtWebEngineCore::WebContentsAdapter::wasShown
      4   Qt6WebEngineCore.dll            0x7ff910b9cd15      QtWebEngineCore::ProfileAdapter::ProfileAdapter
      5   Qt6WebEngineCore.dll            0x7ff910b31809      QWebEngineProfile::QWebEngineProfile
      [...]
      11  app.exe                         0x7ff69825b8e5      main (main.cpp:1090)
      12  app.exe                         0x7ff698c5518f      qtEntryPoint (qtentrypoint_win.cpp:45)
      13  app.exe                         0x7ff698c3a275      [inlined] invoke_main (exe_common.inl:102)
      14  app.exe                         0x7ff698c3a275      __scrt_common_main_seh (exe_common.inl:288)
      15  KERNEL32.DLL                    0x7ffa0b8864a6      BaseThreadInitThunk
      16  ntdll.dll                       0x7ffa0ba57bef      RtlUserThreadStart 

      I suspect there is a weird initialization issue in the `WebContentsAdapter` that my app sometimes runs into. I tried to reproduce this several times, but couldn't identify the culprit.

      Are there any known issues initializing the QWebEngine components early in the applications lifecycle or before the event loop is running?

       

      Attachments

        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
            vjungbluth Victor Jungbluth
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes