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

[REG 6.8.0 -> 6.8.1] macOS crash on exit

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P0: Blocker
    • None
    • 6.8.1
    • GUI: Other
    • None
    • macOS

    Description

      My widgets-based application is sometimes crashing upon exit. I believe this may be a regression related to QTBUG-116554, and possibly already fixed in the 6.8 branch (the QObjCWeakPointer change didn't make it to 6.8.1), but I am unable to test that so I wanted to report it just in case.

      Lvl Function                                                                           File                                                                                   Line Address    
      1   -[QNSView dealloc]                                                                 qnsview.mm                                                                             177  0x10193da94 
      2   -[NSTouch dealloc]                                                                 (arm64e) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit                      0x18bcf3df8 
      3   __RELEASE_OBJECTS_IN_THE_SET__                                                     (arm64e) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation      0x187f0dc40 
      4   -[__NSSetM dealloc]                                                                (arm64e) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation      0x187f0db5c 
      5   -[NSEvent dealloc]                                                                 (arm64e) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit                      0x18bbadac4 
      6   QCocoaDrag::~QCocoaDrag()                                                          qcocoadrag.mm                                                                          31   0x1018f93c4 
      7   QCocoaDrag::~QCocoaDrag()                                                          qcocoadrag.mm                                                                          30   0x1018f93b0 
      8   QCocoaDrag::~QCocoaDrag()                                                          qcocoadrag.mm                                                                          30   0x1018f93b0 
      9   QScopedPointerDeleter<QCocoaDrag>::cleanup(QCocoaDrag *)                           qscopedpointer.h                                                                       24   0x101904d98 
      10  QScopedPointer<QCocoaDrag, QScopedPointerDeleter<QCocoaDrag>>::~QScopedPointer()   qscopedpointer.h                                                                       81   0x101904d88 
      11  QScopedPointer<QCocoaDrag, QScopedPointerDeleter<QCocoaDrag>>::~QScopedPointer()   qscopedpointer.h                                                                       79   0x101904d84 
      12  QCocoaIntegration::~QCocoaIntegration()                                            qcocoaintegration.mm                                                                   206  0x101904d84 
      13  QCocoaIntegration::~QCocoaIntegration()                                            qcocoaintegration.mm                                                                   180  0x101904fa4 
      14  QCocoaIntegration::~QCocoaIntegration()                                            qcocoaintegration.mm                                                                   180  0x101904fa0 
      15  non-virtual thunk to QCocoaIntegration::~QCocoaIntegration()                       qcocoaintegration.mm                                                                        0x101904fa0 
      16  QGuiApplicationPrivate::~QGuiApplicationPrivate()                                  qguiapplication.cpp                                                                    1832 0x100617d08 
      17  QApplicationPrivate::~QApplicationPrivate()                                        qapplication.cpp                                                                       144  0x101095220 
      18  QApplicationPrivate::~QApplicationPrivate()                                        qapplication.cpp                                                                       144  0x10109521c 
      19  QScopedPointerDeleter<QObjectData>::cleanup(QObjectData *)                         qscopedpointer.h                                                                       24   0x1022c6f90 
      20  QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData>>::~QScopedPointer() qscopedpointer.h                                                                       81   0x1022c6f80 

      Minimal test case is as follows. The app just shows itself and auto-quits after 2 seconds. Before it quits, if you use a trackpad (e.g the built-in one on a MacBook) to move the cursor over the graphics view, then stop and lift your finger before it quits, it will often (but not always) crash during exit.

      #include <QtWidgets>
      
      class MainWindow : public QMainWindow {
      public:
          MainWindow(QWidget *parent = nullptr) : QMainWindow{parent} {
              setWindowTitle("Test");
              setCentralWidget(new QGraphicsView(this));
          };
      protected:
          void showEvent(QShowEvent *event) override {
              QTimer::singleShot(2000, this, []() {
                  QCoreApplication::quit();
              });
              QMainWindow::showEvent(event);
          }
      };
      
      int main(int argc, char *argv[]) {
          QApplication a(argc, argv);
          MainWindow *w = new MainWindow();
          w->show();
          return a.exec();
      }
      

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            jdpurcell J.D. Purcell
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes