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

Segmentation fault when raising Python error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0
    • Component/s: PySide
    • Labels:

      Description

      In SignalManager::qt_metacall of signalmanager.cpp

      PyErr_Restore might cause segment fault. Because it takes away a reference to each object that PyObject_Str(errValue) will fail

      PyErr_Fetch alone should be suffice.

      "you must own a reference to each object before the call and after the call you no longer own these references." – from Python doc site

      PyObject *errType, *errValue, *errTraceback;
      PyErr_Fetch(&errType, &errValue, &errTraceback);
      PyErr_Restore(errType, errValue, errTraceback);

      const QString errString = QLatin1String(Shiboken::String::toCString(PyObject_Str(errValue)));

        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:
            binbin Binbin Ye
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes