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

Segfault when using connect

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.0, 6.5.0, 6.4.3
    • 1.2.x
    • PySide
    • None
    • db40e3e07 (dev), d00d4bfc6 (6.4), 08ec50ff3 (dev), 9c5b9a97e (6.4), 21fbc5ec9 (dev), 30614ffb1 (6.4), d074f98de (dev), 2fee56b74 (6.4), e226b5827 (dev), bfb7fd1c6 (6.8), cab304e70 (dev)

    Description

      Python segfaults when connecting to a signal attribute of a temporary object; e.g.

      tv = QTreeView()
      ...
      tv.selectionModel().destroyed.connect(callback)

      What happens is a PyObject* is created for the selection model, but is destroyed after its 'destroyed' attribute is gotten and before the .connect(callback) call.

      It may not segfault in a non-debug python build because the recently freed memory may still contain its old values

      Attachments

        1. bug_79.py
          2 kB
        2. ceval.c
          139 kB
        3. instrumentation.txt
          0.3 kB
        4. object.c
          58 kB
        5. object.h
          38 kB
        6. pyside79_5.py
          0.8 kB
        7. pyside79_pyqt.py
          1 kB
        8. pyside79.py
          1 kB
        9. signalconnect_test.py
          0.5 kB

        Issue Links

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

          Activity

            People

              ctismer Christian Tismer
              jpe John Ehresman
              Votes:
              6 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes