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

Shutdown segfault due to SignalManager::clear()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.12.0
    • 1.2.x
    • PySide
    • None
    • 3eb940cbd77cea9603d1c180f81eb4a2a474ef90 (pyside/dev, 19.9.2016), 516156d24e334ab909a16f866832204b9650ab42

    Description

      SignalManager::clear() deletes all of the global receiver callbacks without first disconnecting the receiver from the signal it's connected to. This can segfault when the callback is holding a last reference to an QObject is released, causing the QObject to be deleted, and a destroyed signal calls down a now invalid callback. One way to fix it might be just not to make callbacks if the program is shutting down, but a call to SignalManager::clear() before shutdown would still be unsafe.

      Attachments

        1. exitcrash.py
          0.2 kB
        2. exitcrash2.py
          0.5 kB
        3. pyside_88_delete_all_order_dependent.py
          1.0 kB
        4. pyside88_qobject_deletion_stack.txt
          5 kB
        5. pyside88_stack.txt
          10 kB
        6. pyside88_valgrind.txt
          95 kB
        7. pyside88.py
          0.2 kB
        8. RecursiveDeletion.py
          4 kB

        Activity

          People

            kleint Friedemann Kleint
            jpe John Ehresman
            Votes:
            5 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: