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

[REG: Qt 5.4 -> 5.5] Dynamically deleted WebView object makes the application crash

    XMLWordPrintable

Details

    Description

      When destroying WebView object dynamically the whole application crashes.
      The issue can be reproduced at least on iPhone 6 but also iPad mini (iOS 8.3), Samsung tab3 (4.4.4) and HTC 817 has been reported to suffer from this but I'm unable to confirm those platforms.

      iPhone 5C/5S seems unaffected by this issue.

      Use the attached test application to reproduce the crash. After loading the web content click "Destroy" button and the application crashes.

      Backtrace:

      (lldb) bt
      * thread #1: tid = 0x1ce178, 0x000000010074ca9c TestWebView`QQuickItem::~QQuickItem(this=0x000000017467ee80) + 452 at qquickitem.cpp:2248, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xbadd875d60b7bf15)
          frame #0: 0x000000010074ca9c TestWebView`QQuickItem::~QQuickItem(this=0x000000017467ee80) + 452 at qquickitem.cpp:2248
          frame #1: 0x000000010048f744 TestWebView`QQuickViewController::~QQuickViewController(this=0x000000017467ee80) + 84 at qquickviewcontroller.cpp:164
          frame #2: 0x000000010048bb90 TestWebView`QQuickWebView::~QQuickWebView(this=0x000000017467ee80) + 60 at qquickwebview.cpp:104
          frame #3: 0x0000000100486d44 TestWebView`QQmlPrivate::QQmlElement<QQuickWebView>::~QQmlElement(this=0x000000017467ee80) + 88 at qqmlprivate.h:98
        * frame #4: 0x0000000100486bc4 TestWebView`QQmlPrivate::QQmlElement<QQuickWebView>::~QQmlElement(this=0x000000017467ee80) + 28 at qqmlprivate.h:96
          frame #5: 0x0000000100486bf8 TestWebView`QQmlPrivate::QQmlElement<QQuickWebView>::~QQmlElement(this=0x000000017467ee80) + 28 at qqmlprivate.h:96
          frame #6: 0x000000010147816c TestWebView`QObjectPrivate::deleteChildren(this=0x0000000146d1e4f0) + 264 at qobject.cpp:1951
          frame #7: 0x0000000101477f04 TestWebView`QObject::~QObject(this=0x00000001740339c0) + 2216 at qobject.cpp:1031
          frame #8: 0x000000010074ce74 TestWebView`QQuickItem::~QQuickItem(this=0x00000001740339c0) + 1436 at qquickitem.cpp:2289
          frame #9: 0x00000001007c5ce0 TestWebView`QQuickRectangle::~QQuickRectangle(this=0x00000001740339c0) + 36 at qquickrectangle_p.h:128
          frame #10: 0x00000001007c5ca4 TestWebView`QQmlPrivate::QQmlElement<QQuickRectangle>::~QQmlElement(this=0x00000001740339c0) + 76 at qqmlprivate.h:98
          frame #11: 0x00000001007c5b9c TestWebView`QQmlPrivate::QQmlElement<QQuickRectangle>::~QQmlElement(this=0x00000001740339c0) + 28 at qqmlprivate.h:96
          frame #12: 0x00000001007c5bd0 TestWebView`QQmlPrivate::QQmlElement<QQuickRectangle>::~QQmlElement(this=0x00000001740339c0) + 28 at qqmlprivate.h:96
          frame #13: 0x0000000101478dec TestWebView`qDeleteInEventHandler(o=0x00000001740339c0) + 56 at qobject.cpp:4460
          frame #14: 0x00000001014789d4 TestWebView`QObject::event(this=0x00000001740339c0, e=0x0000000170625560) + 300 at qobject.cpp:1237
          frame #15: 0x000000010075af64 TestWebView`QQuickItem::event(this=0x00000001740339c0, ev=0x0000000170625560) + 1212 at qquickitem.cpp:7294
          frame #16: 0x000000010006a590 TestWebView`QApplicationPrivate::notify_helper(this=0x0000000146e20a30, receiver=0x00000001740339c0, e=0x0000000170625560) + 396 at qapplication.cpp:3717
          frame #17: 0x000000010006c4e4 TestWebView`QApplication::notify(this=0x000000016fdf3ed0, receiver=0x00000001740339c0, e=0x0000000170625560) + 1656 at qapplication.cpp:3161
          frame #18: 0x00000001014399f0 TestWebView`QCoreApplication::notifyInternal(this=0x000000016fdf3ed0, receiver=0x00000001740339c0, event=0x0000000170625560) + 192 at qcoreapplication.cpp:965
          frame #19: 0x000000010007266c TestWebView`QCoreApplication::sendEvent(receiver=0x00000001740339c0, event=0x0000000170625560) + 112 at qcoreapplication.h:224
          frame #20: 0x000000010143ae4c TestWebView`QCoreApplicationPrivate::sendPostedEvents(receiver=0x0000000000000000, event_type=0, data=0x00000001740d5ee0) + 1336 at qcoreapplication.cpp:1593
          frame #21: 0x000000010143a2e0 TestWebView`QCoreApplication::sendPostedEvents(receiver=0x0000000000000000, event_type=0) + 52 at qcoreapplication.cpp:1451
          frame #22: 0x0000000100043570 TestWebView`QEventDispatcherCoreFoundation::processPostedEvents(this=0x00000001741a32c0) + 236 at qeventdispatcher_cf.mm:384
          frame #23: 0x0000000100046068 TestWebView`RunLoopSource<QEventDispatcherCoreFoundation>::process(info=0x00000001741a32d0) + 108 at qeventdispatcher_cf_p.h:139
          frame #24: 0x0000000185b70240 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
          frame #25: 0x0000000185b6f4e4 CoreFoundation`__CFRunLoopDoSources0 + 264
          frame #26: 0x0000000185b6d594 CoreFoundation`__CFRunLoopRun + 712
          frame #27: 0x0000000185a992d4 CoreFoundation`CFRunLoopRunSpecific + 396
          frame #28: 0x000000018f4ef6fc GraphicsServices`GSEventRunModal + 168
          frame #29: 0x000000018a696f40 UIKit`UIApplicationMain + 1488
          frame #30: 0x0000000100016d40 TestWebView`main(argc=1, argv=0x000000016fdf79e0) + 516 at qioseventdispatcher.mm:224
          frame #31: 0x0000000197f2ea08 libdyld.dylib`start + 4
      

      Attachments

        Issue Links

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

          Activity

            People

              stromme Christian
              kileppal Kimmo Leppälä
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes