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

crashes on unloading QNSView

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.5.0 RC
    • 5.5.0 Beta
    • QPA
    • None
    • macOS

    Description

      it seems that 10126b37d2e4 has introduced a regression. using inside a native cocoa gui, the system ends up calling ~QCocoaWindow with no QCocoaIntegration instance:

      * thread #1: tid = 0x1a9ae, 0x0000000125efe42c DSO`QT_NAMESPACE::QListData::size(this=0x0000000000000060) const + 12 at qlist.h:105, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x60)
        * frame #0: 0x0000000125efe42c DSO`QT_NAMESPACE::QListData::size(this=0x0000000000000060) const + 12 at qlist.h:105
          frame #1: 0x00000001259e7fbd DSO`QT_NAMESPACE::QList<QT_NAMESPACE::QCocoaWindow*>::indexOf(this=0x0000000000000060, t=0x00007fff5fbff058, from=0) const + 109 at qlist.h:941
          frame #2: 0x00000001259e7a11 DSO`QT_NAMESPACE::QList<QT_NAMESPACE::QCocoaWindow*>::removeAll(this=0x0000000000000060, _t=0x00007fff5fbff058) + 49 at qlist.h:849
          frame #3: 0x00000001259dfae2 DSO`QT_NAMESPACE::QCocoaWindow::~QCocoaWindow(this=0x0000000129d0de90) + 498 at qcocoawindow.mm:438
          frame #4: 0x00000001259dfdb5 DSO`QT_NAMESPACE::QCocoaWindow::~QCocoaWindow(this=0x0000000129d0de90) + 21 at qcocoawindow.mm:407
          frame #5: 0x00000001259dfdd9 DSO`QT_NAMESPACE::QCocoaWindow::~QCocoaWindow(this=0x0000000129d0de90) + 25 at qcocoawindow.mm:407
          frame #6: 0x00000001261323d3 DSO`QT_NAMESPACE::QWindow::destroy(this=0x000000012206bf20) + 499 at qwindow.cpp:1626
          frame #7: 0x0000000126132197 DSO`QT_NAMESPACE::QWindow::~QWindow(this=0x000000012206bf20) + 55 at qwindow.cpp:204
          frame #8: 0x00000001252afb94 DSO`QT_NAMESPACE::QQuickWindow::~QQuickWindow(this=0x000000012206bf20) + 612 at qquickwindow.cpp:1150
      
      ----
      
      (lldb) up
      frame #3: 0x00000001259dfae2 DSO`QT_NAMESPACE::QCocoaWindow::~QCocoaWindow(this=0x0000000129d0de90) + 498 at qcocoawindow.mm:438
         435
         436 	    // While it is unlikely that this window will be in the popup stack
         437 	    // during deletetion we clear any pointers here to make sure.
      -> 438 	    QCocoaIntegration::instance()->popupWindowStack()->removeAll(this);
         439
         440 	    foreach (QCocoaWindow *child, m_childWindows) {
         441 	       [m_nsWindow removeChildWindow:child->m_nsWindow];
      (lldb) f 2
      frame #2: 0x00000001259e7a11 DSO`QT_NAMESPACE::QList<QT_NAMESPACE::QCocoaWindow*>::removeAll(this=0x0000000000000060, _t=0x00007fff5fbff058) + 49 at qlist.h:849
         846 	template <typename T>
         847 	Q_OUTOFLINE_TEMPLATE int QList<T>::removeAll(const T &_t)
         848 	{
      -> 849 	    int index = indexOf(_t);
         850 	    if (index == -1)
         851 	        return 0;
         852
      

      Attachments

        Issue Links

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

          Activity

            People

              sorvig Morten Sørvig
              timblechmann tim blechmann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes