Bug 37165 - Gabble is crashing when contacts are invited to or when the user invited by some one for a Multi User chat room
Summary: Gabble is crashing when contacts are invited to or when the user invited by s...
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://cgit.collabora.com/git/user/wj...
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-05-13 01:55 UTC by Siraj Razick
Modified: 2011-05-24 11:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Explicitly cast to guint64 when passing varargs (779 bytes, patch)
2011-05-24 11:42 UTC, Will Thompson
Details | Splinter Review

Description Siraj Razick 2011-05-13 01:55:17 UTC
PRECONDITIONS:

a.) Telepathy-glib 0.14.5 and gabble from master has to be installed and running
b.) You should have a gtalk account configured.
c.) The account should be online.

*Empathy can be used to reproduce this  bug.


STEPS LEADING TO PROBLEM: (in Empathy)

1.) Click Chat and start a conversation with user A
2.) On the chat Message window Click Conversation and click on Invite  Participant Action. 
3.) Enter a name of another Contact say B.

Expected:
A Chat room window is open with both Contact A and Contact B in it.

Actual Outcome: 
Gabble Crashes

BackTraces:

(gdb) bt
#0  0xb7a33fcd in g_type_check_is_value_type () from /usr/lib/libgobject-2.0.so.0
#1  0xb7a3a890 in g_value_init () from /usr/lib/libgobject-2.0.so.0
#2  0xb7d1d586 in tp_value_array_build (length=3, type=64) at util.c:1116
#3  0x080e5698 in gabble_muc_channel_constructed (obj=0x83c7890) at muc-channel.c:510
#4  0xb7a1b01c in g_object_newv () from /usr/lib/libgobject-2.0.so.0
#5  0xb7a1b9bc in g_object_new_valist () from /usr/lib/libgobject-2.0.so.0
#6  0xb7a1bad7 in g_object_new () from /usr/lib/libgobject-2.0.so.0
#7  0x080e8e43 in new_muc_channel (fac=<value optimized out>, handle=<value optimized out>, 
    invited=1, inviter=9, message=0x81f42c0 "You've been invited to this chat room!", requested=0, 
    initial_channels=0x0, initial_handles=0x81a9148, initial_ids=0x0, room_id=0x0)
    at muc-factory.c:490
#8  0x080e91ef in do_invite (fac=<value optimized out>, 
    room=0x81de6c0 "private-chat-9034f10d-4501-4248-b576-9bb1ce97d5bd@groupchat.google.com", 
    inviter_handle=9, reason=0x81f42c0 "You've been invited to this chat room!") at muc-factory.c:551
#9  0x080ebd30 in process_muc_invite (handler=0x81d6018, connection=0x81cc380, message=0x83a3780, 
    user_data=0x81b3a70) at muc-factory.c:690
#10 muc_factory_message_cb (handler=0x81d6018, connection=0x81cc380, message=0x83a3780, 
    user_data=0x81b3a70) at muc-factory.c:814
#11 0x080909e4 in stanza_cb (self=0x81bac78, stanza=0x83a3780, user_data=0x81d6018)
    at lm-connection.c:32
#12 0x08097a5c in handle_stanza (self=<value optimized out>, stanza=<value optimized out>)
    at wocky-c2s-porter.c:979
#13 0x08099fb2 in queue_or_handle_stanza (source=0x838cc60, res=0x81ef130, user_data=0x81bac78)
    at wocky-c2s-porter.c:1083
#14 stanza_received_cb (source=0x838cc60, res=0x81ef130, user_data=0x81bac78)
    at wocky-c2s-porter.c:1271
#15 0xb7acc57f in g_simple_async_result_complete () from /usr/lib/libgio-2.0.so.0
#16 0x080958f5 in _xmpp_connection_received_data (source=0x81da120, result=0x81ef050, 
    user_data=0x838cc60) at wocky-xmpp-connection.c:561
#17 0xb7abbf9f in ?? () from /usr/lib/libgio-2.0.so.0
#18 0xb7acc57f in g_simple_async_result_complete () from /usr/lib/libgio-2.0.so.0
#19 0x081053ff in wocky_tls_job_result_gssize (job=<value optimized out>, result=136159520)
    at wocky-tls.c:359
#20 0xb7abbf9f in ?? () from /usr/lib/libgio-2.0.so.0
#21 0xb7acc57f in g_simple_async_result_complete () from /usr/lib/libgio-2.0.so.0
#22 0xb7ad51d6 in ?? () from /usr/lib/libgio-2.0.so.0
#23 0xb7acd634 in ?? () from /usr/lib/libgio-2.0.so.0
#24 0xb7964855 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#25 0xb7968668 in ?? () from /lib/libglib-2.0.so.0
#26 0xb7968ba7 in g_main_loop_run () from /lib/libglib-2.0.so.0
#27 0xb7d13d7f in tp_run_connection_manager (prog_name=0x8159f18 "telepathy-gabble", 
    version=0x816f3f0 "0.12.999.1", construct_cm=0x806ffa0 <construct_cm>, argc=1, argv=0xbffff484)
    at run.c:285
#28 0x0806ff41 in gabble_main (argc=1, argv=0xbffff484) at gabble.c:177
#29 0x0806fde0 in main (argc=1, argv=0xbffff484) at main.c:28

=======

Values of Data passed when gabble_muc_channel is created :


  chan = g_object_new (GABBLE_TYPE_MUC_CHANNEL,
       "connection", priv->conn, : $12 = (GabbleConnection *) 0x81cc040

       "object-path", object_path, $13 = 0x83bd058 "/org/freedesktop/Telepathy/Connection/gabble/jabber/collabora_2etest_40gmail_2ecom_2f540bbe1d/MucChannel1"

       "handle", handle, : $14 = <value optimized out>

       "invited", invited, $15 = 0

       "initiator-handle", invited ? inviter : conn->self_handle, (invited = 0, inviter = 1
       "invitation-message", message, $18 = (const gchar *) 0x0
       "requested", requested, $19 = 1

       "initial-channels", initial_channels_array, $23 = {pdata = 0x81d5f20, len = 1}

       "initial-invitee-handles", initial_handles,$25 = {data = 0x83b97e8 "\002", len = 2}
       "initial-invitee-ids", initial_ids, $27 = 0x81b0f30 "shaheeqa.raouf@gmail.com"
       "room-id", room_id,$27 = $28 = 0x0


================= more details of priv and conn->conn passed ====

p *priv
$33 = {conn = 0x81cc040, status_changed_id = 21, message_cb = 0x81d4f18, text_channels = 0x81d00f0, 
  text_needed_for_tubes = 0x81d0120, tubes_needed_for_tube = 0x81d0150, disco_requests = 0x81d0180, 
  queued_requests = 0x81d01b0, dispose_has_run = 0}
(gdb)

(gdb) p *priv->conn
$34 = {parent = {parent = {g_type_instance = {g_class = 0x81c7290}, ref_count = 13, qdata = 0x81c9f70}, 
    bus_name = 0x81da000 "org.freedesktop.Telepathy.Connection.gabble.jabber.collabora_2etest_40gmail_2ecom_2f540bbe1d", 
    object_path = 0x81c6870 "/org/freedesktop/Telepathy/Connection/gabble/jabber/collabora_2etest_40gmail_2ecom_2f540bbe1d", status = TP_CONNECTION_STATUS_CONNECTED, self_handle = 1, _future1 = 0x0, 
    _future2 = 0x0, _future3 = 0x0, _future4 = 0x0, priv = 0x81cc100}, presence = {priv = 0x0}, 
  contacts = {priv = 0x81d56b8}, daemon = 0x81b2c58, lmconn = 0x81cb380, session = 0x81d7a00, 
  roster = 0x81cf848, muc_factory = 0x81b2a70, private_tubes_factory = 0x81b1940, disco = 0x81d2460, 
  features = 419, presence_cache = 0x81b8c50, self_presence = 0x81d9800, presence_priv = 0x81b1aa0, 
  req_pipeline = 0x81b1a00, vcard_manager = 0x81b2aa8, olpc_activities_info = 0x81d4380, 
  olpc_pep_activities = 0x81d43b0, olpc_invited_activities = 0x81d4400, olpc_current_act = 0x81d4430, 
  bytestream_factory = 0x81b8ca0, avatar_requests = 0x81d8490, vcard_requests = 0x81d84c0, 
  jingle_factory = 0x81b7108, ft_manager = 0x81b1990, pep_nick = 0x81d4350, pep_location = 0x81d4520, 
  pep_olpc_buddy_props = 0x81d4460, pep_olpc_activities = 0x81d4490, pep_olpc_current_act = 0x81d44c0, 
  pep_olpc_act_props = 0x81d44f0, sidecars = 0x81d4550, pending_sidecars = 0x81d4580, 
  mail_priv = 0x81d2760, contact_info_fields = 0x81d5280, priv = 0x81cc148}
Comment 1 Siraj Razick 2011-05-20 07:26:27 UTC
I still observe this with gabble master :'( even with the fix done by Jonny Lamb 
 5ba21edcf88ef60be5558acc0b0259b5f29e98e9) ..
Comment 2 Will Thompson 2011-05-24 11:42:01 UTC
Created attachment 47110 [details] [review]
Explicitly cast to guint64 when passing varargs

Fixes: <https://bugs.freedesktop.org/show_bug.cgi?id=37165>
Comment 3 Siraj Razick 2011-05-24 11:53:27 UTC
(In reply to comment #2)
> Created an attachment (id=47110) [details]
> Explicitly cast to guint64 when passing varargs
> 
> Fixes: <https://bugs.freedesktop.org/show_bug.cgi?id=37165>

works!
Comment 4 Will Thompson 2011-05-24 11:59:29 UTC
Committed a version of the attached patch with a typo fixed, an explanation added in the commit message, and the title of the commit cleverly left incorrect: http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=5bfe3ede2c17b7dd10d258e5661892967cabcc60

Thanks for the report!


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.