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

Qt Creator crash on exit accessing destroyed event dispatcher

    XMLWordPrintable

Details

    • c8d3d7a7a (dev), 2a613662a (6.9), 8c4e99f7d (tqtc/lts-6.8)

    Description

      Backtrace:

      #0  0x00007fa07abbeb4e in QtPrivate::QMetaTypeForType<QList<QString> >::getMoveCtr()::{lambda(QtPrivate::QMetaTypeInterface const*, void*, void*)#1}::_FUN(QtPrivate::QMetaTypeInterface const*, void*, void*) () at /home/tjmaciei/obj/qt/installed/bin/../lib64/libQt6Core.t.so.6
      #1  0x00007fa07ab89249 in QBasicTimer::stop() () at /home/tjmaciei/obj/qt/installed/bin/../lib64/libQt6Core.t.so.6
      #2  0x00007fa07abffae9 in QSingleShotTimer::~QSingleShotTimer() () at /home/tjmaciei/obj/qt/installed/bin/../lib64/libQt6Core.t.so.6
      #3  0x00007fa07abe0041 in QObjectPrivate::deleteChildren() () at /home/tjmaciei/obj/qt/installed/bin/../lib64/libQt6Core.t.so.6
      #4  0x00007fa07abe672a in QObject::~QObject() () at /home/tjmaciei/obj/qt/installed/bin/../lib64/libQt6Core.t.so.6
      #5  0x00007fa07bd24826 in QPAEventDispatcherGlib::~QPAEventDispatcherGlib() () at /home/tjmaciei/obj/qt/installed/bin/../lib64/libQt6Gui.t.so.6
      #6  0x00007fa07b7e47a5 in QGuiApplication::~QGuiApplication() () at /home/tjmaciei/obj/qt/installed/bin/../lib64/libQt6Gui.t.so.6
      #7  0x0000000000419669 in SharedTools::QtSingleApplication::~QtSingleApplication ()
          at /home/tjmaciei/src/qt/qt-creator/src/shared/qtsingleapplication/qtsingleapplication.cpp:104
      #8  0x000000000040daf3 in std::default_delete<SharedTools::QtSingleApplication>::operator() () at /usr/include/c++/14/bits/unique_ptr.h:93
      #9  std::unique_ptr<SharedTools::QtSingleApplication, std::default_delete<SharedTools::QtSingleApplication> >::~unique_ptr ()
          at /usr/include/c++/14/bits/unique_ptr.h:399
      #10 main () at /home/tjmaciei/src/qt/qt-creator/src/app/main.cpp:1022
      

      Frame 0 appears to be nonsense (jump to wrong address). Frame 1 is:

      void QBasicTimer::stop()
      {
          if (isActive()) {
              QAbstractEventDispatcher *eventDispatcher = QAbstractEventDispatcher::instance();
              if (eventDispatcher && !eventDispatcher->unregisterTimer(m_id)) {
                  qWarning("QBasicTimer::stop: Failed. Possibly trying to stop from a different thread");
                  return;
              }
              QAbstractEventDispatcherPrivate::releaseTimerId(m_id);
          }
          m_id = Qt::TimerId::Invalid;
      }
      

      Disassembly shows the crash happened in the call eventDispatcher->unregisterTimer. This pointer is valid, but the vtable inside of it is:

      0x326be350:     0x7fa07b068948 <_ZTV7QObject+16>
      

      This is a partially destroyed object. In fact, the backtrace tells us that: this is a QBasicTimer associated with the event dispatcher object, but is being destroyed by the QObject destructor... so the dispatcher no longer exists.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            thiago Thiago Macieira
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes