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 636251 - Fails to add contact
Fails to add contact
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: Telepathy backend
0.3.x
Other Linux
: Normal normal
: Unset
Assigned To: folks-maint
folks-maint
: 636965 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-12-01 20:40 UTC by Stef Walter
Modified: 2010-12-13 15:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix crash when adding contact (869 bytes, patch)
2010-12-01 20:52 UTC, Stef Walter
none Details | Review

Description Stef Walter 2010-12-01 20:40:38 UTC
empathy git master fails to add a contact. After the add contact dialog is filled in and 'Add' is clicked:

(gdb) bt
  • #0 g_logv
  • #1 g_log
  • #2 _lambda28_
    at individual-aggregator.c line 2170
  • #3 __lambda28__gh_func
    at individual-aggregator.c line 2176
  • #4 g_hash_table_foreach
    at ghash.c line 1328
  • #5 folks_individual_aggregator_asv_copy
    at individual-aggregator.c line 2192
  • #6 folks_individual_aggregator_add_persona_from_details_co
    at individual-aggregator.c line 2010
  • #7 folks_individual_aggregator_add_persona_from_details
    at individual-aggregator.c line 1911
  • #8 empathy_individual_manager_add_from_contact
    at empathy-individual-manager.c line 409
  • #9 new_individual_response_cb
    at empathy-individual-dialogs.c line 82
  • #10 g_cclosure_marshal_VOID__INT
    at gmarshal.c line 218
  • #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_dialog_response
    at gtkdialog.c line 808
  • #16 action_widget_activated
    at gtkdialog.c line 561

Comment 1 Stef Walter 2010-12-01 20:52:32 UTC
Created attachment 175665 [details] [review]
Fix crash when adding contact
Comment 2 Stef Walter 2010-12-01 20:57:08 UTC
Difference in vala compilation output before and after the patch to folks:

diff --git a/before.txt b/after.txt
index 5f1a276..77d36bc 100644
--- a/before.txt
+++ b/after.txt
@@ -1,12 +1,10 @@
 static void _lambda28_ (const gchar* k, GValue* v, Block16Data* _data16_) {
        FolksIndividualAggregator * self;
        gchar* _tmp0_;
-       GValue* _tmp1_ = NULL;
-       GValue* _tmp2_;
+       GValue* _tmp1_;
        self = _data16_->self;
        g_return_if_fail (k != NULL);
        _tmp0_ = g_strdup ((const gchar*) k);
-       _tmp2_ = __g_value_dup0 ((G_VALUE_HOLDS (v, G_TYPE_VALUE) && g_value_get
-       g_hash_table_insert (_data16_->retval, _tmp0_, _tmp2_);
+       _tmp1_ = __g_value_dup0 (v);
+       g_hash_table_insert (_data16_->retval, _tmp0_, _tmp1_);
 }
Comment 3 Guillaume Desmottes 2010-12-02 10:24:17 UTC
That's a Folks bug.
Comment 4 Philip Withnall 2010-12-02 11:19:45 UTC
Stef, what version of Vala are you using? I presume the patch doesn't introduce any warnings from Vala (since I guess that's why the typecast was originally added)?
Comment 5 Stef Walter 2010-12-02 14:56:43 UTC
stef@shondo:~$ /opt/gnome/bin/valac --version
Vala 0.11.2.23-011d3

That strange version number above is git master (ie: 0.12). I've confirmed this on #vala
Comment 6 Guillaume Desmottes 2010-12-07 13:23:57 UTC
I can confirm this crash.


Core-WARNING **: Invalid GValue unboxing (wrong type or NULL)
aborting...

  • #0 g_logv
  • #1 g_log
  • #2 _lambda28_
    at individual-aggregator.c line 2170
  • #3 __lambda28__gh_func
    at individual-aggregator.c line 2176
  • #4 g_hash_table_foreach
    at ghash.c line 1328
  • #5 folks_individual_aggregator_asv_copy
    at individual-aggregator.c line 2192
  • #6 folks_individual_aggregator_add_persona_from_details_co
    at individual-aggregator.c line 2010
  • #7 folks_individual_aggregator_add_persona_from_details
  • #8 empathy_individual_manager_add_from_contact
    at empathy-individual-manager.c line 409
  • #9 new_individual_response_cb
    at empathy-individual-dialogs.c line 82
  • #10 g_cclosure_marshal_VOID__INT
    at gmarshal.c line 218
  • #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_dialog_response
    at gtkdialog.c line 808
  • #16 action_widget_activated
    at gtkdialog.c line 561
  • #17 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 79
  • #18 g_closure_invoke
    at gclosure.c line 766
  • #19 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #20 g_signal_emit_valist
    at gsignal.c line 2983
  • #21 g_signal_emit
    at gsignal.c line 3040
  • #22 gtk_button_clicked
    at gtkbutton.c line 1193
  • #23 gtk_real_button_released
    at gtkbutton.c line 1833
  • #24 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 79
  • #25 g_type_class_meta_marshal
    at gclosure.c line 877
  • #26 g_closure_invoke
    at gclosure.c line 766
  • #27 signal_emit_unlocked_R
    at gsignal.c line 3182
  • #28 g_signal_emit_valist
    at gsignal.c line 2983
  • #29 g_signal_emit
    at gsignal.c line 3040
  • #30 gtk_button_released
    at gtkbutton.c line 1179
  • #31 gtk_button_button_release
    at gtkbutton.c line 1725
  • #32 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 85
  • #33 g_type_class_meta_marshal
    at gclosure.c line 877
  • #34 g_closure_invoke
    at gclosure.c line 766
  • #35 signal_emit_unlocked_R
    at gsignal.c line 3290
  • #36 g_signal_emit_valist
    at gsignal.c line 2993
  • #37 g_signal_emit
    at gsignal.c line 3040
  • #38 gtk_widget_event_internal
    at gtkwidget.c line 5950
  • #39 gtk_widget_event
    at gtkwidget.c line 5663
  • #40 gtk_propagate_event
    at gtkmain.c line 2499
  • #41 gtk_main_do_event
    at gtkmain.c line 1725
  • #42 _gdk_event_emit
    at gdkevents.c line 70
  • #43 gdk_event_source_dispatch
    at gdkeventsource.c line 321
  • #44 g_main_dispatch
    at gmain.c line 2440
  • #45 g_main_context_dispatch
    at gmain.c line 3013
  • #46 g_main_context_iterate
    at gmain.c line 3091
  • #47 g_main_loop_run
    at gmain.c line 3299
  • #48 gtk_main
    at gtkmain.c line 1294
  • #49 gtk_application_run_mainloop
    at gtkapplication.c line 83
  • #50 g_application_run
    at gapplication.c line 1216
  • #51 main
    at empathy.c line 725

Comment 7 Philip Withnall 2010-12-12 10:52:53 UTC
Pushed to master inside an #if VALA_0_12.

commit c7505774b7a70d0c1e979a10439ceb87419d74f2
Author: Stef Walter <stefw@collabora.co.uk>
Date:   Wed Dec 1 20:50:22 2010 +0000

    Bug 636251 — Fails to add contact
    
    Vala compiles this line of code wrong, and tries to double check
    that there is a GValue boxed inside of the GValue.
    
    Closes: bgo#636251

 folks/individual-aggregator.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
Comment 8 Philip Withnall 2010-12-13 15:17:13 UTC
*** Bug 636965 has been marked as a duplicate of this bug. ***