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. RecursiveDeletion.py
          4 kB
        2. pyside88.py
          0.4 kB
        3. pyside88_valgrind.txt
          95 kB
        4. pyside88_stack.txt
          10 kB
        5. pyside88_recursiveDeletion.py
          1 kB
        6. pyside88_recursiveDeletion_5.py
          1 kB
        7. pyside88_qobject_deletion_stack.txt
          5 kB
        8. pyside88_5.py
          0.4 kB
        9. pyside_88_delete_all_order_dependent.py
          1.0 kB
        10. exitcrash2.py
          0.5 kB
        11. exitcrash.py
          0.2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes