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 774082 - grid-item: Avoid crash by disconnecting signal handlers
grid-item: Avoid crash by disconnecting signal handlers
Status: RESOLVED FIXED
Product: gnome-todo
Classification: Other
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME To Do maintainer(s)
GNOME To Do maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-11-07 23:29 UTC by Victor Toso
Modified: 2016-11-09 12:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
grid-item: Avoid crash by disconnecting signal handlers (3.80 KB, patch)
2016-11-07 23:29 UTC, Victor Toso
committed Details | Review

Description Victor Toso 2016-11-07 23:29:50 UTC
As GtdListSelectorGridItem might be terminated already when GtdTaskList emits
some signal as backtrace bellow shows

Thread 1 "gnome-todo" received signal SIGSEGV, Segmentation fault.
 in g_type_check_instance_cast (type_instance=0x117c4f0, iface_type=16593856)
 at (...)/glib/gobject/gtype.c:4056
4056              node = lookup_type_node_I (type_instance->g_class->g_type);
(gdb) bt
 #0 g_type_check_instance_cast (type_instance=0x117c4f0, iface_type=16593856)
    at (...)/glib/gobject/gtype.c:4056
 #1 GTD_LIST_SELECTOR_GRID_ITEM (ptr=0x117c4f0) at
    views/gtd-list-selector-grid-item.h:30
 #2 gtd_list_selector_grid_item__task_changed (list=0x11d08d0, task=0x13eb340,
    user_data=0x117c4f0) at views/gtd-list-selector-grid-item.c:316
 #3 g_cclosure_marshal_VOID__OBJECT (closure=0x11d3ef0, return_value=0x0,
    n_param_values=2, param_values=0x7fffffff8af0,
    invocation_hint=0x7fffffff8a30, marshal_data=0x0) at
    (...)/glib/gobject/gmarshal.c:2062
 #4 g_closure_invoke (closure=0x11d3ef0, return_value=0x0, n_param_values=2,
    param_values=0x7fffffff8af0, invocation_hint=0x7fffffff8a30) at
    (...)/glib/gobject/gclosure.c:804
 #5 signal_emit_unlocked_R (node=0xd71380, detail=0, instance=0x11d08d0,
    emission_return=0x0, instance_and_params=0x7fffffff8af0) at
    (...)/glib/gobject/gsignal.c:3635
 #6 g_signal_emit_valist (instance=0x11d08d0, signal_id=403, detail=0,
    var_args=0x7fffffff8db8) at (...)/glib/gobject/gsignal.c:3391
 #7 g_signal_emit (instance=0x11d08d0, signal_id=403, detail=0) at
    (...)/glib/gobject/gsignal.c:3447
 #8 task_changed_cb (task=0x13eb340, pspec=0x911490, self=0x11d08d0) at
    gtd-task-list.c:168

Signed-off-by: Victor Toso <victortoso@redhat.com>
Comment 1 Victor Toso 2016-11-07 23:29:54 UTC
Created attachment 339289 [details] [review]
grid-item: Avoid crash by disconnecting signal handlers
Comment 2 Georges Basile Stavracas Neto 2016-11-09 11:19:12 UTC
Review of attachment 339289 [details] [review]:

LGTM
Comment 3 Victor Toso 2016-11-09 12:04:37 UTC
Review of attachment 339289 [details] [review]:

committed as c553e45a332322ceed6065c7a3bbf1656cefe6a6
(forgot to push with git bz)