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 658909 - Crashes if account is changed before the callback tp_roomlist_create_channel_cb() happens
Crashes if account is changed before the callback tp_roomlist_create_channel_...
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Chat
unspecified
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2011-09-13 12:09 UTC by Juan R. Garcia Blanco
Modified: 2011-09-16 08:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tp-roomlist: ensure that we stay alive during the create_and_handle_channel async call (1.42 KB, patch)
2011-09-16 08:26 UTC, Guillaume Desmottes
committed Details | Review
tp-roomlist: pass self as weak object to tp_cli_channel_type_room_list_call_list_rooms (942 bytes, patch)
2011-09-16 08:32 UTC, Guillaume Desmottes
committed Details | Review

Description Juan R. Garcia Blanco 2011-09-13 12:09:10 UTC
The bug is related to the Join Room dialog. If you open the Join Room dialog and scroll fast through the account combobox, it crashes (it also crashes if you close the window). The reason is the account is changed before the callback tp_roomlist_create_channel_cb() happens. That callback is located in empathy-tp-roomlist.c:264.
Holding a ref in _constructed and freeing it in the callback solves the problem.
Comment 1 Guillaume Desmottes 2011-09-13 12:48:01 UTC
I didn't manage to reproduce this crash. Could you please attach a stack trace?
Comment 2 Juan R. Garcia Blanco 2011-09-15 15:36:57 UTC
Here is the stack trace. I reproduced it following these steps:
-add two gtalk accounts, which enable the Room list pane inside the Join Room dialog
-select an account
-scrolling fast through the combobox list, without displaying the list

Actually, I didn't find it by myself; xclaesse found it ;)

Program received signal SIGSEGV, Segmentation fault.
0x08121503 in tp_roomlist_create_channel_cb (source=0x84c81c8, result=0x87350e0, user_data=0x872f050) at empathy-tp-roomlist.c:272
272		priv->channel = tp_account_channel_request_create_and_handle_channel_finish (
Missing separate debuginfos, use: debuginfo-install freetype-2.4.4-5.fc15.i686 gdbm-1.8.3-9.fc15.i686 glibc-2.14-5.i686 libICE-1.0.6-3.fc15.i686 libSM-1.2.0-2.fc15.i686 libX11-1.4.3-1.fc15.i686 libXau-1.0.6-2.fc15.i686 libXcomposite-0.4.3-2.fc15.i686 libXcursor-1.1.11-3.fc15.i686 libXdamage-1.1.3-2.fc15.i686 libXext-1.2.0-2.fc15.i686 libXfixes-5.0-1.fc15.i686 libXi-1.4.3-2.fc15.i686 libXinerama-1.1.1-2.fc15.i686 libXrandr-1.3.1-2.fc15.i686 libXrender-0.9.6-2.fc15.i686 libXt-1.1.0-1.fc15.i686 libcanberra-0.28-3.fc15.i686 libcanberra-gtk3-0.28-3.fc15.i686 libffi-3.0.9-2.fc15.i686 libgcc-4.6.0-10.fc15.i686 libicu-4.4.2-7.fc15.i686 libjpeg-turbo-1.1.1-1.fc15.i686 libogg-1.2.2-3.fc15.i686 libpng-1.2.46-1.fc15.i686 libselinux-2.0.99-4.fc15.i686 libstdc++-4.6.0-10.fc15.i686 libtdb-1.2.9-9.fc15.i686 libtool-ltdl-2.4-4.fc15.i686 libudev-167-4.fc15.i686 libuuid-2.19.1-1.4.fc15.i686 libvorbis-1.3.2-1.fc15.i686 libxcb-1.7-2.fc15.i686 nss-softokn-freebl-3.12.10-2.fc15.i686 sqlite-3.7.5-3.fc15.i686 zlib-1.2.5-3.fc15.i686
(gdb) bt
  • #0 tp_roomlist_create_channel_cb
    at empathy-tp-roomlist.c line 272
  • #1 g_simple_async_result_complete
    at gsimpleasyncresult.c line 749
  • #2 complete_result
    at account-channel-request.c line 537
  • #3 handle_request_complete
    at account-channel-request.c line 558
  • #4 handle_channels
    at account-channel-request.c line 621
  • #5 handle_channels
    at simple-handler.c line 219
  • #6 handle_channels_context_prepare_cb
    at base-client.c line 2225
  • #7 g_simple_async_result_complete
    at gsimpleasyncresult.c line 749
  • #8 context_check_prepare
    at handle-channels-context.c line 554
  • #9 hcc_channel_prepare_cb
    at handle-channels-context.c line 627
  • #10 g_simple_async_result_complete
    at gsimpleasyncresult.c line 749
  • #11 complete_in_idle_cb
    at gsimpleasyncresult.c line 761
  • #12 g_idle_dispatch
    at gmain.c line 4801
  • #13 g_main_dispatch
    at gmain.c line 2441
  • #14 g_main_context_dispatch
    at gmain.c line 3011
  • #15 g_main_context_iterate
    at gmain.c line 3089
  • #16 g_main_loop_run
    at gmain.c line 3297
  • #17 gtk_main
    at gtkmain.c line 1362
  • #18 gtk_application_run_mainloop
    at gtkapplication.c line 112
  • #19 g_application_run
    at gapplication.c line 1323
  • #20 main
    at empathy.c line 845

Comment 3 Guillaume Desmottes 2011-09-16 08:26:56 UTC
Created attachment 196697 [details] [review]
tp-roomlist: ensure that we stay alive during the create_and_handle_channel async call
Comment 4 Guillaume Desmottes 2011-09-16 08:32:24 UTC
Created attachment 196698 [details] [review]
tp-roomlist: pass self as weak object to tp_cli_channel_type_room_list_call_list_rooms
Comment 5 Xavier Claessens 2011-09-16 08:32:50 UTC
+1
Comment 6 Guillaume Desmottes 2011-09-16 08:33:15 UTC
Attachment 196697 [details] pushed as e3ac854 - tp-roomlist: ensure that we stay alive during the create_and_handle_channel async call
Attachment 196698 [details] pushed as 0fab2d2 - tp-roomlist: pass self as weak object to tp_cli_channel_type_room_list_call_list_rooms