GNOME Bugzilla – Bug 626552
Sporadic tree model warnings upon initial fill in Empathy
Last modified: 2011-08-29 10:12:37 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.
*** Bug 626714 has been marked as a duplicate of this bug. ***
I managed to got a trace: (gdb) bt
+ Trace 223254
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.
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.
*** Bug 626547 has been marked as a duplicate of this bug. ***
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().
I tried your branch and got this error: Gtk-CRITICAL **: gtk_tree_model_filter_real_unref_node: assertion `elt->ref_count > 0' failed
+ Trace 223273
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.
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
(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.
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(-)
*** Bug 627813 has been marked as a duplicate of this bug. ***