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

QModelIndexList crashes on destruction

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 4.4.3, 5.15.2
    • None
    • All

    Description

      QModelIndexList causes an application crash when it gets destructed.

      <CODE>
      void Class::RemoveObjectClickedSlot ()

      { QModelIndexList indexes = m_objectSelectionTableView->selectionModel ()->selectedIndexes (); }

      </CODE>

      <CODE>
      msvcr90d.dll!operator delete(void * pUserData=0x088a6448) Line 52 + 0x51 bytes C++
      MBRSAGUI.dll!QModelIndex::`scalar deleting destructor'() + 0x32 bytes C++
      MBRSAGUI.dll!QList<QModelIndex>::node_destruct(QList<QModelIndex>::Node * from=0x0a194d8c, QList<QModelIndex>::Node * to=0x0a194d98) Line 359 + 0x2f bytes C++
      MBRSAGUI.dll!QList<QModelIndex>::free(QListData::Data * data=0x0a194d78) Line 553 C++
      MBRSAGUI.dll!QList<QModelIndex>::operator=(const QList<QModelIndex> & l=[0]()) Line 371 C++
      MBRSAGUI.dll!QList<QModelIndex>::clear() Line 561 + 0x24 bytes C++
      MBRSAGUI.dll!MBRSA_RSA_ScenePane::RemoveModelClickedGS() Line 713 C++
      MBRSAGUI.dll!MBRSA_RSA_ScenePane::qt_metacall(QMetaObject::Call _c=InvokeMetaMethod, int _id=7, void * * _a=0x0468c4b4) Line 175 + 0x8 bytes C++
      </CODE>

      Also mentioned on http://www.qtcentre.org/threads/27769

      Debug application uses QT release libraries/dlls.

      When linking with QT debug libraries / dlls the problem does not occur.

       

      Please see comment below from Nicholas Lawson which describes this issue better - this is an issue with Qt calling new and delete inline, and should not be closed invalid as it was back in 2010.

      Attachments

        1. main.zip
          6 kB
        2. patch_qlist_new.patch
          3 kB
        3. test_modelindex.cpp
          1 kB
        4. test_modelindex.pro
          0.1 kB
        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
            mstegehuis E.M. Stegehuis
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes