@ctismer
I'm seeing a a crash in a PySide2/QML app that I'm working on that crashes with a segmentation violation trying to access reinterpret_cast<SbkObject *>(self)->ob_dict) in SignalManager::retrieveMetaObject(PyObject *self).
I went and looked to see what this code looked like in dev and found that the reinterpret cast was replaced with a call to SbkObject_GetDict - which does the reinterpret cast (in the case of a non-PyPy build), followed by a null check and newing up a PyDict if null.
The prior code didn't have this null check.
The commit that introduced SbkObject_GetDict and added the null check/new dict code is:
commit e85db57ecf9e998206eefe93433ee58c6f8c1f47
PyPySide: Avoid direct access to `op->ob_dict` in PyPy
My question was - why did you add:
if (!sbkObj->ob_dict)
sbkObj->ob_dict = PyDict_New();
? Your commit message talks about the #ifdef PYPY_VERSION case, but doesn't talk about this change.
We are going to try adding this check and new to PySide2 to see if it fixes the issue.
We aren't moving to PySide6 yet, because we found significant performance impact (increased CPU usage without any changes) to the application as a whole when moving to PySide6. I doubt it is a PySide6 specific issue, and likely something in Qt itself.