Ticket #8430 (new defect)

Opened 6 years ago

Last modified 5 years ago

Shouldn't recreate Buddy objects that left

Reported by: gdesmott Owned by: marco
Priority: normal Milestone: 9.1.0-cancelled
Component: sugar-toolkit Version: not specified
Keywords: relnote cjbfor9.1.0 Cc: Collabora
Action Needed: never set Verified: no
Deployments affected: Blocked By:
Blocking:

Description

I connected 2 Chat instances on 2 XO's. I rebooted one and the remaining Chat didn't announce the other buddy left because of this error:

1221140894.853296 DEBUG sugar.presence.activity: <proxy for /org/laptop/Sugar/Presence/Activities/1 at 931df2c>: buddy /org/laptop/Sugar/Presence/Buddies/keyid/d48ee75006445746a5476589afd9107376c3112a left
---------------------------------------------------------------------------
DBusException                             Traceback (most recent call last)

/usr/lib/python2.5/site-packages/sugar/presence/activity.py in _emit_buddy_left_signal(self=<proxy for /org/laptop/Sugar/Presence/Activities/1 at 931df2c>, object_path=dbus.ObjectPath('/org/laptop/Sugar/Presence/Buddies/keyid/d48ee75006445746a5476589afd9107376c3112a'))
    211         XXX note use of _ps_new_object instead of _ps_del_object here
    212         """
--> 213         self.emit('buddy-left', self._ps_new_object(object_path))
        self.emit = <built-in method emit of Activity object at 0x931df2c>
        self._ps_new_object = <bound method PresenceService._new_object of <PresenceService object at 0x931f1bc (sugar+presence+presenceservice+PresenceService at 0x93f6410)>>
        object_path = dbus.ObjectPath('/org/laptop/Sugar/Presence/Buddies/keyid/d48ee75006445746a5476589afd9107376c3112a')
    214         return False
    215 

/usr/lib/python2.5/site-packages/sugar/presence/presenceservice.py in _new_object(self=<PresenceService object at 0x931f1bc (sugar+presence+presenceservice+PresenceService at 0x93f6410)>, object_path=dbus.ObjectPath('/org/laptop/Sugar/Presence/Buddies/keyid/d48ee75006445746a5476589afd9107376c3112a'))
    173             if object_path.startswith(self._PS_BUDDY_OP):
    174                 obj = Buddy(self._bus, self._new_object,
--> 175                         self._del_object, object_path)
        self._del_object = <bound method PresenceService._del_object of <PresenceService object at 0x931f1bc (sugar+presence+presenceservice+PresenceService at 0x93f6410)>>
        object_path = dbus.ObjectPath('/org/laptop/Sugar/Presence/Buddies/keyid/d48ee75006445746a5476589afd9107376c3112a')
    176             elif object_path.startswith(self._PS_ACTIVITY_OP):
    177                 obj = Activity(self._bus, self._new_object,

/usr/lib/python2.5/site-packages/sugar/presence/buddy.py in __init__(self=<Buddy object at 0x9322694 (sugar+presence+buddy+Buddy at 0x93a3b10)>, bus=<dbus._dbus.SessionBus (session) at 0x930fe6c>, new_obj_cb=<bound method PresenceService._new_object of <Pr...e+presenceservice+PresenceService at 0x93f6410)>>, del_obj_cb=<bound method PresenceService._del_object of <Pr...e+presenceservice+PresenceService at 0x93f6410)>>, object_path=dbus.ObjectPath('/org/laptop/Sugar/Presence/Buddies/keyid/d48ee75006445746a5476589afd9107376c3112a'))
     89                 'PropertyChanged', self._property_changed_cb)
     90 
---> 91         self._properties = self._get_properties_helper()
        self._properties = {}
        self._get_properties_helper = <bound method Buddy._get_properties_helper of <Buddy object at 0x9322694 (sugar+presence+buddy+Buddy at 0x93a3b10)>>
     92 
     93         activities = self._buddy.GetJoinedActivities()

/usr/lib/python2.5/site-packages/sugar/presence/buddy.py in _get_properties_helper(self=<Buddy object at 0x9322694 (sugar+presence+buddy+Buddy at 0x93a3b10)>)
    105         """Retrieve the Buddy's property dictionary from the service object
    106         """
--> 107         props = self._buddy.GetProperties(byte_arrays=True)
        props = undefined
        self._buddy.GetProperties = <dbus.proxies._ProxyMethod instance at 0x93b97ac>
        global byte_arrays = undefined
        global True = undefined
    108         if not props:
    109             return {}

/usr/lib/python2.5/site-packages/dbus/proxies.py in __call__(self=<dbus.proxies._DeferredMethod instance at 0x93255ec>, *args=(), **keywords={'byte_arrays': True})
     66             # we're being synchronous, so block
     67             self._block()
---> 68             return self._proxy_method(*args, **keywords)
        self._proxy_method = <dbus.proxies._ProxyMethod instance at 0x9325bac>
        args = ()
        keywords = {'byte_arrays': True}
     69 
     70     def call_async(self, *args, **keywords):

/usr/lib/python2.5/site-packages/dbus/proxies.py in __call__(self=<dbus.proxies._ProxyMethod instance at 0x9325bac>, *args=(), **keywords={'byte_arrays': True})
    138                                                   introspect_sig,
    139                                                   args,
--> 140                                                   **keywords)
        keywords = {'byte_arrays': True}
    141 
    142     def call_async(self, *args, **keywords):

/usr/lib/python2.5/site-packages/dbus/connection.py in call_blocking(self=<dbus._dbus.SessionBus (session) at 0x930fe6c>, bus_name=dbus.UTF8String(':1.2'), object_path=dbus.ObjectPath('/org/laptop/Sugar/Presence/Buddies/keyid/d48ee75006445746a5476589afd9107376c3112a'), dbus_interface='org.laptop.Sugar.Presence.Buddy', method='GetProperties', signature=None, args=(), timeout=-1.0, utf8_strings=False, byte_arrays=True)
    620         # make a blocking call
    621         reply_message = self.send_message_with_reply_and_block(
--> 622             message, timeout)
        message = <dbus.lowlevel.MethodCallMessage object at 0x8e1c8a0>
        timeout = -1.0
    623         args_list = reply_message.get_args_list(**get_args_opts)
    624         if len(args_list) == 0:

DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "GetProperties" with signature "" on interface "org.laptop.Sugar.Presence.Buddy" doesn't exist

This is because the Buddy disappeared and so was removed from the object cache. So when the Activity object tries to emit the "buddy-left" signal, he has to recreate a new (sugar) Buddy object wrapping an unexisting PS Buddy object.

Attachments

logs.SHF7200007E.2008-09-11.13-50-56.tar.bz2 (39.7 kB) - added by gdesmott 6 years ago.

Change History

Changed 6 years ago by gdesmott

Changed 6 years ago by gregorio

  • keywords relnote added
  • milestone changed from Not Triaged to 8.2.1

Annoying but too late to change for 8.2.

I'll put it in release notes. And we can fix in the next round.

Thanks,

Greg S

Changed 5 years ago by mstone-xmlrpc

  • keywords cjbfor9.1.0 added
  • milestone changed from 8.2.1 to 9.1.0

Pushing out to 9.1.0, per edmcnierney's request.

Note: See TracTickets for help on using tickets.