Bug 15092

Summary: Can't subclass a class which is using the group mixin
Product: Telepathy Reporter: Guillaume Desmottes <guillaume.desmottes>
Component: tp-glibAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Guillaume Desmottes 2008-03-17 06:47:42 UTC
If you try to create a class FooMucChannel as a subclass of MucChannel, you'll have this crash when trying to use the group mixin:

** CRITICAL **: tp_mixin_offset_cast: assertion `offset != 0' failed

#4  0xb7cdcf89 in g_log () from /usr/lib/libglib-2.0.so.0
#5  0xb7cdd06b in g_return_if_fail_warning () from /usr/lib/libglib-2.0.so.0
#6  0xb7c90152 in tp_mixin_offset_cast (instance=0x80cb9d0, offset=0) at util.c:158
#7  0xb7c8647d in tp_group_mixin_add_members (obj=0x80ce808, contacts=0x80abc80, message=0x809eb39 "", error=0x0) at group-mixin.c:451
#8  0x08064632 in salut_muc_channel_invited (self=0x80ce808, inviter=1, stanza=0x0, error=0x0) at salut-muc-channel.c:854


As an ugly workaround, you can recall tp_group_mixin_class_init, tp_group_mixin_init (using the MucChannel offset) and tp_group_mixin_change_flags in FooMucChannel's code.
Comment 1 Simon McVittie 2009-01-12 04:47:02 UTC
Fixed in 0.7.19.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.