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

QSocketNotifier creates negative refcount

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.12.3
    • Fix Version/s: 5.12.4
    • Component/s: PySide
    • Labels:
      None
    • Commits:
      6108df521065e3a4628ae5656c3cbfd281b6765d (pyside/pyside-setup/5.12)

      Description

      The change "Fix QSocketNotifier constructor" from 2018-05-09, SHA-1 43451e3bc17467593df64cb73ce8c0bf9e60045f, creates a negative refcount.

      The reason was the change from

      Shiboken::AutoDecRef fileNoValue(PyObject_CallObject(fileNo, 0));
      

      to

      Shiboken::AutoDecRef socket(%PYARG_1);
      

      The first version creates a reference that the Shiboken::AutoDecRef later removes when it goes out of scope.
      The second version assigns a variable without creating a reference, and so Shiboken::AutoDecRef removes one reference too much and creates a crash in debug Python.

      This bug was not detected for a long time, because we do not test a debug Python version in COIN. This is bad, because uncaught reference leaks can cause random crashes which are hard to locate.

        Attachments

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

          Activity

            People

            • Assignee:
              ctismer Christian Tismer
              Reporter:
              ctismer Christian Tismer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes