[PyKDE] 3.2rc4 instability

Phil Thompson phil at river-bank.demon.co.uk
Fri May 3 11:20:00 BST 2002


Alan Harkreader wrote:
> 
> Looks like null pointer mischief.
> 
> => in toggleWindow (posted example)
> 
>     self.centralWidget() # on a top-level-window (no parent)
> 
> => in sipDo_QMainWindow_centralWidget
> 
>     res = sipCpp -> QMainWindow::centralWidget(); // res == NULL
>     ...
>     return sipMapCppToSelfSubClass(res,sipClass_QWidget); // res == NULL
> 
> => in sipMapCppToSelfSubClass
> 
>     return sipMapCppToSelf(cppPtr,convertSubClass(pyClass,cppPtr)); // cppPtr == NULL
> 
> => convertSubClass calls sipSubClass_QObject (as convertor)
> 
> => sipSubClass_QObject
> 
>     PyQtGetQObjectPythonClass(sipCpp); // sipCpp == NULL
> 
> => PyQtGetQObjectPythonClass
> 
>     ...
>     sipMapStringToClass(qobj -> className(),...) // NULL->className(), Ouch!
> 
> Difficult to get rtti from null. sipMapCppToSelf checks for NULL,
> (& returns None), problem is that convertSubClass call chain presumes valid QObject * (i.e., in
> PyQtGetQObjectPythonClass "qobj->className()") prior to sipMapCppToSelf.

Thanks. This was worrying me.

Phil




More information about the PyQt mailing list