I'm working on a KPart and I've got essentially the following:

class PublicFactory : public KParts::Factory {
public :
KParts::Part *createPartObject( QWidget *parentWidget, const char =

*widgetName, QObject *parent, const char *name, const char *classname, cons=
t =

QStringList &args ) {
return RealFactory::self()->createPartObject( parentWidget, widgetName, =

parent, name, classname, args );

/* both are static members of RealFactory */
RealFactory *RealFactory::s_self =3D 0;
RealFactory *RealFactory::self()
if ( !s_self ) {
s_self =3D new RealFactory();

return s_self;

But when PublicFactory::createPartObject() gets executed, ::self returns a =

non-NULL pointer, but the _vptr of ::s_self is NULL! This causes a segfaul=
t. =

s_self is not be deleted anywhere else, this was the first thing that I =

looked for.

Under what circumstances would _vptr be NULL?

-- =

Craig Howard
Bachelor of Math - Computer Science 2005
University of Waterloo

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscrib=

e <<