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

Crash when mixing "height: childrenRect.height" with Repeaters

    XMLWordPrintable

Details

    • 6feb5b75ce96aeeefee189af003949db8c031519

    Description

      The following QML code crashes when the program is closed:

      import Qt 4.7
      
      Rectangle {
      	width: 300
      	height: 300
      
      	Rectangle {
      		height: childrenRect.height
      
      		Repeater {
      			model: 1
      			Rectangle {	}
      		}
      	}
      }
      

      Steps to reproduce:

      1. Run the AnchorsCrash project attached in Debug mode (this is important, since the crash happens when exiting the program, otherwise it won't get noticed)

      2. Close the program

      3. It crashes on the following line:

      QDeclarativeItem::~QDeclarativeItem()
      {
          [...]
          QDeclarativeAnchorsPrivate *anchor = d->changeListeners.at(ii).listener->anchorPrivate();
      

      Call stack:

      0 QDeclarativeItem::~QDeclarativeItem qdeclarativeitem.cpp 1481 0x660f4bcb
      1 QDeclarativeRectangle::~QDeclarativeRectangle QtDeclaratived4 0 0x660b171f
      2 QDeclarativePrivate::QDeclarativeElement<QDeclarativeRectangle>::~QDeclarativeElement<QDeclarativeRectangle> qdeclarativeprivate.h 90 0x660ce545
      3 QDeclarativePrivate::QDeclarativeElement<QDeclarativeRectangle>::`scalar deleting destructor' QtDeclaratived4 0 0x660cb05f
      4 QGraphicsItem::~QGraphicsItem qgraphicsitem.cpp 1478 0x6581ce2c
      5 QGraphicsObject::~QGraphicsObject QtGuid4 0 0x65042858
      6 QDeclarativeItem::~QDeclarativeItem qdeclarativeitem.cpp 1502 0x660f4e37
      7 QDeclarativeRectangle::~QDeclarativeRectangle QtDeclaratived4 0 0x660b171f
      8 QDeclarativePrivate::QDeclarativeElement<QDeclarativeRectangle>::~QDeclarativeElement<QDeclarativeRectangle> qdeclarativeprivate.h 90 0x660ce545
      9 QDeclarativePrivate::QDeclarativeElement<QDeclarativeRectangle>::`scalar deleting destructor' QtDeclaratived4 0 0x660cb05f
      10 QGraphicsItem::~QGraphicsItem qgraphicsitem.cpp 1478 0x6581ce2c
      11 QGraphicsObject::~QGraphicsObject QtGuid4 0 0x65042858
      12 QDeclarativeItem::~QDeclarativeItem qdeclarativeitem.cpp 1502 0x660f4e37
      13 QDeclarativeRectangle::~QDeclarativeRectangle QtDeclaratived4 0 0x660b171f
      14 QDeclarativePrivate::QDeclarativeElement<QDeclarativeRectangle>::~QDeclarativeElement<QDeclarativeRectangle> qdeclarativeprivate.h 90 0x660ce545
      15 QDeclarativePrivate::QDeclarativeElement<QDeclarativeRectangle>::`scalar deleting destructor' QtDeclaratived4 0 0x660cb05f
      16 QDeclarativeViewPrivate::~QDeclarativeViewPrivate qdeclarativeview.cpp 135 0x660404d1
      17 QDeclarativeViewPrivate::`scalar deleting destructor' QtDeclaratived4 0 0x6604042f
      18 QScopedPointerDeleter<QObjectData>::cleanup qscopedpointer.h 62 0x671dfa26
      19 QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> >::~QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> > qscopedpointer.h 100 0x671df3da
      20 QObject::~QObject qobject.cpp 963 0x671d7f2d
      21 QWidget::~QWidget qwidget.cpp 1582 0x650da80e
      22 QFrame::~QFrame qframe.cpp 242 0x655c1cc2
      23 QAbstractScrollArea::~QAbstractScrollArea qabstractscrollarea.cpp 526 0x656719ec
      24 QGraphicsView::~QGraphicsView qgraphicsview.cpp 1165 0x6589547b
      25 QDeclarativeView::~QDeclarativeView qdeclarativeview.cpp 300 0x6603e5d3
      26 main main.cpp 10 0x4010d7
      27 WinMain qtmain_win.cpp 131 0x401eea
      28 __tmainCRTStartup crtexe.c 578 0x401538
      29 WinMainCRTStartup crtexe.c 403 0x40129f
      30 BaseThreadInitThunk kernel32 0 0x76993677
      31 RtlInitializeExceptionChain ntdll 0 0x778c9d72
      32 RtlInitializeExceptionChain ntdll 0 0x778c9d45

      Attachments

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

        Activity

          People

            brasser Michael Brasser (closed Nokia identity) (Inactive)
            gregschlom Gregory Schlomoff
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes