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

infinite loop in QTableView::sizeHintForRow

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 5.9.3
    • Widgets: Itemviews
    • None
    • Windows

    Description

       I am currently investigating an infinite loop in Qt5Widgetsd.dll!QTableView::sizeHintForRow(int row)
       here is a demonstration of the infinite loop in 5.9.3 QTableView::sizeHintForRow --https://paiza.io/projects/xr80iqOdEs7XNTPYlHUyWA 
       I believe the flaw is in this line: if ((columnsProcessed % 2 && idxLeft > 0) || idxRight == actualRight)

      it should say idxRight >= actualRight }}{{ 
      instead of  idxRight == actualRight

      Maybe this is happening because my custom QSortFilterProxyModel implemented filterAcceptsColumn to exclude one column, but it didn't reimplement columnCount? 

       

      Update: No, I tested my custom QSortFilterProxyModel that uses filterAcceptsColumn, and it seems to be returning the correct column count even without reimplementing columnCount. It remains unclear why index var "right" could be 24, when the range should be 0 to 23. As you can see from the code sample, actualRight was 23, therefore columnCount was returning 24, which was correct. This analysis points to visualIndexAt being the potential culprit that had initialized index var "right" as 24.

      Attachments

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

        Activity

          People

            chehrlic Christian Ehrlicher
            sapient Patrick Parker
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes