Crash in plasma shell due to bad connection manager

Diane Trout diane at ghic.org
Tue Aug 4 06:01:54 UTC 2015


> > https://github.com/detrout/telepathy-gitter/blob/51cba4dacefb7fd10e4d10704
> > 5f30a5679bd0912/glitter/contacts.py#L140
> I'm not entirely sure about Python and/or the struct you need to return,
> however you can check the Telegram CM which is done in Qt,
> see https://github.com/Kaffeine/telegram-qt/ ...maybe it will help :)

I eventually figured it out...

I'm not completely sure why for GetContactCapabilties the dbus return type is
a{ua(a{sv}as)}, as an array holding a struct seems odd. It seems like 
a{u(a{sv}as)} would've worked too.


> 
> > Obviously I need to figure out how to properly construct the dbus
> > structure (any hints would be appreciated). I was also wondering if
> > causing
> > plasmashell to crash because of my own bad code is something that should
> > file a plasmashell bugreport for?
> 
> Yeah, probably. Perhaps it should be fixed in tp-qt, even. Just
> file one and paste the backtrace there, we can follow it there.

I'll try to put together a bug report tomorrow, I was busy today fixing a 
Debian gcc-5 transition issue.

> > https://github.com/detrout/telepathy-python/commit/313269dbe612f6d5d16752e
> > 582f288550cb58525
> Good stuff, nicely done \o/

I've been wondering how useful an updated telepathy-python binding would be? 
It's technically been deprecated by the gnome people. 

But, some of the changes I've thought about doing:

python3 has abstract base classes, perhaps the interface classes should use 
that instead of just running "raise NotImplemented".

I'm pretty sure I can replace the implementation of 
telepathy.server.Connection.GetInterfaces to not need the interface classes to 
have an __init__ function. (Which should make it safer to use super())

Also I really want to change the API to look more like this:

from telepathy.Connection.Interface import Contacts

class MyContacts(Contacts):
	@Contacts.method
    def GetContactAttribute(self, handles, interfaces, hold, sender):
        pass


instead of 

import telepathy

class MyContacts(telepathy.server.ConnectionInterfaceContacts):
    @dbus.service.method(
        dbus_interface=telepathy.CONNECTION_INTERFACE_CONTACT_CAPABILITIES,
        in_signature="au"
        out_signature="a{ua(a({sv}as)}")
    def GetContactAttributes(self, handles,interfaces, hold, sender)

(Though right now I'm not sure I can hide the in_/out_ signature part.

Also I'd like to modify the setup.py script to use lxml to do the xslt 
transformation instead of using autotools & xsltproc.

Diane


More information about the KDE-Telepathy mailing list