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

Squish triggers an crash for Qt Webengine?

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P1: Critical
    • None
    • 6.5.2
    • WebEngine

    Description

      Squish team encountered a crash when using this package on embedded device with Squish IDE when recording a test case.
      Interacting with the application's browser lead to Squish crashing. 

      Logs from Squish IDE attached to the report.

       

      Below the stack trace of the crash given by the Squish IDE

       

      import names
       
       
      def main():
         attachToApplication("IndustrialVehicle3D")
         mouseClick(waitForObject(names.webEngineView_Design_Tools_HTML_Object), 5, 5, Qt.NoModifier, Qt.LeftButton)
         tapObject(waitForObject(names.tabBar_tabButton_TabButton), 573, 29)
         tapObject(waitForObject(names.tabBar_tabButton_TabButton), 558, 33)
         touchAndDrag(waitForObject(names.navigationBar_addressBar_TextField), 429, 0, 1, 22)
         type(waitForObject(names.navigationBar_addressBar_TextField), "<Backspace>")
         type(waitForObject(names.navigationBar_addressBar_TextField), "<Backspace>")
         type(waitForObject(names.navigationBar_addressBar_TextField), "<Backspace>")
         type(waitForObject(names.navigationBar_addressBar_TextField), "<Backspace>")
         type(waitForObject(names.navigationBar_addressBar_TextField), "<Backspace>")
         # ***** The application CRASHED at this point! *****
         # Backtrace:
         # (0) /lib/libsquishhook.so(+0xa4148) [0x7f9d194148]
         # (1) /lib/libsquishhook.so(+0x7a97c) [0x7f9d16a97c]
         # (2) linux-vdso.so.1(__kernel_rt_sigreturn+0) [0x7fb4c36790]
         # (3) /usr/lib/libQt6Qml.so.6 (QV4::QObjectMethod::callInternal(QV4::Value const*, QV4::Value const*, intconst)) [0x7fb3f27bfc]
         # (4) /usr/lib/libQt6Qml.so.6 (QJSValue::call(QList<QJSValue> const&) const)) [0x7fb3e79a60]
         # (5) /usr/lib/libQt6WebEngineQuick.so.6 (QQuickWebEngineViewPrivate::didRunJavaScript(unsigned long long, QVariant const&))) [0x7fb4b6ae7c]
         # (6) /usr/lib/libQt6WebEngineCore.so.6(+0xc70ccc) [0x7faa9b0ccc]
      

      Comment from Andreas Pakulat regarding the crash:
      "

      Interesting, so when the webengine only has to run the code needed for hooking up the page things are ok, but if Squish also - for recording interactions - does JS executions at 'random' points in time then the WebEngine or QML engine crash.

       

      I've had a little bit of time today to get my hands on Qt 6.5.2 (on macOS though) and I think I can reproduce this crash with a little bit of trying. Unfortunately I wasn't able to verify if the crash happens with other Qt 6 versions (and Squish 7.1.1) as well - it appears the quicknanobrowser shipped alongside Qt 6.4.3 is somehow broken - it won't even start outside of Squish. However I know Qt 6.4.2 worked with 7.1.1, I had tested that myself on macOS recently for some other problem. I also checked Squish 7.2.0 and see the same problem with Qt 6.5.2

       

      The backtrace in my case looks very similar to the ones you posted so far, ending in QtQml's

      QV4::QObjectMethod::callInternal

      function. See the end of the message for a more complete backtrace.

       

      I'm starting to think this might be a bug in Qt and not an issue with Squish itself - Squish just happens to be able to trigger it because it invokes JS code at unfortunate points in time or does something else that triggers a problem with some other changes in Qt 6.5.

       

      I think the next step either way would be to generate a backtrace with a Qt installation with debug information, as to try to get more details about the code location where it actually crashes. This is the backtrace I get from macOS crash report, it is unfortunately still somewhat incomplete due to the JS engine being involved, maybe the webengine team has a way of getting better backtraces or has an idea where the issue is.

       

      0 QtQml 0x10a5d9a94 QV4::QObjectMethod::callInternal(QV4::Value const*, QV4::Value const*, int) const + 484
      1 QtQml 0x10a534ac2 QJSValue::call(QList<QJSValue> const&) const + 386
      2 QtWebEngineQuick 0x108ae7581 QQuickWebEngineViewPrivate::didRunJavaScript(unsigned long long, QVariant const&) + 161
      3 QtWebEngineCore 0x12a168567 0x12a099000 + 849255
      4 QtWebEngineCore 0x12a16f3e3 0x12a099000 + 877539
      5 QtWebEngineCore 0x12ca21294 0x12a099000 + 43549332
      6 QtWebEngineCore 0x12f2ce33b 0x12a099000 + 86201147
      7 QtWebEngineCore 0x12f2d2de8 0x12a099000 + 86220264
      8 QtWebEngineCore 0x12f2cf930 0x12a099000 + 86206768
      9 QtWebEngineCore 0x12f8301a9 0x12a099000 + 91845033
      10 QtWebEngineCore 0x12f82d9d7 0x12a099000 + 91834839
      11 QtWebEngineCore 0x12e94ced7 0x12a099000 + 76234455
      12 QtWebEngineCore 0x12e96af7d 0x12a099000 + 76357501
      13 QtWebEngineCore 0x12e96aa5e 0x12a099000 + 76356190
      14 QtWebEngineCore 0x12e96b625 0x12a099000 + 76359205
      15 QtWebEngineCore 0x12a0d607a 0x12a099000 + 249978
      16 QtCore 0x10b4f7217 QObject::event(QEvent*) + 103
      17 QtCore 0x10b4b0626 QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) + 310
      18 QtCore 0x10b4b023a QCoreApplication::notifyInternal2(QObject*, QEvent*) + 170
      19 QtCore 0x10b4b140c QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 1468
      20 libqcocoa.dylib 0x10a342126 0x10a32a000 + 98598
      21 libqcocoa.dylib 0x10a342b5d 0x10a32a000 + 101213
      22 CoreFoundation 0x7ff8135b915b __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
      23 CoreFoundation 0x7ff8135b90c3 __CFRunLoopDoSource0 + 180
      24 CoreFoundation 0x7ff8135b8e3d __CFRunLoopDoSources0 + 242
      25 CoreFoundation 0x7ff8135b7858 __CFRunLoopRun + 892
      26 CoreFoundation 0x7ff8135b6e1c CFRunLoopRunSpecific + 562
      27 HIToolbox 0x7ff81c2675e6 RunCurrentEventLoopInMode + 292
      28 HIToolbox 0x7ff81c26734a ReceiveNextEventCommon + 594
      29 HIToolbox 0x7ff81c2670e5 _BlockUntilNextEventMatchingListInModeWithFilter + 70
      30 AppKit 0x7ff815ff1f6d _DPSNextEvent + 927
      31 AppKit 0x7ff815ff062a -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1394
      32 libqcocoa.dylib 0x10a340ee7 0x10a32a000 + 93927
      33 QtCore 0x10b4b9a46 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 486
      34 libsquishqtquickwebengine.dylib 0x1393bacb2 Squish::QtWrapper::QtWebkitExtension::QQuickWebEngineViewHandler::internalEvaluateJavaScript(QString const&) + 560
      35 libsquishqtwebkitcommon.dylib 0x1394104a5 Squish::QtWrapper::QtWebkitExtension::WebkitHandler::evaluateJavaScriptWithResult(QString const&, unsigned int) + 49
      36 libsquishqtwebkitcommon.dylib 0x13941056a non-virtual thunk to Squish::QtWrapper::QtWebkitExtension::WebkitHandler::evaluateJavaScriptWithResult(QString const&, unsigned int) + 18
      37 libsquishqtwebkitcommon.dylib 0x1394103ce Squish::QtWrapper::QtWebkitExtension::WebkitHandler::evaluateJavaScript(QString const&) + 34
      38 libsquishqtwebkitcommon.dylib 0x1394108b8 Squish::QtWrapper::QtWebkitExtension::WebkitHandler::hookUp() + 836
      39 libsquishqtwebkitcommon.dylib 0x13941021e Squish::QtWrapper::QtWebkitExtension::WebkitHandler::reinject() + 330
      40 QtCore 0x10b4fef95 0x10b442000 + 774037
      41 QtWebEngineQuick 0x108af2978 0x108ac8000 + 174456
      42 QtCore 0x10b4f7406 QObject::event(QEvent*) + 598
      43 QtCore 0x10b4b0626 QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) + 310
      44 QtCore 0x10b4b023a QCoreApplication::notifyInternal2(QObject*, QEvent*) + 170
      45 QtCore 0x10b4b140c QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 1468
      46 libqcocoa.dylib 0x10a342126 0x10a32a000 + 98598
      47 libqcocoa.dylib 0x10a342b5d 0x10a32a000 + 101213
      48 CoreFoundation 0x7ff8135b915b __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
      49 CoreFoundation 0x7ff8135b90c3 __CFRunLoopDoSource0 + 180
      50 CoreFoundation 0x7ff8135b8e9f __CFRunLoopDoSources0 + 340
      51 CoreFoundation 0x7ff8135b7858 __CFRunLoopRun + 892
      52 CoreFoundation 0x7ff8135b6e1c CFRunLoopRunSpecific + 562
      53 HIToolbox 0x7ff81c2675e6 RunCurrentEventLoopInMode + 292
      54 HIToolbox 0x7ff81c26734a ReceiveNextEventCommon + 594
      55 HIToolbox 0x7ff81c2670e5 _BlockUntilNextEventMatchingListInModeWithFilter + 70
      56 AppKit 0x7ff815ff1f6d _DPSNextEvent + 927
      57 AppKit 0x7ff815ff062a -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1394
      58 AppKit 0x7ff815fe2cd9 -[NSApplication run] + 586
      59 libqcocoa.dylib 0x10a341577 0x10a32a000 + 95607
      60 QtCore 0x10b4b9a46 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 486
      61 QtCore 0x10b4b0827 QCoreApplication::exec() + 119
      62 quicknanobrowser 0x10883483d main + 1229
      63 dyld 0x11410f52e start + 462
      

      "

       

      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
            tero.pelkonen Tero Pelkonen
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes