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

Modal popup causes crash when used in StackView

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.9.3
    • 5.8.0, 5.9.0, 5.9.1, 5.9.2
    • Quick: Controls 2
    • None
    • Ubuntu 16.04 LTS, QT installed with qt-unified-linux-x64-3.0.1

       
    • 8625b79f606fc4e9cbfeed46d9c83bc691aa7464

    Description

      Switching between different items containing modal Popups in a StackView in debug mode causes a crash.

      See attached project. Do the following to reproduce the error.

      • Click "view1"-button (causes view1 to be loaded in StackView)
      • Click "View1, click here!"-button. (causes modal popup to open)
      • Click outside popup to close 
      • Click "view2"-button (causes view2 to be loaded in StackView)
      • Click "view1-button" and a Segmentation Fault occurs.

      Stack trace:

      Thread 1 (Thread 0x7ffff7fc0740 (LWP 2185)):
      #0 QObjectPrivate::addConnection (this=0x0, signal=signal@entry=0, c=c@entry=0xfc6130) at kernel/qobject.cpp:385
      connectionList = <optimized out>
      #1 0x00007ffff7152944 in QObjectPrivate::connectImpl (sender=sender@entry=0xe68d20, signal_index=<optimized out>, receiver=receiver@entry=0x7ffff78a1500 <(anonymous namespace)::Q_QGS_objectReferenceHash::innerFunction()::holder>, slot=slot@entry=0x7fffffffd6d0, slotObj=slotObj@entry=0xe6eaf0, type=Qt::AutoConnection, types=0x0, senderMetaObject=0x7ffff73f2640 <QObject::staticMetaObject>) at kernel/qobject.cpp:4841
      __PRETTY_FUNCTION__ = "static QMetaObject::Connection QObjectPrivate::connectImpl(const QObject*, int, const QObject*, void**, QtPrivate::QSlotObjectBase*, Qt::ConnectionType, const int*, const QMetaObject*)"
      s = 0xe68d20
      r = 0x7ffff78a1500 <(anonymous namespace)::Q_QGS_objectReferenceHash::innerFunction()::holder>
      locker = {mtx1 = 0x7ffff74013a8 <_q_ObjectMutexPool+392>, mtx2 = 0x7ffff7401610 <_q_ObjectMutexPool+1008>, locked = true}
      c = {d = 0xfc6130}
      ret = {d_ptr = 0x6c1780}
      method = {mobj = 0x6b6480, handle = 4144182696}
      #2 0x00007ffff7152c21 in QObject::connectImpl (sender=sender@entry=0xe68d20, signal=signal@entry=0x7fffffffd6c0, receiver=receiver@entry=0x7ffff78a1500 <(anonymous namespace)::Q_QGS_objectReferenceHash::innerFunction()::holder>, slot=slot@entry=0x7fffffffd6d0, slotObj=0xe6eaf0, type=Qt::AutoConnection, types=0x0, senderMetaObject=0x7ffff73f2640 <QObject::staticMetaObject>) at kernel/qobject.cpp:4784
      __PRETTY_FUNCTION__ = "static QMetaObject::Connection QObject::connectImpl(const QObject*, void**, const QObject*, void**, QtPrivate::QSlotObjectBase*, Qt::ConnectionType, const int*, const QMetaObject*)"
      signal_index = 0
      args = {0x7fffffffd5ec, 0x7fffffffd6c0}
      #3 0x00007ffff7769b93 in QObject::connect<void (QObject::*)(QObject*), void ((anonymous namespace)::ObjectReferenceHash::*)(QObject*)> (type=Qt::AutoConnection, slot=(void ((anonymous namespace)::ObjectReferenceHash::*)((anonymous namespace)::ObjectReferenceHash * const, QObject *)) 0x7ffff77697f2 <(anonymous namespace)::ObjectReferenceHash::remove(QObject*)>, receiver=0x7ffff78a1500 <(anonymous namespace)::Q_QGS_objectReferenceHash::innerFunction()::holder>, signal=(void (QObject::*)(QObject * const, QObject *)) 0x7ffff71507b2 <QObject::destroyed(QObject*)>, sender=0xe68d20) at /home/marcusbackman/Qt_/qt5/qtbase/include/QtCore/../../src/corelib/kernel/qobject.h:259
      types = 0x0
      #4 QQmlDebugService::idForObject (object=object@entry=0xe68d20) at debugger/qqmldebugservice.cpp:165
      id = 73
      iter = <optimized out>
      #5 0x00007fffe9e0f1a0 in QQmlEngineDebugServiceImpl::storeObjectIds (this=this@entry=0x6b6480, co=0xe68d20) at qqmlenginedebugservice.cpp:330
      children = {<QListSpecialMethods<QObject*>> = {<No data fields>}, {p = {static shared_null = Reading in symbols for tools/qlist.cpp...done.
      {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, <No data fields>}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x829fd0}, d = 0x829fd0}}
      #6 0x00007fffe9e0f298 in QQmlEngineDebugServiceImpl::buildObjectList (this=this@entry=0x6b6480, message=..., ctxt=0x829fd0, instances=...) at qqmlenginedebugservice.cpp:345
      ctxtName = {static null = Reading in symbols for tools/qstring.cpp...done.
      {<No data fields>}, d = 0x7ffff721dba0 <QArrayData::shared_null>}
      ctxtId = 49
      count = <optimized out>
      child = <optimized out>
      #7 0x00007fffe9e0f2f1 in QQmlEngineDebugServiceImpl::buildObjectList (this=this@entry=0x6b6480, message=..., ctxt=<optimized out>, instances=...) at qqmlenginedebugservice.cpp:361
      ctxtName = {static null = {<No data fields>}, d = 0x7ffff721dba0 <QArrayData::shared_null>}
      ctxtId = 32
      count = <optimized out>
      child = 0x77ae80
      #8 0x00007fffe9e0f2f1 in QQmlEngineDebugServiceImpl::buildObjectList (this=this@entry=0x6b6480, message=..., ctxt=<optimized out>, instances=...) at qqmlenginedebugservice.cpp:361
      ctxtName = {static null = {<No data fields>}, d = 0x7ffff721dba0 <QArrayData::shared_null>}
      ctxtId = 6
      count = <optimized out>
      child = 0x6c1780
      #9 0x00007fffe9e0f2f1 in QQmlEngineDebugServiceImpl::buildObjectList (this=this@entry=0x6b6480, message=..., ctxt=ctxt@entry=0x6b1060, instances=...) at qqmlenginedebugservice.cpp:361
      ctxtName = {static null = {<No data fields>}, d = 0x7ffff721dba0 <QArrayData::shared_null>}
      ctxtId = 5
      count = <optimized out>
      child = 0x6c0c30
      #10 0x00007fffe9e13644 in QQmlEngineDebugServiceImpl::processMessage (this=0x6b6480, message=...) at qqmlenginedebugservice.cpp:484
      rootContext = 0x6b1060
      engineId = 0
      ds = {<QPacket> = {<QDataStream> = {d = {d = Reading in symbols for io/qdatastream.cpp...done.
      0x0}, dev = 0x7fffffffda60, owndev = false, noswap = false, byteorder = QDataStream::BigEndian, ver = 17, q_status = QDataStream::Ok}, buf = {<QIODevice> = {<QObject> = {_vptr.QObject = 0x7ffff73f70d0 <vtable for QBuffer+16>, static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x7ffff72df1c0 <qt_meta_stringdata_QObject>, data = 0x7ffff72df0a0 <qt_meta_data_QObject>, static_metacall = 0x7ffff7157972 <QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, d_ptr = {d = 0x77b6b0}, static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 0x7ffff72e1e40 <qt_meta_stringdata_Qt>, data = 0x7ffff72df2e0 <qt_meta_data_Qt>, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}}}, static staticMetaObject = {d = {superdata = 0x7ffff73f2640 <QObject::staticMetaObject>, stringdata = 0x7ffff72c7600 <qt_meta_stringdata_QIODevice>, data = 0x7ffff72c7500 <qt_meta_data_QIODevice>, static_metacall = 0x7ffff704f790 <QIODevice::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}}, static staticMetaObject = {d = {superdata = 0x7ffff73f76e0 <QIODevice::staticMetaObject>, stringdata = 0x7ffff72a7ac0 <qt_meta_stringdata_QBuffer>, data = 0x7ffff72a7a60 <qt_meta_data_QBuffer>, static_metacall = 0x7ffff7031ca6 <QBuffer::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}}}, <No data fields>}
      type = {d = 0xf65dd0}
      queryId = 10
      rs = {<QPacket> = {<QDataStream> = {d = {d = 0x0}, dev = 0x7fffffffda90, owndev = false, noswap = false, byteorder = QDataStream::BigEndian, ver = 17, q_status = QDataStream::Ok}, buf = {<QIODevice> = {<QObject> = {_vptr.QObject = 0x7ffff73f70d0 <vtable for QBuffer+16>, static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x7ffff72df1c0 <qt_meta_stringdata_QObject>, data = 0x7ffff72df0a0 <qt_meta_data_QObject>, static_metacall = 0x7ffff7157972 <QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, d_ptr = {d = 0xa59430}, static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 0x7ffff72e1e40 <qt_meta_stringdata_Qt>, data = 0x7ffff72df2e0 <qt_meta_data_Qt>, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}}}, static staticMetaObject = {d = {superdata = 0x7ffff73f2640 <QObject::staticMetaObject>, stringdata = 0x7ffff72c7600 <qt_meta_stringdata_QIODevice>, data = 0x7ffff72c7500 <qt_meta_data_QIODevice>, static_metacall = 0x7ffff704f790 <QIODevice::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}}, static staticMetaObject = {d = {superdata = 0x7ffff73f76e0 <QIODevice::staticMetaObject>, stringdata = 0x7ffff72a7ac0 <qt_meta_stringdata_QBuffer>, data = 0x7ffff72a7a60 <qt_meta_data_QBuffer>, static_metacall = 0x7ffff7031ca6 <QBuffer::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}}}, <No data fields>}
      #11 0x00007fffe9e1486c in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QByteArray const&>, void, void (QQmlEngineDebugServiceImpl::*)(QByteArray const&)>::call (arg=<optimized out>, o=<optimized out>, f=<optimized out>) at /home/marcusbackman/Qt_/qt5/qtbase/include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:136
      No locals.
      #12 QtPrivate::FunctionPointer<void (QQmlEngineDebugServiceImpl::*)(QByteArray const&)>::call<QtPrivate::List<QByteArray const&>, void> (arg=<optimized out>, o=<optimized out>, f=<optimized out>) at /home/marcusbackman/Qt_/qt5/qtbase/include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:169
      No locals.
      #13 QtPrivate::QSlotObject<void (QQmlEngineDebugServiceImpl::*)(QByteArray const&), QtPrivate::List<QByteArray const&>, void>::impl (which=<optimized out>, this_=<optimized out>, r=<optimized out>, a=<optimized out>, ret=<optimized out>) at /home/marcusbackman/Qt_/qt5/qtbase/include/QtCore/../../src/corelib/kernel/qobject_impl.h:120
      No locals.
      #14 0x00007ffff714c3ed in QtPrivate::QSlotObjectBase::call (a=<optimized out>, r=0x6b6480, this=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qobject_impl.h:101
      No locals.
      #15 QMetaCallEvent::placeMetaCall (this=0x7fffd4009c50, object=0x6b6480) at kernel/qobject.cpp:501
      No locals.
      #16 0x00007ffff7150bee in QObject::event (this=0x6b6480, e=<optimized out>) at kernel/qobject.cpp:1246
      mce = <optimized out>
      sw = {receiver = 0x6b6480, previousSender = 0x0, currentSender = {sender = 0x6b6480, signal = 7, ref = 1}, switched = true}
      #17 0x00007ffff712009d in QCoreApplicationPrivate::notify_helper (receiver=receiver@entry=0x6b6480, event=event@entry=0x7fffd4009c50) at kernel/qcoreapplication.cpp:1152
      No locals.
      #18 0x00007ffff712012b in doNotify (receiver=receiver@entry=0x6b6480, event=event@entry=0x7fffd4009c50) at kernel/qcoreapplication.cpp:1093
      __PRETTY_FUNCTION__ = "bool doNotify(QObject*, QEvent*)"
      #19 0x00007ffff7120269 in QCoreApplication::notify (this=this@entry=0x7fffffffe080, receiver=receiver@entry=0x6b6480, event=event@entry=0x7fffd4009c50) at kernel/qcoreapplication.cpp:1079
      No locals.
      #20 0x00007ffff79bfdce in QGuiApplication::notify (this=0x7fffffffe080, object=0x6b6480, event=0x7fffd4009c50) at kernel/qguiapplication.cpp:1688
      No locals.
      #21 0x00007ffff71201f4 in QCoreApplication::notifyInternal2 (receiver=receiver@entry=0x6b6480, event=event@entry=0x7fffd4009c50) at kernel/qcoreapplication.cpp:1018
      selfRequired = true
      result = false
      cbdata = {0x6b6480, 0x7fffd4009c50, 0x7fffffffdc8f}
      d = <optimized out>
      threadData = 0x61bdc0
      #22 0x00007ffff7125651 in QCoreApplication::sendEvent (event=0x7fffd4009c50, receiver=0x6b6480) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:233
      No locals.
      #23 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x61bdc0) at kernel/qcoreapplication.cpp:1678
      e = 0x7fffd4009c50
      r = 0x6b6480
      __PRETTY_FUNCTION__ = "static void QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)"
      locker = {val = 6405616}
      startOffset = 0
      i = @0x61bde4: 1
      cleanup = {receiver = 0x0, event_type = 0, data = 0x61bdc0, exceptionCaught = true}
      #24 0x00007ffff7125a3a in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1532
      data = <optimized out>
      #25 0x00007ffff717b8da in postEventSourceDispatch (s=0x657630) at kernel/qeventdispatcher_glib.cpp:276
      source = 0x657630
      #26 0x00007ffff4868197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
      No symbol table info available.
      #27 0x00007ffff48683f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
      No symbol table info available.
      #28 0x00007ffff486849c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
      No symbol table info available.
      #29 0x00007ffff717b1e9 in QEventDispatcherGlib::processEvents (this=0x657710, flags=...) at kernel/qeventdispatcher_glib.cpp:423
      d = 0x65b0d0
      canWait = true
      savedFlags = <optimized out>
      result = <optimized out>
      #30 0x00007ffff7f5038a in QPAEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at qeventdispatcher_glib.cpp:122
      No locals.
      #31 0x00007ffff711df61 in QEventLoop::processEvents (this=this@entry=0x7fffffffdfe0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:134
      d = <optimized out>
      #32 0x00007ffff711e3da in QEventLoop::exec (this=this@entry=0x7fffffffdfe0, flags=flags@entry=...) at kernel/qeventloop.cpp:212
      d = 0x7f0380
      locker = {val = 6405312}
      __PRETTY_FUNCTION__ = "int QEventLoop::exec(QEventLoop::ProcessEventsFlags)"
      ref = {d = 0x7f0380, locker = @0x7fffffffdf40, exceptionCaught = true}
      #33 0x00007ffff7127e26 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1291
      threadData = 0x61bdc0
      __PRETTY_FUNCTION__ = "static int QCoreApplication::exec()"
      eventLoop = {<QObject> = {_vptr.QObject = 0x7ffff73fa2e8 <vtable for QEventLoop+16>, static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x7ffff72df1c0 <qt_meta_stringdata_QObject>, data = 0x7ffff72df0a0 <qt_meta_data_QObject>, static_metacall = 0x7ffff7157972 <QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, d_ptr = {d = 0x7f0380}, static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 0x7ffff72e1e40 <qt_meta_stringdata_Qt>, data = 0x7ffff72df2e0 <qt_meta_data_Qt>, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}}}, static staticMetaObject = {d = {superdata = 0x7ffff73f2640 <QObject::staticMetaObject>, stringdata = 0x7ffff72da180 <qt_meta_stringdata_QEventLoop>, data = 0x7ffff72da120 <qt_meta_data_QEventLoop>, static_metacall = 0x7ffff711e07e <QEventLoop::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}}
      returnCode = <optimized out>
      #34 0x00007ffff79bacc2 in QGuiApplication::exec () at kernel/qguiapplication.cpp:1679
      No locals.
      #35 0x0000000000400ef7 in main (Reading in symbols for ../sysdeps/x86/libc-start.c...done.
      argc=1, argv=0x7fffffffe1a8) at ../modal-popup/main.cpp:11
      app = {<QCoreApplication> = {<QObject> = {_vptr.QObject = 0x7ffff7dc2048 <vtable for QGuiApplication+16>, static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x7ffff72df1c0 <qt_meta_stringdata_QObject>, data = 0x7ffff72df0a0 <qt_meta_data_QObject>, static_metacall = 0x7ffff7157972 <QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, d_ptr = {d = 0x61c1e0}, static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 0x7ffff72e1e40 <qt_meta_stringdata_Qt>, data = 0x7ffff72df2e0 <qt_meta_data_Qt>, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}}}, static staticMetaObject = {d = {superdata = 0x7ffff73f2640 <QObject::staticMetaObject>, stringdata = 0x7ffff72da760 <qt_meta_stringdata_QCoreApplication>, data = 0x7ffff72da640 <qt_meta_data_QCoreApplication>, static_metacall = 0x7ffff7121cda <QCoreApplication::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, static self = 0x7fffffffe080}, static staticMetaObject = {d = {superdata = 0x7ffff73fa480 <QCoreApplication::staticMetaObject>, stringdata = 0x7ffff7cf5ca0 <qt_meta_stringdata_QGuiApplication>, data = 0x7ffff7cf5a40 <qt_meta_data_QGuiApplication>, static_metacall = 0x7ffff79c541e <QGuiApplication::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}}
      engine = Reading in symbols for qml/qqmlapplicationengine.cpp...done.
      Reading in symbols for jsapi/qjsengine.cpp...done.
      {<QQmlEngine> = {<QJSEngine> = {<QObject> = {_vptr.QObject = 0x7ffff7894570 <vtable for QQmlApplicationEngine+16>, static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x7ffff72df1c0 <qt_meta_stringdata_QObject>, data = 0x7ffff72df0a0 <qt_meta_data_QObject>, static_metacall = 0x7ffff7157972 <QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, d_ptr = {d = 0x66c270}, static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 0x7ffff72e1e40 <qt_meta_stringdata_Qt>, data = 0x7ffff72df2e0 <qt_meta_data_Qt>, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}}}, static staticMetaObject = {d = {superdata = 0x7ffff73f2640 <QObject::staticMetaObject>, stringdata = 0x7ffff77c6920 <qt_meta_stringdata_QJSEngine>, data = 0x7ffff77c68e0 <qt_meta_data_QJSEngine>, static_metacall = 0x7ffff754e2ea <QJSEngine::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, d = Reading in symbols for qml/v8/qv8engine.cpp...done.
      0x66cac0}, static staticMetaObject = {d = {superdata = 0x7ffff78901e0 <QJSEngine::staticMetaObject>, stringdata = 0x7ffff77fbb60 <qt_meta_stringdata_QQmlEngine>, data = 0x7ffff77fbac0 <qt_meta_data_QQmlEngine>, static_metacall = 0x7ffff7695288 <QQmlEngine::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}}, static staticMetaObject = {d = {superdata = 0x7ffff7892640 <QQmlEngine::staticMetaObject>, stringdata = 0x7ffff7803ae0 <qt_meta_stringdata_QQmlApplicationEngine>, data = 0x7ffff78039e0 <qt_meta_data_QQmlApplicationEngine>, static_metacall = 0x7ffff773b0ea <QQmlApplicationEngine::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}}
      Current language: auto
      The current source language is "auto; currently c++".
      

       edit: Added stack trace using debug libraries. It seems that Q_ASSERT(c->sender == q_ptr); in addConnection() is fulfilled. Similiar to QTBUG-62553?

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-63672
          # Subject Branch Project Status CR V

          Activity

            People

              Unassigned Unassigned
              luki Marcus Bäckman
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes