Bug 41928

Summary: Crash when leaving a MUC
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: major    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: deal with self->priv->group_contact_owners may containing NULL contact

Description Guillaume Desmottes 2011-10-18 05:56:22 UTC
- Enter a XMPP muc having one other participant
- Leave it

GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed


#0  0x00007fffecae390c in g_logv (log_domain=0x7fffed421f8f "GLib-GObject", log_level=G_LOG_LEVEL_CRITICAL, 
    format=0x7fffecb6b958 "%s: assertion `%s' failed", args1=0x7fffffffdd20) at gmessages.c:570
        depth = 1
        domain = 0x0
        data = 0x52853b
        log_func = 0x43d1b0 <tp_debug_sender_log_handler@plt>
        domain_fatal_mask = 5
        masquerade_fatal = 0
        test_level = 10
        was_fatal = 0
        was_recursion = 0
        i = 3
#1  0x00007fffecae3a5c in g_log (log_domain=0x7fffed421f8f "GLib-GObject", log_level=G_LOG_LEVEL_CRITICAL, 
    format=0x7fffecb6b958 "%s: assertion `%s' failed") at gmessages.c:591
        args = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 0x7fffffffde00, 
            reg_save_area = 0x7fffffffdd40}}
#2  0x00007fffecae3a9d in g_return_if_fail_warning (log_domain=0x7fffed421f8f "GLib-GObject", 
    pretty_function=0x7fffed423093 "g_object_unref", expression=0x7fffed422489 "G_IS_OBJECT (object)")
    at gmessages.c:600
No locals.
#3  0x00007fffed3fc5f3 in g_object_unref (_object=0x0) at gobject.c:2680
        object = 0x0
        old_ref = 7871280
        __PRETTY_FUNCTION__ = "g_object_unref"
#4  0x00007fffecac4790 in g_hash_table_remove_all_nodes (hash_table=0xe6e460, notify=1) at ghash.c:495
        i = 6
        key = 0xd
        value = 0x0
#5  0x00007fffecac52ac in g_hash_table_unref (hash_table=0xe6e460) at ghash.c:972
        __PRETTY_FUNCTION__ = "g_hash_table_unref"
#6  0x00007ffff2df5b27 in tp_channel_dispose (object=0xe6a100) at channel.c:1373
        _tp_clear_pointer_tmp = 0xe6e460
        self = 0xe6a100
        __PRETTY_FUNCTION__ = "tp_channel_dispose"
#7  0x00007ffff2ea5cda in tp_text_channel_dispose (obj=0xe6a100) at text-channel.c:124
        self = 0xe6a100
#8  0x000000000046a4ab in tp_chat_dispose (object=0xe6a100) at empathy-tp-chat.c:753
        self = 0xe6a100
#9  0x00007fffed3fc6be in g_object_unref (_object=0xe6a100) at gobject.c:2709
        object = 0xe6a100
        old_ref = 1
        __PRETTY_FUNCTION__ = "g_object_unref"
#10 0x00007fffed6af5d0 in g_simple_async_result_finalize (object=0xe4bc60) at gsimpleasyncresult.c:269
        simple = 0xe4bc60
---Type <return> to continue, or q <return> to quit---
#11 0x00007fffed3fc7b6 in g_object_unref (_object=0xe4bc60) at gobject.c:2746
        object = 0xe4bc60
        old_ref = 1
        __PRETTY_FUNCTION__ = "g_object_unref"
#12 0x00007ffff2df8c0c in contacts_queue_item_free (item=0xe73320) at channel-contacts.c:245
        _p = 0xe73320
        _o = 0xe4bc60
#13 0x00007ffff2df8cbb in contacts_queue_head_ready (self=0xe6a100, error=0x0) at channel-contacts.c:269
        item = 0xe73320
        __PRETTY_FUNCTION__ = "contacts_queue_head_ready"
#14 0x00007ffff2df8e74 in contacts_queue_item_idle_cb (user_data=0xe6a100) at channel-contacts.c:337
        self = 0xe6a100
#15 0x00007fffecadc40f in g_idle_dispatch (source=0xe79260, 
    callback=0x7ffff2df8e4f <contacts_queue_item_idle_cb>, user_data=0xe6a100) at gmain.c:4801
No locals.
#16 0x00007fffecad7cc3 in g_main_dispatch (context=0x794c70) at gmain.c:2441
        dispatch = 0x7fffecadc3c3 <g_idle_dispatch>
        was_in_call = 0
        user_data = 0xe6a100
        callback = 0x7ffff2df8e4f <contacts_queue_item_idle_cb>
        cb_funcs = 0x7fffecdd0670
        cb_data = 0xe63460
        need_destroy = 1
        current_source_link = {data = 0xe79260, next = 0x0}
        source = 0xe79260
        current = 0x8f24b0
        i = 1
        __PRETTY_FUNCTION__ = "g_main_dispatch"
#17 0x00007fffecad9209 in g_main_context_dispatch (context=0x794c70) at gmain.c:3011
No locals.
#18 0x00007fffecad96b6 in g_main_context_iterate (context=0x794c70, block=1, dispatch=1, self=0x781450)
    at gmain.c:3089
        max_priority = 200
        timeout = 0
        some_ready = 1
        nfds = 10
        allocated_nfds = 10
        fds = 0xc6e7f0
        __PRETTY_FUNCTION__ = "g_main_context_iterate"
#19 0x00007fffecad9e0f in g_main_loop_run (loop=0x858c70) at gmain.c:3297
        self = 0x781450
        __PRETTY_FUNCTION__ = "g_main_loop_run"
#20 0x00007fffef76e28e in gtk_main () at gtkmain.c:1362
        loop = 0x858c70
---Type <return> to continue, or q <return> to quit---
#21 0x00007fffef6574cb in gtk_application_run_mainloop (application=0x7e90c0) at gtkapplication.c:115
No locals.
#22 0x00007fffed6ec6e1 in g_application_run (application=0x7e90c0, argc=1, argv=0x7fffffffe528)
    at gapplication.c:1323
        arguments = 0x858c70
        status = 0
        i = 1
        __PRETTY_FUNCTION__ = "g_application_run"
#23 0x0000000000459245 in main (argc=1, argv=0x7fffffffe528) at empathy.c:841
        app = 0x7e90c0
        retval = 0
Comment 1 Guillaume Desmottes 2011-10-18 07:26:11 UTC
That's because self->priv->group_contact_owners contains a handle associated with a NULL TpContact.
Comment 2 Guillaume Desmottes 2011-10-18 07:45:36 UTC
Created attachment 52476 [details] [review]
deal with self->priv->group_contact_owners may containing NULL contact

If the owner is unknown self->priv->group_contact_owners may contain NULL
TpContact. g_object_unref() not being NULL safe we have to use our own
value_destroy_func to avoid warnings.
Comment 3 Guillaume Desmottes 2011-10-18 08:13:55 UTC
Merged will be in 0.16.1

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.