Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2054

QHeaderView.setSectionResizeMode(int, QHeaderView.ResizeMode) crashes when index out of range

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.3.1
    • PySide
    • None
    • Python 3.10.5, a freshly built Anaconda environment (for unrelated reasons)
    • Windows

      Summary says the issue. There is no error shown, the program just exits as soon as it hits the method call with that specific signature. The signature that is just the ResizeMode does not crash and functions as desired. It is supposedly a supported signature, according to the python type interface file and the error message shown when you give it an actually incorrect signature:

      Supported signatures:
       PySide6.QtWidgets.QHeaderView.setSectionResizeMode(int, PySide6.QtWidgets.QHeaderView.ResizeMode)
       PySide6.QtWidgets.QHeaderView.setSectionResizeMode(PySide6.QtWidgets.QHeaderView.ResizeMode)

      I tried my best to debug it, but I do not understand how to attach a C++ debugger to the python runtime despite attempting to do just that. I can say that the log files and Windows event state that python crashed, and don't give me a stack trace in C++.

      ASSERT: "visual != -1" in file qtbase/src/widgets/itemviews/qheaderview.cpp, line 1239
      

        1. app.py
          2 kB
        2. better_example.py
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            crmaurei Cristian Maureira-Fredes
            dilettante Ramses Gasque
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes