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

Calling .disconnect() on signal in deleted C++ QObject causes seg-fault instead or raising exception, .value() on same object correctly detects error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • None
    • 1.1.2
    • PySide
    • None
    • Confirmed bug on:
      Windows 7, Python 2.7.5 32-bit. PySide 1.1.2.
      Linux Fedora Core 17. PySide 1.1.1.

    Description

      See attached example. Basically if you call object.signal.disconnect() on something which has been deleted, you get a segfault/total crash. However if you call .value() on the object it gives you the correct exception:

      Traceback (most recent call last):
      File "C:/temp/pyside-fail-example.py", line 33, in exampleFail
      self.newref.value()
      RuntimeError: Internal C++ object (PySide.QtGui.QSlider) already deleted.

      As a work-around you can call .value() before .disconnect() in your Python code, but probably something which should be fixed in PySide itself.

      In attached example: uncomment line 33, and you'll get a nice exception instead of the seg-fault.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            coflynn Colin O'FLynn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes