On Thursday 09 February 2006 09:03, D Bera wrote:

> Yeah!
> [EMAIL PROTECTED] yabipy]$ python
> Python 2.4.1 (#2, Aug 25 2005, 18:20:57)
> [GCC 4.0.1 (4.0.1-2mdk for Mandriva Linux release 2006.0)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>
> >>> from qt import QString
> >>> from kio import *
> >>> from kdecore import *
> >>> s = QString ('image/jpeg')
> >>> u = KURL ('/home/debajyoti/out')
> >>> import stat
> >>> m = stat.S_IFREG
> >>> i = KFileItem (u, s, m)
>
> Segmentation fault
>
> gdb stacktrace:
> (gdb) bt
> #0  0xb764929d in KInstance::dirs () from /usr/lib/libkdecore.so.4
> #1  0xb7649322 in KGlobal::dirs () from /usr/lib/libkdecore.so.4
> #2  0xb765af66 in KSycoca::openDatabase () from /usr/lib/libkdecore.so.4
> #3  0xb769cf26 in KSycoca::KSycoca () from /usr/lib/libkdecore.so.4
> #4  0xb769cfd7 in KSycoca::self () from /usr/lib/libkdecore.so.4
> #5  0xb769d1dc in KSycocaFactory::KSycocaFactory$base ()
> from /usr/lib/libkdecore.so.4
> #6  0x426258f8 in KServiceTypeFactory::KServiceTypeFactory ()
>    from /usr/lib/libkio.so.4
> #7  0x42625af9 in KServiceTypeFactory::self () from /usr/lib/libkio.so.4
> #8  0x42640012 in KMimeType::mimeType () from /usr/lib/libkio.so.4
> #9  0x4264a552 in KFileItem::KFileItem$base () from /usr/lib/libkio.so.4
> #10 0xb785cbea in initkio () from /usr/lib/python2.4/site-packages/kio.so
> #11 0xb785f3a6 in initkio () from /usr/lib/python2.4/site-packages/kio.so
> #12 0xb797b7e2 in initsip () from /usr/lib/python2.4/site-packages/sip.so
> #13 0x41efd4aa in PyType_IsSubtype () from /usr/lib/libpython2.4.so.1.0
> #14 0xb72e7eec in ?? ()
> #15 0xb72e998c in ?? ()
> #16 0x00000000 in ?? ()
> (gdb)
>
>
> I was thinking of building PyQt. Now I will hold till someone figures out
> the black magic happening between python, sip and qt/kde.

There's no KApplication instance - I haven't tried this with one (might still 
fail), but without one it isn't valid code. KSycoca/KGlobal/KInstance stuff 
is one of the reasons most KDE applications require a KApplication instance.

Jim
 

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to