After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 626552 - Sporadic tree model warnings upon initial fill in Empathy
Sporadic tree model warnings upon initial fill in Empathy
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Contact List
2.31.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
: 626547 626714 627813 (view as bug list)
Depends on: 621076
Blocks:
 
 
Reported: 2010-08-10 17:37 UTC by Travis Reitter
Modified: 2011-08-29 10:12 UTC
See Also:
GNOME target: 2.32.x
GNOME version: ---



Description Travis Reitter 2010-08-10 17:37:21 UTC
When testing with real-world accounts (especially 1 AIM, 1 GTalk) in the latest Empathy from git, I frequently get several instances of this upon initial fill of the contact list:

Gtk-WARNING **: A node was inserted with a parent that's not in the tree.
This possibly means that a GtkTreeModel inserted a child node
before the parent was inserted.

This never happens when I've just got 4 trivial local Jabber accounts, and I haven't been able to reproduce it when I've got 2 GTalk accounts or 1 GTalk and those 4 local Jabber accounts.

I inserted some debugging statements, and this seems to only happen when contacts are inserted interspersed from the different accounts. And this only seems to happen in the (1 AIM, 1 GTalk) and (1 AIM, 1 local Jabber) cases, since they're coming from different CMs. The 1 AIM, 1 GTalk case seems to exhibit this bug much more often than (1 AIM, 1 local Jabber) since both the AIM and GTalk accounts have sizeable contacts lists and have network lag.

This happens for me and Philip with Empathy linked against GTK 3, though apparently it's happened with GTK 2 as well.
Comment 1 Travis Reitter 2010-08-13 00:24:10 UTC
*** Bug 626714 has been marked as a duplicate of this bug. ***
Comment 2 Guillaume Desmottes 2010-08-16 13:07:01 UTC
I managed to got a trace:


(gdb) bt
  • #0 g_logv
    at gmessages.c line 544
  • #1 g_log
    at gmessages.c line 568
  • #2 gtk_tree_view_row_inserted
    at gtktreeview.c line 8433
  • #3 _gtk_marshal_VOID__BOXED_BOXED
    at gtkmarshalers.c line 1311
  • #4 g_closure_invoke
    at gclosure.c line 766
  • #5 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #6 g_signal_emit_valist
    at gsignal.c line 2983
  • #7 g_signal_emit
    at gsignal.c line 3040
  • #8 gtk_tree_model_row_inserted
    at gtktreemodel.c line 1527
  • #9 gtk_tree_model_filter_row_inserted
    at gtktreemodelfilter.c line 1637
  • #10 _gtk_marshal_VOID__BOXED_BOXED
    at gtkmarshalers.c line 1311
  • #11 g_closure_invoke
    at gclosure.c line 766
  • #12 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #13 g_signal_emit_valist
    at gsignal.c line 2983
  • #14 g_signal_emit
    at gsignal.c line 3040
  • #15 gtk_tree_model_row_inserted
    at gtktreemodel.c line 1527
  • #16 gtk_tree_store_insert_with_values
    at gtktreestore.c line 1456
  • #17 add_individual_to_store
  • #18 individual_store_add_individual
    at empathy-individual-store.c line 406
  • #19 individual_store_add_individual_and_connect
    at empathy-individual-store.c line 793
  • #20 individual_store_members_changed_cb
    at empathy-individual-store.c line 823
  • #21 _empathy_marshal_VOID__STRING_OBJECT_OBJECT_UINT
    at empathy-marshal.c line 443
  • #22 g_closure_invoke
    at gclosure.c line 766
  • #23 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #24 g_signal_emit_valist
    at gsignal.c line 2983
  • #25 g_signal_emit
    at gsignal.c line 3040
  • #26 aggregator_individuals_changed_cb
    at empathy-individual-manager.c line 213
  • #27 g_cclosure_user_marshal_VOID__POINTER_POINTER_STRING_OBJECT_ENUM
    at individual-aggregator.c line 2209
  • #28 g_closure_invoke
    at gclosure.c line 766
  • #29 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #30 g_signal_emit_valist
    at gsignal.c line 2983
  • #31 g_signal_emit_by_name
    at gsignal.c line 3077
  • #32 folks_individual_aggregator_personas_changed_cb
    at individual-aggregator.c line 1237
  • #33 _folks_individual_aggregator_personas_changed_cb_folks_persona_store_personas_changed
    at individual-aggregator.c line 693
  • #34 g_cclosure_user_marshal_VOID__POINTER_POINTER_STRING_OBJECT_ENUM
    at persona-store.c line 446
  • #35 g_closure_invoke
    at gclosure.c line 766
  • #36 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #37 g_signal_emit_valist
    at gsignal.c line 2983
  • #38 g_signal_emit_by_name
    at gsignal.c line 3077
  • #39 tpf_persona_store_add_new_personas_from_contacts
    at tpf-persona-store.c line 2545
  • #40 tpf_persona_store_create_personas_from_channel_handles_async_co
    at tpf-persona-store.c line 2194
  • #41 tpf_persona_store_create_personas_from_channel_handles_async_ready
    at tpf-persona-store.c line 2089
  • #42 g_simple_async_result_complete
    at gsimpleasyncresult.c line 692
  • #43 get_contacts_by_handle_cb
    at tp-lowlevel.c line 161
  • #44 contacts_context_continue
    at contact.c line 1291
  • #45 contacts_got_attributes
    at contact.c line 3004
  • #46 connection_got_contact_attributes
    at connection-handles.c line 730
  • #47 _tp_cli_connection_interface_contacts_invoke_callback_get_contact_attributes
    at _gen/tp-cli-connection-body.h line 7702
  • #48 tp_proxy_pending_call_idle_invoke
    at proxy-methods.c line 153
  • #49 g_idle_dispatch
    at gmain.c line 4224
  • #50 g_main_dispatch
    at gmain.c line 2119
  • #51 g_main_context_dispatch
    at gmain.c line 2672
  • #52 g_main_context_iterate
    at gmain.c line 2750
  • #53 g_main_loop_run
    at gmain.c line 2958
  • #54 gtk_main
    at gtkmain.c line 1203
  • #55 main
    at empathy.c line 548

Comment 3 Travis Reitter 2010-08-16 20:09:29 UTC
Philip traced the root of the problem down to commit a84e9e79c7f7a0dca20e1f5b5bc576400238e55c , which moved offline contact filtering from the model to the view.

It's still not clear exactly why this introduced the bug, though.
Comment 4 Philip Withnall 2010-08-17 10:09:10 UTC
Xavier's GTK+ branch from bug #621076 fixes the issue. It's not yet clear why the workaround in Empathy isn't working any more.
Comment 5 Philip Withnall 2010-08-17 10:51:15 UTC
*** Bug 626547 has been marked as a duplicate of this bug. ***
Comment 6 Philip Withnall 2010-08-17 10:58:49 UTC
This branch works around the problem:

http://git.collabora.co.uk/?p=user/pwith/empathy;a=shortlog;h=refs/heads/bgo626552

Once the fix to GTK+ in bug #621076 is committed, we can remove this workaround and the other ones which use individual_view_verify_group_visibility().
Comment 7 Guillaume Desmottes 2010-08-17 11:31:47 UTC
I tried your branch and got this error:


Gtk-CRITICAL **: gtk_tree_model_filter_real_unref_node: assertion `elt->ref_count > 0' failed


  • #0 g_logv
    at gmessages.c line 544
  • #1 g_log
    at gmessages.c line 568
  • #2 g_return_if_fail_warning
    at gmessages.c line 577
  • #3 gtk_tree_model_filter_real_unref_node
    at gtktreemodelfilter.c line 2792
  • #4 gtk_tree_model_filter_unref_node
    at gtktreemodelfilter.c line 2766
  • #5 gtk_tree_model_unref_node
    at gtktreemodel.c line 1401
  • #6 gtk_tree_row_reference_unref_path
    at gtktreemodel.c line 1905
  • #7 gtk_tree_row_reference_free
    at gtktreemodel.c line 2131
  • #8 individual_view_expand_idle_cb
    at empathy-individual-view.c line 1334
  • #9 g_idle_dispatch
    at gmain.c line 4224
  • #10 g_main_dispatch
    at gmain.c line 2119
  • #11 g_main_context_dispatch
    at gmain.c line 2672
  • #12 g_main_context_iterate
    at gmain.c line 2750
  • #13 g_main_loop_run
    at gmain.c line 2958
  • #14 gtk_main
    at gtkmain.c line 1203
  • #15 main
    at empathy.c line 548

Comment 8 Philip Withnall 2010-08-17 11:47:57 UTC
I think that's a separate problem, since I vaguely remember seeing it happening before, separately from the missing parent warnings. I'll take another look at it later, but it's less critical than the missing parent problem.
Comment 9 Guillaume Desmottes 2010-08-17 11:59:12 UTC
It would have be nice to have recorded the moving of the function separately. It's not clear what is actually the fix.

<cassidy> pwithnall, not sure if it's related to your patch but live search is broken with your branch
<cassidy> start typing: nothing is filtered until there is no match, then the "no match" message is displayed
Comment 10 Philip Withnall 2010-08-17 18:09:18 UTC
(In reply to comment #9)
> It would have be nice to have recorded the moving of the function separately.
> It's not clear what is actually the fix.

Done.

> <cassidy> pwithnall, not sure if it's related to your patch but live search is
> broken with your branch
> <cassidy> start typing: nothing is filtered until there is no match, then the
> "no match" message is displayed

Fixed.

Updated branch:

http://git.collabora.co.uk/?p=user/pwith/empathy;a=shortlog;h=refs/heads/bgo626552-2

This doesn't fix the node referencing warnings, but they don't cause any problems, so we can safely ignore them for now. I spent several hours trying to track down their cause to no avail. The GTK+ patch in bug #621076 doesn't raise the node referencing warnings, so it's probably a problem with our workaround somewhere.

I did end up refactoring the code which expands/contracts groups somewhat, to ensure that the idle handler doesn't get called ~1600 times on startup for the hundred-or-so contacts I have in my contact list.
Comment 11 Philip Withnall 2010-08-17 18:41:37 UTC
commit 1214fc8fc351f1861add2b6adbc6b1334bced1f7
Author: Philip Withnall <philip.withnall@collabora.co.uk>
Date:   Tue Aug 17 18:55:12 2010 +0100

    Aggregate group expansion/contraction in EmpathyIndividualView
    
    The idle handler for expanding/contracting groups was getting scheduled many
    hundreds of times more than necessary when initialising the contact list.
    This aggregates expansion/contraction of group rows into a single idle
    handler call which expands or contracts a number of rows at once.

 libempathy-gtk/empathy-individual-view.c |  132 ++++++++++++++++++++++--------
 1 files changed, 96 insertions(+), 36 deletions(-)

commit 8362ce9f550adecdbb48391dc7a342f3cdd2ad13
Author: Philip Withnall <philip.withnall@collabora.co.uk>
Date:   Tue Aug 17 17:59:06 2010 +0100

    Don't recursively expand contact list rows unnecessarily

 libempathy-gtk/empathy-individual-view.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

commit 9e050b87711ad401c2a19b0c59fbe4ed0a4bd325
Author: Philip Withnall <philip.withnall@collabora.co.uk>
Date:   Tue Aug 17 11:54:57 2010 +0100

    Bug 626552 — Sporadic tree model warnings upon initial fill in Empathy
    
    Work around bgo#621076 in EmpathyIndividualView to ensure that all
    individuals and groups are visible in the contact list on initial load.
    Closes: bgo#626552

 libempathy-gtk/empathy-individual-view.c |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

commit 8a94e12fda3bc8d98b32f7ef05a32af7875da6f7
Author: Philip Withnall <philip.withnall@collabora.co.uk>
Date:   Tue Aug 17 15:18:26 2010 +0100

    Rearrange functions in EmpathyIndividualView

 libempathy-gtk/empathy-individual-view.c |  218 +++++++++++++++---------------
 1 files changed, 109 insertions(+), 109 deletions(-)
Comment 12 Philip Withnall 2010-08-24 09:21:39 UTC
*** Bug 627813 has been marked as a duplicate of this bug. ***