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

TableView - crash when forceLayout() is called early

    XMLWordPrintable

Details

    • Windows

    Description

      I have a custom TV component hacked around QtQuick's 2 new TV. It adds headers, selection and whatnot.
      It consist of two 'synchronized' TVs - one being table header, second table content.
      To properly set headers and table's content I periodically do some calculations on cpp side and emit my own 'relayout' signal which is then intercepted by the QML, which in turn fires 'forceLayout()' on my header and content TVs.
      I was trying to port one of my applications using it to Qt 5.13 when I noticed two crashes happening around it.

      First 'crash' is an assert from QtCore's qmap.h and says:
      "ASSERT: "!isEmpty()" in file c:\Users\qt\work\install\include\QtCore/qmap.h, line 397"

      I was able to prepare minimal example showing it. Archive "tv_test.tar" contains, what is basically, an "Qt Quick Application - Empty" wizard created project with some stuff added - mainly calling forceLayout() in Component.onCompleted handler.
      In my case it crashes consistently using both mingw and msvc releases of Qt 5.13.0
      It appears that calling TV's method 'forceLayout()' to early causes some problems - this works fine using Qt 5.12.4

      Second one is a bit more elusive What I get is many lines such as:
      CRITICAL | [397] | ASSERT: "!isEmpty()" in file c:\Users\qt\work\install\include\QtCore/qmap.h, line 397
      ASSERT: "phase == Startup" in file qml\qqmlobjectcreator.cpp, line 159
      ASSERT: "phase == Startup" in file qml\qqmlobjectcreator.cpp, line 159
      ASSERT: "phase == Startup" in file qml\qqmlobjectcreator.cpp, line 159
      ASSERT: "phase == Startup" in file qml\qqmlobjectcreator.cpp, line 159
      ASSERT: "phase == Startup" in file qml\qqmlobjectcreator.cpp, line 159
      ASSERT: "phase == Startup" in file qml\qqmlobjectcreator.cpp, line 159
      ASSERT: "phase == Startup" in file qml\qqmlobjectcreator.cpp, line 159
      ASSERT: "phase == Startup" in file qml\qqmlobjectcreator.cpp, line 159

      I was not able to prepare working example for it as my hacked TV is a complicated mess full of silly things but again - not forcing both TVs to relayout in response to my calculations prevents this.
      This also is not happening in Qt 5.12.4

      I tested this in Windows 7 and 10 using latest patches.

      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
            izowiuz Jakub Narolewski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes