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

Segfault when using connect

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 1.2.x, dev
    • Fix Version/s: dev
    • Component/s: PySide
    • Labels:
      None

      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.py
          0.8 kB
        7. signalconnect_test.py
          0.5 kB

          Issue Links

          For Gerrit Dashboard: PYSIDE-79
          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              ctismer Christian Tismer
              Reporter:
              jpe John Ehresman
              Votes:
              5 Vote for this issue
              Watchers:
              17 Start watching this issue

                Dates

                Created:
                Updated: