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

Registering object with no parent crashes Qt

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.7.0 FF
    • 4.7.2, 6.6.0
    • D-Bus
    • None
    • 7169ea71b (dev)
    • Foundations Sprint 96

    Description

      Attached example crashes because Pong was give no parent. It works, if it's given a dummy parent (like in the complexpingpong example).

      It also doesn't crash if Pong derives from QObject instead of QDBusAbstractAdaptor.

      #0 0x00007ffff7b6c142 in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::operator-> (this=0x8) at ../../include/QtCore/qscopedpointer.h:112
      #1 0x00007ffff7b6ab98 in QObject::children (this=0x0) at ../../include/QtCore/qobject.h:191
      #2 0x00007ffff7b8b688 in QDBusAdaptorConnector::polish (this=0x61afe0) at /home/girish/Qt/qt-4.7/src/dbus/qdbusabstractadaptor.cpp:254
      #3 0x00007ffff7b8bad4 in QDBusAdaptorConnector::qt_metacall (this=0x61afe0, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x61b330) at /home/girish/Qt/qt-4.7/src/dbus/qdbusabstractadaptor.cpp:367
      #4 0x00007ffff673e0f1 in QMetaObject::metacall (object=0x61afe0, cl=QMetaObject::InvokeMetaMethod, idx=5, argv=0x61b330) at /home/girish/Qt/qt-4.7/src/corelib/kernel/qmetaobject.cpp:237
      #5 0x00007ffff674e9bc in QMetaCallEvent::placeMetaCall (this=0x6118b0, object=0x61afe0) at /home/girish/Qt/qt-4.7/src/corelib/kernel/qobject.cpp:535
      #6 0x00007ffff6750eab in QObject::event (this=0x61afe0, e=0x6118b0) at /home/girish/Qt/qt-4.7/src/corelib/kernel/qobject.cpp:1217
      #7 0x00007ffff6735ac4 in QCoreApplicationPrivate::notify_helper (this=0x60c480, receiver=0x61afe0, event=0x6118b0) at /home/girish/Qt/qt-4.7/src/corelib/kernel/qcoreapplication.cpp:922
      #8 0x00007ffff673584e in QCoreApplication::notify (this=0x7fffffffde00, receiver=0x61afe0, event=0x6118b0) at /home/girish/Qt/qt-4.7/src/corelib/kernel/qcoreapplication.cpp:868
      #9 0x00007ffff67356ee in QCoreApplication::notifyInternal (this=0x7fffffffde00, receiver=0x61afe0, event=0x6118b0) at /home/girish/Qt/qt-4.7/src/corelib/kernel/qcoreapplication.cpp:787
      #10 0x00007ffff6ceddc9 in QCoreApplication::sendEvent (receiver=0x61afe0, event=0x6118b0) at ../../include/QtCore/qcoreapplication.h:215
      #11 0x00007ffff673693d in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x60c560) at /home/girish/Qt/qt-4.7/src/corelib/kernel/qcoreapplication.cpp:1428
      #12 0x00007ffff673655d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /home/girish/Qt/qt-4.7/src/corelib/kernel/qcoreapplication.cpp:1321
      #13 0x00007ffff6de2543 in QCoreApplication::sendPostedEvents () at ../../include/QtCore/qcoreapplication.h:220
      #14 0x00007ffff6773aad in postEventSourceDispatch (s=0x610160) at /home/girish/Qt/qt-4.7/src/corelib/kernel/qeventdispatcher_glib.cpp:277
      #15 0x00007ffff4f1b342 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
      #16 0x00007ffff4f1f2a8 in ?? () from /lib/libglib-2.0.so.0
      #17 0x00007ffff4f1f45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
      #18 0x00007ffff6774e01 in QEventDispatcherGlib::processEvents (this=0x60d820, flags=...) at /home/girish/Qt/qt-4.7/src/corelib/kernel/qeventdispatcher_glib.cpp:422
      #19 0x00007ffff6732710 in QEventLoop::processEvents (this=0x7fffffffdd80, flags=...) at /home/girish/Qt/qt-4.7/src/corelib/kernel/qeventloop.cpp:149
      #20 0x00007ffff6732866 in QEventLoop::exec (this=0x7fffffffdd80, flags=...) at /home/girish/Qt/qt-4.7/src/corelib/kernel/qeventloop.cpp:201
      #21 0x00007ffff6735dea in QCoreApplication::exec () at /home/girish/Qt/qt-4.7/src/corelib/kernel/qcoreapplication.cpp:1064
      #22 0x0000000000402fbd in main ()

      Attachments

        1. main.cpp
          1.0 kB
          Girish Ramakrishnan
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ievgenii.meshcheriakov Ievgenii Meshcheriakov
            girish Girish Ramakrishnan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes