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

Crash in QQmlContextPrivate::dropDestroyedQObject due to null IdentifierTable [regression in Qt 5.14]

    XMLWordPrintable

    Details

    • Platform/s:
      Linux/X11
    • Commits:
      03196c9a0f1635ce78cf53addb6b688108f66fae

      Description

      Since I upgraded to the 5.14 git branch, kscreenlocker_greet (the plasma lock screen) crashes on exit (after typing the correct password).

      Thread 1 "kscreenlocker_g" received signal SIGSEGV, Segmentation fault.
      0x00007f40175a3d81 in QV4::IdentifierTable::insertString (this=0x0, s=...)
          at /d/qt/5/kde/qtdeclarative/src/qml/jsruntime/qv4identifiertable.cpp:145
      145         uint idx = hash % alloc;
      #0  0x00007f40175a3d81 in QV4::IdentifierTable::insertString (this=0x0, s=...)
          at /d/qt/5/kde/qtdeclarative/src/qml/jsruntime/qv4identifiertable.cpp:145
      #1  0x00007f40175a4669 in QV4::IdentifierTable::asPropertyKey (this=0x0, s=...)
          at /d/qt/5/kde/qtdeclarative/src/qml/jsruntime/qv4identifiertable.cpp:283
      #2  0x00007f40175a2d27 in QV4::IdentifierHash::lookup (this=0x5647136d0a18, str=...)
          at /d/qt/5/kde/qtdeclarative/src/qml/jsruntime/qv4identifier.cpp:155
      #3  0x00007f4017762297 in QV4::IdentifierHash::value (this=0x5647136d0a18, str=...)
          at ../../include/QtQml/5.14.0/QtQml/private/../../../../../../../qtdeclarative/src/qml/jsruntime/qv4identifier_p.h:159
      #4  0x00007f40177607ef in QQmlContextPrivate::dropDestroyedQObject (this=0x5647136d0960, name=..., destroyed=0x564713913480)
          at /d/qt/5/kde/qtdeclarative/src/qml/qml/qqmlcontext.cpp:535
      #5  0x00007f401775fbb4 in QQmlContext::<lambda(QObject*)>::operator()(QObject *) const (__closure=0x5647136061a0, 
          destroyed=0x564713913480) at /d/qt/5/kde/qtdeclarative/src/qml/qml/qqmlcontext.cpp:323
      #6  0x00007f40177620b2 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<QObject*>, void, QQmlContext::setContextProperty(const QString&, const QVariant&)::<lambda(QObject*)> >::call(QQmlContext::<lambda(QObject*)> &, void **) (f=..., 
          arg=0x7ffdd0619860) at /d/qt/5/kde/build/qtbase/include/QtCore/../../../../qtbase/src/corelib/kernel/qobjectdefs_impl.h:146
      #7  0x00007f4017762082 in QtPrivate::Functor<QQmlContext::setContextProperty(const QString&, const QVariant&)::<lambda(QObject*)>, 1>::call<QtPrivate::List<QObject*>, void>(QQmlContext::<lambda(QObject*)> &, void *, void **) (f=..., arg=0x7ffdd0619860)
          at /d/qt/5/kde/build/qtbase/include/QtCore/../../../../qtbase/src/corelib/kernel/qobjectdefs_impl.h:256
      #8  0x00007f4017762050 in QtPrivate::QFunctorSlotObject<QQmlContext::setContextProperty(const QString&, const QVariant&)::<lambda(QObject*)>, 1, QtPrivate::List<QObject*>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *) (
          which=1, this_=0x564713606190, r=0x5647136d0940, a=0x7ffdd0619860, ret=0x0)
          at /d/qt/5/kde/build/qtbase/include/QtCore/../../../../qtbase/src/corelib/kernel/qobjectdefs_impl.h:439
      #9  0x00007f4015f77211 in QtPrivate::QSlotObjectBase::call (this=0x564713606190, r=0x5647136d0940, a=0x7ffdd0619860)
          at ../../include/QtCore/../../../../qtbase/src/corelib/kernel/qobjectdefs_impl.h:394
      #10 0x00007f4015fb4e20 in doActivate<false> (sender=0x564713913480, signal_index=0, argv=0x7ffdd0619860)
          at /d/qt/5/kde/qtbase/src/corelib/kernel/qobject.cpp:3870
      #11 0x00007f4015faecbb in QMetaObject::activate (sender=0x564713913480, m=0x7f401652cc20 <QObject::staticMetaObject>, 
          local_signal_index=0, argv=0x7ffdd0619860) at /d/qt/5/kde/qtbase/src/corelib/kernel/qobject.cpp:3929
      #12 0x00007f4015fb197f in QObject::destroyed (this=0x564713913480, _t1=0x564713913480) at .moc/moc_qobject.cpp:219
      #13 0x00007f4015fa7ee3 in QObject::~QObject (this=0x564713913480, __in_chrg=<optimized out>)
          at /d/qt/5/kde/qtbase/src/corelib/kernel/qobject.cpp:1017
      #14 0x00007f4018297f49 in QQuickItem::~QQuickItem (this=0x564713913480, __in_chrg=<optimized out>)
          at /d/qt/5/kde/qtdeclarative/src/quick/items/qquickitem.cpp:2383
      #15 0x00007f4004b97996 in QQuickControl::~QQuickControl (this=0x564713913480, __in_chrg=<optimized out>)
          at /d/qt/5/kde/qtquickcontrols2/src/quicktemplates2/qquickcontrol.cpp:932
      #16 0x00007f4004bf5b07 in QQuickStackView::~QQuickStackView (this=0x564713913480, __in_chrg=<optimized out>)
          at /d/qt/5/kde/qtquickcontrols2/src/quicktemplates2/qquickstackview.cpp:385
      #17 0x00007f3fe7dce4b9 in QQmlPrivate::QQmlElement<QQuickStackView>::~QQmlElement (this=0x564713913480, 
          __in_chrg=<optimized out>)
          at /d/qt/5/kde/build/qtdeclarative/include/QtQml/../../../../qtdeclarative/src/qml/qml/qqmlprivate.h:110
      #18 0x00007f3fe7dce4da in QQmlPrivate::QQmlElement<QQuickStackView>::~QQmlElement (this=0x564713913480, 
          __in_chrg=<optimized out>)
          at /d/qt/5/kde/build/qtdeclarative/include/QtQml/../../../../qtdeclarative/src/qml/qml/qqmlprivate.h:110
      #19 0x00007f401932dfcc in KDeclarative::QmlObjectPrivate::~QmlObjectPrivate (this=0x564713913ea0, __in_chrg=<optimized out>)
          at /d/kde/src/5/frameworks/kdeclarative/src/kdeclarative/qmlobject.cpp:71
      #20 KDeclarative::QmlObject::~QmlObject (this=0x564713917c10, __in_chrg=<optimized out>)
          at /d/kde/src/5/frameworks/kdeclarative/src/kdeclarative/qmlobject.cpp:199
      #21 0x00007f401932ebd9 in KDeclarative::QmlObjectSharedEngine::~QmlObjectSharedEngine (this=0x564713917c10, 
          __in_chrg=<optimized out>) at /d/kde/src/5/frameworks/kdeclarative/src/kdeclarative/qmlobjectsharedengine.cpp:76
      #22 0x00007f4015fa9e67 in QObjectPrivate::deleteChildren (this=0x5647135003d0)
          at /d/qt/5/kde/qtbase/src/corelib/kernel/qobject.cpp:2123
      #23 0x00007f4015fa8398 in QObject::~QObject (this=0x56471351a3e0, __in_chrg=<optimized out>)
          at /d/qt/5/kde/qtbase/src/corelib/kernel/qobject.cpp:1107
      #24 0x00007f40166a9964 in QWindow::~QWindow (this=0x56471351a3e0, __in_chrg=<optimized out>)
          at /d/qt/5/kde/qtbase/src/gui/kernel/qwindow.cpp:214
      #25 0x00007f40182c9a05 in QQuickWindow::~QQuickWindow (this=0x56471351a3e0, __in_chrg=<optimized out>)
          at /d/qt/5/kde/qtdeclarative/src/quick/items/qquickwindow.cpp:1400
      #26 0x00007f401ac864a9 in KQuickAddons::QuickViewSharedEngine::~QuickViewSharedEngine (this=0x56471351a3e0, 
          __in_chrg=<optimized out>) at /d/kde/src/5/frameworks/kdeclarative/src/quickaddons/quickviewsharedengine.cpp:149
      #27 0x00005647122c3e4f in qDeleteAll<QList<KQuickAddons::QuickViewSharedEngine*>::const_iterator> (end=..., begin=...)
          at /d/qt/5/inst/include/QtCore/qalgorithms.h:320
      #28 qDeleteAll<QList<KQuickAddons::QuickViewSharedEngine*> > (c=...) at /d/qt/5/inst/include/QtCore/qalgorithms.h:328
      #29 ScreenLocker::UnlockApp::~UnlockApp (this=0x7ffdd0619e80, __in_chrg=<optimized out>)
          at /d/kde/src/5/kde/workspace/kscreenlocker/greeter/greeterapp.cpp:147
      #30 0x00005647122bfcc1 in main (argc=<optimized out>, argv=<optimized out>)
          at /d/kde/src/5/kde/workspace/kscreenlocker/greeter/main.cpp:87
      

      If I add an early-return for d->identifierTable being null [even though I don't see how this could happen], then it asserts "idx >= 0" in qqmlcontext.cpp:536 instead, still in QQmlContextPrivate::dropDestroyedQObject.

      I tried a valgrind memcheck run, and it said everything was clean, this is apparently not memory corruption.

        Attachments

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

          Activity

            People

            Assignee:
            ulherman Ulf Hermann
            Reporter:
            dfaure_kdab David Faure
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes