Crashes after dismissing "review updates" dialogue early
@hadess
Submitted by Bastien Nocera Link to original bug (#782740)
Description
gnome-software-3.24.3-1.fc26.x86_64
#0 0x00007fd3401ba0b7 in gtk_stack_set_visible_child_name () at /lib64/libgtk-3.so.0
#1 0x00005571bdbea12c in get_installed_updates_cb (plugin_loader=<optimized out>, res=0x5571c151b6d0, dialog=0x5571c1514340) at gs-update-dialog.c:196
#2 0x00007fd33eb0b394 in g_task_return_now () at /lib64/libgio-2.0.so.0
#3 0x00007fd33eb0b3c9 in complete_in_idle_cb () at /lib64/libgio-2.0.so.0
#4 0x00007fd33e563c67 in g_idle_dispatch () at /lib64/libglib-2.0.so.0
#5 0x00007fd33e567277 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#6 0x00007fd33e567618 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#7 0x00007fd33e5676ac in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#8 0x00007fd33eb20d1d in g_application_run () at /lib64/libgio-2.0.so.0
#9 0x00005571bdbbf376 in main (argc=2, argv=0x7fff189b9f38) at gs-main.c:59
(gdb) frame 1
#1 0x00005571bdbea12c in get_installed_updates_cb (plugin_loader=<optimized out>, res=0x5571c151b6d0, dialog=0x5571c1514340) at gs-update-dialog.c:196
196 gtk_stack_set_visible_child_name (GTK_STACK (dialog->stack), "empty");
(gdb) p error
$1 = (GError_autoptr) 0x5571c0429600
(gdb) p error->
code domain message
(gdb) p error->code
$2 = 19
(gdb) p error->domain
$3 = 289
(gdb) p error->message
$4 = (gchar *) 0x5571c1527ca0 "Operation was cancelled"
(gdb) list
191 }
192
193 /* no results */
194 if (gs_app_list_length (list) == 0) {
195 g_debug ("no installed updates to show");
196 gtk_stack_set_visible_child_name (GTK_STACK (dialog->stack), "empty");
197 return;
198 }
199
200 /* set the header title using any one of the applications */
(gdb) p list
$5 = (GsAppList_autoptr) 0x0
My guess is that: 175 ↦ gs_stop_spinner (GTK_SPINNER (dialog->spinner));• is poking at memory it shouldn't.
If the call is cancelled because the dialog was destroyed, you're doing something bad. That's probably wasn't breaking the error as well (the error code isn't GS_PLUGIN_ERROR_CANCELLED/2), and the list is NULL despite being checked for NULL a second earlier.