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 658631 - crash at empathy startup
crash at empathy startup
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: general
0.6.x
Other Linux
: Normal critical
: folks-0.6.4
Assigned To: folks-maint
folks-maint
: 658887 659197 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-09-09 07:14 UTC by Frederic Peters
Modified: 2011-09-15 23:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.12 KB, patch)
2011-09-09 11:21 UTC, Raul Gutierrez Segales
needs-work Details | Review

Description Frederic Peters 2011-09-09 07:14:43 UTC
I started empathy this morning and it crashed, the trace looked folks related:

(gdb) bt
  • #0 *__GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #1 *__GI_abort
    at abort.c line 92
  • #2 g_assertion_message
  • #3 g_assertion_message_expr
    at gtestutils.c line 1436
  • #4 folks_persona_set_individual
    at persona.c line 777
  • #5 _folks_individual_disconnect_from_persona
    at individual.c line 4820
  • #6 _folks_individual_set_personas
    at individual.c line 6183
  • #7 folks_individual_replace
    at individual.c line 6463
  • #8 _folks_individual_aggregator_personas_changed_cb
    at individual-aggregator.c line 4422
  • #9 __folks_individual_aggregator_personas_changed_cb_folks_persona_store_personas_changed
    at individual-aggregator.c line 2268
  • #10 g_cclosure_user_marshal_VOID__OBJECT_OBJECT_STRING_OBJECT_ENUM
    at persona-store.c line 676
  • #11 g_closure_invoke
    at gclosure.c line 774
  • #12 signal_emit_unlocked_R
    at gsignal.c line 3272
  • #13 g_signal_emit_valist
    at gsignal.c line 3003
  • #14 g_signal_emit_by_name
    at gsignal.c line 3097
  • #15 _folks_persona_store_emit_personas_changed
    at persona-store.c line 413
  • #16 _tpf_persona_store_unload_cache
    at tpf-persona-store.c line 3393
  • #17 _tpf_persona_store_account_status_changed_cb
    at tpf-persona-store.c line 2825
  • #18 __tpf_persona_store_account_status_changed_cb_tp_account_status_changed
    at tpf-persona-store.c line 2149
  • #19 _tp_marshal_VOID__UINT_UINT_UINT_STRING_BOXED
    at _gen/signals-marshal.c line 3359
  • #20 g_closure_invoke
    at gclosure.c line 774
  • #21 signal_emit_unlocked_R
    at gsignal.c line 3272
  • #22 g_signal_emit_valist
    at gsignal.c line 3003
  • #23 g_signal_emit
    at gsignal.c line 3060
  • #24 _tp_account_update
    at account.c line 847
  • #25 _tp_account_properties_changed
    at account.c line 920
  • #26 _tp_cli_account_invoke_callback_for_account_property_changed
    at ../telepathy-glib/_gen/tp-cli-account-body.h line 94
  • #27 tp_proxy_signal_invocation_run
    at proxy-signals.c line 266
  • #28 g_idle_dispatch
    at gmain.c line 4801
  • #29 g_main_dispatch
    at gmain.c line 2441
  • #30 g_main_context_dispatch
    at gmain.c line 3011
  • #31 g_main_context_iterate
    at gmain.c line 3089
  • #32 g_main_loop_run
    at gmain.c line 3297
  • #33 gtk_main
    at gtkmain.c line 1362
  • #34 gtk_application_run_mainloop
    at gtkapplication.c line 112
  • #35 g_application_run
    at gapplication.c line 1323
  • #36 main
    at empathy.c line 845

Comment 1 Raul Gutierrez Segales 2011-09-09 11:21:17 UTC
Created attachment 196092 [details] [review]
patch

When a Persona is being moved from one Individual to another one (because of re-linking), it might occur that more re-linking happens right away so we can't assert much about the state of things.
    
At best, we can check but definitely not assert.
Comment 2 Travis Reitter 2011-09-09 16:21:36 UTC
Review of attachment 196092 [details] [review]:

This looks wrong to me - check out the backtrace. Here's the relevant code:

  private void _disconnect_from_persona (Persona persona,
      Individual? replacement_individual)
    {
...
      if (persona.individual == this)
        {
          persona.individual = replacement_individual;
        }
    }

So this assertion is for the case the !replacement_individual.personas.contains (persona). So we probably need something like:

+          if (!replacement_individual.personas.contains (persona))
             replacement_individual.personas.add (persona);
           persona.individual = replacement_individual;

Please check this out and merge if it seems reasonable.
Comment 3 Travis Reitter 2011-09-09 16:52:26 UTC
We need to add some tests so we can be sure whether it's just too strict of an assertion or if it's a legitimate bug we introduced somewhere.

But since it's a g_assert(), it won't actually crash in a released version anyhow.
Comment 4 Raul Gutierrez Segales 2011-09-09 19:00:08 UTC
I just got this with Gnome Contacts as well after resuming (so clearly related to the fact of PersonaStores becoming available and Personas being pumped into the Aggregator and relinked).

  • #0 __GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #1 __GI_abort
    at abort.c line 93
  • #2 g_assertion_message
  • #3 g_assertion_message_expr
    at gtestutils.c line 1436
  • #4 folks_persona_set_individual
    at persona.c line 777
  • #5 _folks_individual_disconnect_from_persona
    at individual.c line 4820
  • #6 _folks_individual_set_personas
    at individual.c line 6183
  • #7 _folks_individual_aggregator_personas_changed_cb
    at individual-aggregator.c line 4434
  • #8 g_cclosure_user_marshal_VOID__OBJECT_OBJECT_STRING_OBJECT_ENUM

Comment 5 Fabio Durán Verdugo 2011-09-10 00:24:31 UTC
I get this crash with this steps:

Open empathy, in menu go to contact, information and crash
.

Thread 1 (Thread 0xb6a7c880 (LWP 5775))

  • #0 __kernel_vsyscall
  • #1 __GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #2 __GI_abort
    at abort.c line 92
  • #3 g_assertion_message
    at /build/buildd/glib2.0-2.29.90/./glib/gtestutils.c line 1425
  • #4 g_assertion_message_expr
    at /build/buildd/glib2.0-2.29.90/./glib/gtestutils.c line 1436
  • #5 folks_persona_set_individual
    at persona.c line 777
  • #6 _folks_individual_disconnect_from_persona
    at individual.c line 4820
  • #7 _folks_individual_set_personas
    at individual.c line 6183
  • #8 _folks_individual_aggregator_personas_changed_cb
    at individual-aggregator.c line 4422
  • #9 g_cclosure_user_marshal_VOID__OBJECT_OBJECT_STRING_OBJECT_ENUM
    at persona-store.c line 676
  • #10 g_closure_invoke
    at /build/buildd/glib2.0-2.29.90/./gobject/gclosure.c line 774
  • #11 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.29.90/./gobject/gsignal.c line 3272
  • #12 g_signal_emit_valist
    at /build/buildd/glib2.0-2.29.90/./gobject/gsignal.c line 3003
  • #13 g_signal_emit_by_name
    at /build/buildd/glib2.0-2.29.90/./gobject/gsignal.c line 3097
  • #14 _folks_persona_store_emit_personas_changed
    at persona-store.c line 413
  • #15 _tpf_persona_store_unload_cache
    at tpf-persona-store.c line 3393
  • #16 _tpf_persona_store_account_status_changed_cb
    at tpf-persona-store.c line 2825
  • #17 _tpf_persona_store_account_status_changed_cb
    at tpf-persona-store.c line 2790
  • #18 _tp_marshal_VOID__UINT_UINT_UINT_STRING_BOXED
    at _gen/signals-marshal.c line 3324
  • #19 g_closure_invoke
    at /build/buildd/glib2.0-2.29.90/./gobject/gclosure.c line 774
  • #20 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.29.90/./gobject/gsignal.c line 3272
  • #21 g_signal_emit_valist
    at /build/buildd/glib2.0-2.29.90/./gobject/gsignal.c line 3003
  • #22 g_signal_emit
    at /build/buildd/glib2.0-2.29.90/./gobject/gsignal.c line 3060
  • #23 _tp_account_update
    at account.c line 847
  • #24 _tp_cli_account_invoke_callback_for_account_property_changed
    at ../telepathy-glib/_gen/tp-cli-account-body.h line 94
  • #25 tp_proxy_signal_invocation_run
    at proxy-signals.c line 266
  • #26 g_idle_dispatch
    at /build/buildd/glib2.0-2.29.90/./glib/gmain.c line 4801
  • #27 g_main_dispatch
    at /build/buildd/glib2.0-2.29.90/./glib/gmain.c line 2441
  • #28 g_main_context_dispatch
    at /build/buildd/glib2.0-2.29.90/./glib/gmain.c line 3011
  • #29 g_main_context_iterate
    at /build/buildd/glib2.0-2.29.90/./glib/gmain.c line 3089
  • #30 g_main_loop_run
    at /build/buildd/glib2.0-2.29.90/./glib/gmain.c line 3297
  • #31 gtk_main
    at /build/buildd/gtk+3.0-3.1.18/./gtk/gtkmain.c line 1367
  • #32 gtk_application_run_mainloop
    at /build/buildd/gtk+3.0-3.1.18/./gtk/gtkapplication.c line 112
  • #33 g_application_run
    at /build/buildd/glib2.0-2.29.90/./gio/gapplication.c line 1323
  • #34 main
    at empathy.c line 845

Comment 6 Philip Withnall 2011-09-12 22:13:48 UTC
It was actually being caused by personas being removed. The assertion is legitimate, and should remain unchanged. The code at fault was that setting the persona's individual — it's been changed to set it to null if the replacement individual doesn't contain the persona.

commit 1f85f89051e63b05e271b418687c242a83e2f296
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Mon Sep 12 23:09:10 2011 +0100

    Bug 658631 — crash at empathy startup
    
    In the case that a persona is removed and the individual containing that
    persona is replaced by a different non-null individual which doesn't contain
    that persona (because it's been removed), we need to set the persona's
    individual pointer to null rather than the replacement individual.
    
    This stops us tripping the assertion in the setter for Persona.individual.
    
    Closes: bgo#658631

 NEWS                  |    2 ++
 folks/individual.vala |   14 +++++++++++++-
 2 files changed, 15 insertions(+), 1 deletions(-)

commit 406bc1264d3f19c54ea0c929e93814d263a90cc1
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Mon Sep 12 23:07:33 2011 +0100

    individual-aggregator: Add some more debug output
    
    It turns out to be really useful to see what's being emitted by
    IndividualAggregator.individuals-changed-detailed.

 folks/individual-aggregator.vala |   45 +++++++++++++++++++++++++++++++++++++-
 1 files changed, 44 insertions(+), 1 deletions(-)
Comment 7 Guillaume Desmottes 2011-09-13 08:57:33 UTC
*** Bug 658887 has been marked as a duplicate of this bug. ***
Comment 8 Philip Withnall 2011-09-15 23:37:47 UTC
*** Bug 659197 has been marked as a duplicate of this bug. ***