Created attachment 3995 This patch adds a simple check to ensure the thumbnailer isn't NULL before using it Here's the backtrace: Program received signal SIGSEGV, Segmentation fault. 0x00000000004274b2 in rstto_thumbnailer_dequeue_thumbnail (thumbnailer=0x0, thumb=0xaeb060) at thumbnailer.c:332 332 if (thumbnailer->priv->request_timer_id) (gdb) bt #0 0x00000000004274b2 in rstto_thumbnailer_dequeue_thumbnail (thumbnailer=0x0, thumb=0xaeb060) at thumbnailer.c:332 #1 0x0000000000425370 in rstto_thumbnail_bar_remove (container=0x9ce260, child=0xaeb060) at thumbnail_bar.c:670 #2 0x00007ffff66360a4 in g_closure_invoke (closure=0x695d20, return_value=0x0, n_param_values=2, param_values=0x78c870, invocation_hint=<optimized out>) at /build/buildd/glib2.0-2.30.0/./gobject/gclosure.c:774 #3 0x00007ffff664781a in signal_emit_unlocked_R (node=<optimized out>, detail=0, instance=0x9ce260, emission_return=0x0, instance_and_params=0x78c870) at /build/buildd/glib2.0-2.30.0/./gobject/gsignal.c:3202 #4 0x00007ffff66516b1 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=<optimized out>) at /build/buildd/glib2.0-2.30.0/./gobject/gsignal.c:3003 #5 0x00007ffff6651852 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at /build/buildd/glib2.0-2.30.0/./gobject/gsignal.c:3060 #6 0x00007ffff79f99b5 in gtk_widget_dispose (object=0xaeb060) at /build/buildd/gtk+2.0-2.24.6/gtk/gtkwidget.c:8767 #7 0x00007ffff663a8d0 in g_object_run_dispose (object=0xaeb060) at /build/buildd/glib2.0-2.30.0/./gobject/gobject.c:945 #8 0x00007ffff616bb97 in g_list_foreach (list=<optimized out>, func=0x7ffff79f0690 <IA__gtk_widget_destroy>, user_data=0x0) at /build/buildd/glib2.0-2.30.0/./glib/glist.c:938 #9 0x000000000042543d in rstto_thumbnail_bar_forall (container=0x9ce260, include_internals=0, callback=0x7ffff79f0690 <IA__gtk_widget_destroy>, callback_data=0x0) at thumbnail_bar.c:692 #10 0x00007ffff785a2ef in gtk_container_destroy (object=0x9ce260) at /build/buildd/gtk+2.0-2.24.6/gtk/gtkcontainer.c:1093 #11 0x00007ffff6635ffa in g_closure_invoke (closure=0x681cd0, return_value=0x0, n_param_values=1, param_values=0x824260, invocation_hint=<optimized out>) at /build/buildd/glib2.0-2.30.0/./gobject/gclosure.c:774 #12 0x00007ffff6647a78 in signal_emit_unlocked_R (node=<optimized out>, detail=0, instance=0x9ce260, emission_return=0x0, instance_and_params=0x824260) at /build/buildd/glib2.0-2.30.0/./gobject/gsignal.c:3388 #13 0x00007ffff66516b1 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=<optimized out>) at /build/buildd/glib2.0-2.30.0/./gobject/gsignal.c:3003 #14 0x00007ffff6651852 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at /build/buildd/glib2.0-2.30.0/./gobject/gsignal.c:3060 #15 0x00007ffff78ffc60 in gtk_object_dispose (gobject=<optimized out>) at /build/buildd/gtk+2.0-2.24.6/gtk/gtkobject.c:421 #16 0x0000000000423dd2 in rstto_thumbnail_bar_dispose (object=0x9ce260) at thumbnail_bar.c:244 #17 0x00007ffff663a8d0 in g_object_run_dispose (object=0x9ce260) at /build/buildd/glib2.0-2.30.0/./gobject/gobject.c:945 #18 0x00007ffff785a2ef in gtk_container_destroy (object=0x9c6ac0) at /build/buildd/gtk+2.0-2.24.6/gtk/gtkcontainer.c:1093 #19 0x00007ffff6635ffa in g_closure_invoke (closure=0x681cd0, return_value=0x0, n_param_values=1, param_values=0x8c8700, invocation_hint=<optimized out>) at /build/buildd/glib2.0-2.30.0/./gobject/gclosure.c:774 Basically rstto_thumbnail_bar_dispose gets called on #16 and un-references the thumbnailer which rstto_thumbnailer_dequeue_thumbnail tries to use. I added a simple check for NULL which fixes the Seg fault. This only happens during the program shutdown after some images have been loaded.
The correct check for NULL would be present in the function rstto_thumbnail_bar_remove, and a g_return_if_fail (RSTTO_IS_THUMBNAILER (thumbnailer)) call inside rstto_thumbnailer_dequeue_thumbnail.
Created attachment 3998 Patch adds checks to ensure the thumbnailer isn't NULL when calling rstto_thumbnailer_dequeue_thumbnail or rstto_thumbnail_bar_remove Fixed. I hadn't thought to add the commit-id. Learn something new every time, thanks!
Patch applied on master (commit-id: e0401b759d80569596241ec9e27f33387849ca42)